diff --git a/.agent/memory/active/napkin.md b/.agent/memory/active/napkin.md index f21a54e..d23d50b 100644 --- a/.agent/memory/active/napkin.md +++ b/.agent/memory/active/napkin.md @@ -1,5 +1,41 @@ # Napkin +## Session: 2026-06-18 (final) — program COMPLETE: F6 + Tier 3 + Tier 2 + deps + v0.3.0 + +### What Was Done + +- **F6 (#37)** agent-hook hardening: `|` segment split + recurse-and-check into + `$(...)`/backtick (quote-aware). **Tier 3**: branch coverage + floor 86 (#38), + Hypothesis property tests for the data boundary (#39), single-version ADR-0002 + (#40). **Tier 2**: `docs/repository-governance.md` owner checklist (#41). + **Dependabot** #29 (actions, SHAs verified vs tags) + #30 (14 python deps, + verified green) merged. **Release PR #25 merged → `v0.3.0`** (tag + Release + + wheel/sdist). Program is done; Tier 4 stays deferred. + +### Surprises & corrections (critically assess) + +- **Guardrails must prefer over-blocking to under-blocking.** My first F6 cut + stripped quoted-delimiter heredoc bodies so a commit message could *mention* a + blocked command. WRONG: a quoted delimiter blocks *expansion*, not *execution* — + `bash <<'EOF'\n\nEOF` still runs the body, so the strip turned a caught + force-push into a MISSED one. Reverted; added a regression test pinning the + `bash`-fed heredoc force-push as denied. Over-blocking a commit message is safe; + under-blocking a force-push is not. The residual (heredoc prose mentioning a + blocked command is over-blocked) is documented, not "fixed" unsafely. +- **The live hook bites your own tooling.** Once heredoc bodies are scanned, a + `gh pr edit --body "$(cat < --squash --delete-branch` once green (CI + SonarCloud). - Authoritative detail in the gate-expansion thread record. +- **The program is complete — no queued program work remains.** If resuming: + (1) the only outstanding items are **owner-only GitHub settings** in + `docs/repository-governance.md` (required status checks, release-PR token, Code + Quality preview, `v*` tag protection) — I cannot do these; (2) **F6 residuals** + (glued shell operators like `ok|git`, bare subshells `(...)`, and heredoc-prose + over-block) are documented and deferred to a future owner-authorised session — + fixing the glued-operator one needs a quote-aware raw tokeniser, a + safety-critical change; (3) **Tier 4** (SBOM, SLSA, Scorecard, mutation testing) + stays deferred unless the owner asks. Steady-state: a new `chore(release)` PR + will accrue future feat/fix — merge it with `gh pr merge --squash --auto` + (bot PR sits UNSTABLE; `code_quality` is the only required check). Normal PRs + merge with `gh pr merge --squash --delete-branch` once green. ## Open Side-Tasks diff --git a/.agent/memory/operational/threads/quality-gate-surface-expansion.next-session.md b/.agent/memory/operational/threads/quality-gate-surface-expansion.next-session.md index 6bd65fc..fb29e01 100644 --- a/.agent/memory/operational/threads/quality-gate-surface-expansion.next-session.md +++ b/.agent/memory/operational/threads/quality-gate-surface-expansion.next-session.md @@ -183,21 +183,40 @@ All merged to `main` unless noted. `main` is green. lychee, mutation testing) — diminishing returns for a template; revisit only on explicit request. -## Next Safe Step - -1. **#28, #31, #33, #34 are MERGED; `main` is green. Tier 1b is done except F6.** - Resume at **Tier 1b F6** (the deferred `agent_hooks.py` guardrail hardening — - read its full entry under Remaining Program Work; get owner intent on the - fail-closed semantics first, and pre-verify the modified hook allows a heredoc - commit before relying on it). -2. Then Tier 3 (branch coverage, Hypothesis, version-policy ADR), then the - Tier 2 governance checklist. -3. When the sprint's PRs are all merged, **merge release PR #25 with `--auto`** - to cut the accumulated release, then verify the new GitHub Release + the - bumped `main` version. -4. **A deep `consolidate-docs` ran 2026-06-18:** the release-automation plan was - archived (doctrine confirmed homed in README/docs/workflow/audit), - `completed-plans.md` and the plan indexes refreshed, durable lessons distilled, - and a session experience note added. The napkin (222 lines) was not rotated - (under threshold). Remaining graduation is light and can wait for a natural - break. +## PROGRAM COMPLETE (2026-06-18 final) + +The "highest proportionate bar" program is **done** and **`v0.3.0` is cut** — a +`v0.3.0` tag plus a GitHub Release carrying the wheel and sdist. Landed in the +final session: + +1. **F6 (#37)** — `agent_hooks.py` hardening. Owner chose **recurse-and-check**. + `|` added to `_shell_segments`; `_hook_bypass_reason`/`_blocked_shell_pattern_reason` + recurse (quote-aware) into `$(...)`/backtick bodies via `_reason_with_substitutions`. + **Key correction:** a first cut stripped quoted-heredoc bodies (to allow a + commit message mentioning a blocked command) — REVERTED because a quoted + delimiter blocks expansion, not execution, so `bash <<'EOF'…EOF` still runs the + body; stripping turned a caught force-push into a missed one (under-block). + Heredoc bodies are now never stripped (over-block is safe); a regression test + pins the `bash`-fed heredoc force-push as denied. +2. **Tier 3** — branch coverage + floor 86 + `audit_coverage_contract` branch + guard (#38); Hypothesis property tests for the data boundary (#39); + single-version **ADR-0002** (#40, owner chose ADR over a matrix). +3. **Tier 2** — `docs/repository-governance.md` owner-action checklist (#41). +4. **Dependabot** — #29 (actions, SHAs verified vs upstream tags) + #30 (14 python + deps, verified green incl. pip-audit) merged. +5. **Release** — PR #25 merged via `gh pr merge 25 --squash --auto` → `v0.3.0`. + +**Outstanding = owner-only** (in `docs/repository-governance.md`): required status +checks, release-PR token, Code Quality preview, `v*` tag protection. + +**Documented F6 residuals (deferred to a future owner-authorised session):** +glued control operators (`ok|git push --force` — shlex yields `ok|git` as one +token; affects all four operators; needs a quote-aware raw tokeniser); bare +subshells `(...)`; heredoc-prose over-block (a commit message quoting a blocked +command verbatim inside a heredoc is over-blocked — safe; reword or use `-m`). + +**Tier 4 stays deferred** (SBOM, SLSA, Scorecard, dependency-review, lychee, +mutation testing) — revisit only on explicit owner request. + +A `consolidate-docs` / closeout is the next natural step (graduate plans to +completed, refresh the template-fitness thread now F6 is done).