diff --git a/.claude/audits/BUGS-FOUND.md b/.claude/audits/BUGS-FOUND.md index 8c685e1..14e932a 100644 --- a/.claude/audits/BUGS-FOUND.md +++ b/.claude/audits/BUGS-FOUND.md @@ -17,21 +17,30 @@ - agents/handover-doc-writer.md §6.1 — vulgarizes BDRs with no status filter: a superseded or deprecated decision can read as current in the client deliverable. Severity: medium (client deliverable). Discovered while: /bugfix G5 challenge round 1. Not fixed. + FIXED 2026-11-13 (77041e5, block H6a): §6.1 lists accepted/implemented/proposed only, superseded/deprecated left out, empty status counted as unreadable in the closing sentence. - lib/memory.sh `upgrade` (`mem_want`, `_mem_verdict_diff` skips Index-stated IDs) — may take a stale v1 `## Index` cell over a `**Statut** :` body line. UNVERIFIED: check before recommending `upgrade` on v1 repos (faunosteo). Severity: medium if real (wrong status written into the body). Discovered while: /bugfix G5 challenge round 1. Not fixed. FIXED 2026-11-13 (/bugfix, bugfix/memory-sh-residuals d8e62c1): VERIFIED real (a `**Statut** :` label is unreadable by the strict reader, so the Index cell was written); one effective status (strict word, else the v1 body word) feeds flush, Index-stated and the oracle; the body word is written as the dated upgrade line; Index `superseded`/`deprecated` still wins; fixtures ix1-ix7. - agents/handover-doc-writer.md STEP 10 and other paths — `git log` and file reads are cwd-relative, not rooted on the PACKAGE root; the PACKAGE `PROJECT:` line is space-separated, so a root containing a space mis-parses (the G5 orchestrator check only catches it when blockers.md exists). Severity: low. Discovered while: /bugfix G5 challenge round 1. Not fixed. + FIXED 2026-11-13 (77041e5): whole-line PROJECT_ROOT in the PACKAGE, every git/file read and the draft path rooted on "${ROOT:?}". - lib/memory.sh `memory_legacy_status` default range (`## ID` to the next `## BLK-`) — on a v1 registry a `### BLK-` entry after a `## BLK-` entry feeds its status line to the `##` entry: a resolved `###` entry can close the open `##` entry above it, which then leaves the handover §5 (the `###` ID itself is flagged unreadable). Severity: low (rare dialect, flagged indirectly). Discovered while: /bugfix G5 verifier. Not fixed. FIXED 2026-11-13 (d8e62c1): one awk reader, the range ends at the next heading of another entry of the prefix at any level; T15-probed-openset. - agents/handover-doc-writer.md:83 + agents/client-handover-writer.md:1201-1202 — `ROOT=""` pastes the root into a double-quoted literal, and the printed remedy `memory.sh -C status …` leaves `` unquoted: a root with `"`, `$(…)`, a backtick or a space breaks the line or splits the path. Value is the operator's own `git rev-parse --show-toplevel`, not registry data. Severity: low. Discovered while: /bugfix G5 security gate. Not fixed. + FIXED 2026-11-13 (77041e5): ROOT read through a quoted heredoc with a one-line pre-paste rule, control-char root BLOCKED, remedy single-quoted with a `'` rule. - lib/profile-state.jq (`jq -r` output read by lib/detect-plugins.sh `list_on_plugins` / `detect_gstack`) — a settings value carrying a newline can forge a `plugin:=on` line in the PROFILE_PLAIN text, so the banner or status shows a plugin ON that is not. Display-only, pre-existing for detect_gstack. Severity: low. Discovered while: /bugfix G1+G4 security gate 2026-11-10. Not fixed. - agents/plugin-advisor.md embedded RULE (~:217) — the `embedded` signal can come from REQUEST keywords alone ("driver", "kernel", :58) and maps to `↻ SET : minimal`, against the gated rule "minimal reachable from project-level signals only" (only DISABLE is limited to project signals, :124-126). Gate confirmation limits it. Severity: medium (gated decision not fully enforced). Discovered while: /feat D3 verifier 2026-11-11. Not fixed. + FIXED 2026-11-13 (77041e5): SET minimal needs a project-level probe; REQUEST keywords alone give a NOTE. - lib/plugin-gate.md:49-51 — pack `extras` accepted from an advisor token, but pack-extras bundles 21st-ai (credit-metered generate/iterate), same reason as the higgsfield exclusion; no advisor rule emits it. Severity: medium. Discovered while: /feat D3 security gate. Not fixed. + FIXED 2026-11-13 (77041e5): extras never accepted from an advisor token (manual `profile.sh enable extras` only). - skills/onboard/SKILL.md:255 + agents/plugin-advisor.md:289 — say `make plugin` installs a pinned ctx7; plugins.lock.json pins "latest" (install-plugins.sh:573-574). Fix the wording or pin ctx7. Severity: low. Discovered while: /feat D3 security gate. Not fixed. + FIXED 2026-11-13 (77041e5): wording says ctx7 latest (plugins.lock.json pins `latest`). - agents/plugin-advisor.md:281 BLOCK "Superpowers skills missing → make plugin" + lib/plugin-gate.md:61 "A) fix plugins" undefined — cwd-dependent `make plugin` in an onboarded foreign repo; qualify with the claude-config repo or make it print-only. Severity: low. Discovered while: /feat D3 security gate. Not fixed. + FIXED 2026-11-13 (77041e5): print-only "run `make plugin` in your claude-config checkout"; "A) fix plugins" defined the same in plugin-gate, init-project, ship-feature. - lib/plugin-gate.md templates — tokens and `""` sit in double quotes (`$()` / backticks still expand; protection = the prose closed-list check); linked worktree: the apply check compares `--show-toplevel` but profile.sh writes at the parent of `--git-common-dir` (confirmed path ≠ written path, same repo); PROJECT_ROOT = $HOME as a git repo passes the check and find_root writes `~/.claude/settings.local.json`. Severity: low (defense in depth). Discovered while: /feat D3 security gates. Not fixed. + FIXED 2026-11-13 (77041e5): single quotes, unsafe roots printed never run, apply check vs parent of --git-common-dir, $HOME refused (and deterministically in profile.sh require_project_root, T27). - skills/onboard/SKILL.md:387-762 and skills/tour/SKILL.md:155 — still "gstack ON/OFF" (packs vocabulary elsewhere since D3); cosmetic: unwrapped lines skills/plugin-check/SKILL.md:17, lib/plugin-gate.md:45, USAGE.md:182, USAGE.md:1022 transcript without the ↻ glyph. Severity: low. Discovered while: /feat D3 verifier. Not fixed. + FIXED 2026-11-13 (77041e5): packs vocabulary (pack gstack-dev/design/browser), gstack-design probe added, lines rewrapped, USAGE transcript glyph. - Registry dialects the classifier cannot read: game is `format: 2` but written in the `date: … · status:` dialect (decision statuses unreadable), faunosteo uses `closed` / `active` words, v1 date dialects give no 90-day `proposed` candidate. /prune-memory shows them on the info-only `[Status unreadable]` line; a dialect migration (memory.sh upgrade or a one-shot rewrite per project) is not designed. Severity: medium (prune finds no candidate on those projects). Discovered while: /feat D4 challenge round 1. Not fixed. @@ -44,8 +53,10 @@ - hooks/session-start.sh:329-333 `_digest_todo` reads only a `### Actionable` heading (this repo only); init-project and onboard TODOs never show in the digest. Tracked as TODO D1b (user 2026-11-12). Severity: medium. Discovered while: /feat D1 challenge round 1. Not fixed. + FIXED 2026-11-12 (block D, feature/digest-todo-fallback 1124758, BDR-147): Actionable ##/### else the file's first items. - hooks/session-start.sh digest blocker line fails open: a failed or timed-out `memory.sh index blocker` (timeout 2, stderr dropped) prints no `- open:` line, same as zero open blockers. Fix: print `- open: none` after a successful read. Severity: low. Discovered while: /feat D1 challenge round 2. Not fixed. - Stale graphify claims outside the D6 scope: .gitignore:54-56 ("written into the repo by `graphify claude install`"), plugins.lock.json:37 (bare `graphify install && graphify claude install` recipe), update-all.sh:310-312 (re-run `graphify claude install` MANUALLY, no trap, cwd-dependent → point at `make plugin`), install-plugins.sh:688/690/1269 labels ("dependencies", "Claude Code integration", "PreToolUse hook" for steps the trap reverts), install-plugins.sh:694-695 LRN-071 comment now gates only `graphify install`, guard comment vs rule duplication. LRN-154 (learnings.md:1381) still says `graphify install --platform claude` "touches nothing else". Severity: low. Discovered while: /feat D6 challenge + gates. Not fixed. + FIXED 2026-11-13 (77041e5): .gitignore, plugins.lock.json, update-all.sh (points at make plugin), install-plugins.sh labels/comment match the trap; LRN-154 corrected by a status line. - lib/tests/curated-config-guard.test.sh does not lock the Step 7 `(cd "$REPO" && graphify claude install)` subshell; a later edit dropping it passes make test. Severity: low. Discovered while: /feat D6 challenge round 2. Not fixed. - install-plugins.sh Step 7 hook window (pre-existing): `graphify claude install` hooks sit live in $REPO/.claude/settings.json until the EXIT trap; a SIGKILL skips the trap. Severity: low. Discovered while: /feat D6 security gate. Not fixed. @@ -53,4 +64,12 @@ - lib/tests/push-guard.test.sh T42c — passes even if the `$WORK/s-probe.json` jq write fails (empty slurp makes every base entry look lost); weakens what T42c proves, not the lock. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - lib/tests/push-guard.test.sh deny_lost — no pipefail: a missing list file or jq failure empties `lost` (T42 green); mitigated by T42c (red) and T40. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. - Dead-entry premise (Write(glob) deny never blocks Write; mixed `* :*` / `* -v /:*` forms never match) rests on one live probe 2026-10-23 (journal); nothing re-proves it if Claude Code permission semantics change. Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. + RESOLVED 2026-11-13 by live evidence: Claude Code 2.1.323 warns that `Bash(git push * :**)` (mid-pattern `:*`) matches as a `*` wildcard; the kept deny row is live and matches remote `:ref` deletes; the removed `* :*` forms were wildcards too, so the live `:**` row is the one that holds. - lib/tests/push-guard.test.sh:421-424 T62F (pre-existing) — `mktemp` settings copy outside `$WORK`, removed only on the normal path (no trap). Severity: low. Discovered while: /feat dead-deny security gate. Not fixed. + + +- skills/tour/SKILL.md:244,246 (run) and :249,287 (printed) — `git -C ""` double-quoted path template: a path holding `$(…)`, a backtick or `"` expands. Same class fixed in plugin-gate. Severity: medium. Discovered while: /bugfix H6a security gate 2026-11-13. Not fixed. +- agents/handover-doc-writer.md:790-797 render mode — PROJECT_NAME, CLIENT_NAME, PROJECT_URL, OUTPUT_MD reach the renderer call with no quoting rule (PROJECT.name from package.json, CLIENT_NAME free text). Severity: medium. Discovered while: /bugfix H6a security gate. Not fixed. +- agents/handover-doc-writer.md:208,210,757,758 — fixed temp names /tmp/refs.txt, /tmp/ids.txt (use mktemp). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed. +- skills/onboard/SKILL.md:427,612 — unquoted `$HOME` in an executed probe line (:614 fixed). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed. +- lib/profile.sh:68-72,85 — a root ABOVE a symlinked $HOME is caught by a string compare only (is_home covers exactly $HOME). Severity: low. Discovered while: /bugfix H6a security gate. Not fixed.