From c782237d7edb1d89dc217d1d4a666c534cd7132a Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 16:23:37 +0100 Subject: [PATCH] chore(memory): H3 journal, phase 5 line closed --- .claude/memory/journal.md | 1 + .claude/tasks/TODO.md | 3 +- .../2026-11-13-pack-census-followups-1500.md | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .claude/tasks/contracts/2026-11-13-pack-census-followups-1500.md diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 0d465eb..880b883 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -740,3 +740,4 @@ rules: - /bugfix project-rules-residuals (block H1, phase 0 leftovers): emit via _rules_out_path_ok + write guard, extract keeps tmp+out on rewrite failure, physical parent check (9d5530a, T9h + T9z3-z13, docs cd90080). 3 lenses: BLOCKER silent refusal on a file parent (T9w2), MAJOR section's last copy deleted by r1; callers onboarder/scaffolder stop on rc 2 ≠ exists. LRN-286. - /bugfix memory-sh-residuals (block H2, phase 4a + BUGS-FOUND memory.sh): one awk legacy reader (positional selector, prefix-derived end, ## Index stop, path-safe), one effective status for upgrade (strict else v1 label, written as dated line), control chars → ?, journal one blank line (d8e62c1, +30 checks, docs 5e7a267 incl. MIGRATION --body-file note). r1 (e) would have reopened resolved blockers: 3 lenses + confirmation. LRN-287; BLK-038 resolved. - /bugfix memory-sh-residuals (block H2, phase 4a + BUGS-FOUND memory.sh): one awk legacy reader (positional selector, prefix-derived end, ## Index stop, path-safe), one effective status for upgrade (strict else v1 label, written as dated line), control chars → ?, journal one blank line (d8e62c1, +30 checks, docs 5e7a267 incl. MIGRATION --body-file note). r1 (e) would have reopened resolved blockers: 3 lenses + confirmation. LRN-287; BLK-038 resolved. +- /bugfix pack-census-followups (block H3, phase 5 leftovers): grep -qxF on gstack-removed.list, fragment top-level key allowlist (enabledPlugins, deniedMcpServers, disableClaudeAiConnectors, model; GATE 1 caught model missing from my clarification), T13-unknown-key (2fb9a2f, docs). CAPITALIZE: trivial, no BLK/LRN. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index d0c681f..82b172e 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -55,8 +55,7 @@ Open children of the shipped phases (History 2026-11-12), text verbatim. - Phase 0 / 0b leftovers: done 2026-11-13 (block H1, bugfix/project-rules-residuals 9d5530a, LRN-286): emit via `_rules_out_path_ok` + mkdir/write rc, extract keeps `$tmp` and `$out` on a rewrite failure, physical parent check (`cd -P`, `pwd -P`). - Phase 4a leftovers: done 2026-11-13. faunosteo upgraded in block F (chore/memory-v2 530af1b, user merges); BLK-038 residuals closed in block H2 (bugfix/memory-sh-residuals d8e62c1: stderr `?` for control chars, fixtures for the upgrade messages, journal one blank line; the real-data replay oracle is replaced by the fixture suite, its scratchpad script is gone); MIGRATION.md `--body-file` absolute-path note added (5e7a267). Remaining raw sinks, not phase-tied: reconcile.sh:141 stdout `${st:0:80}`, `check` "heading shape" line. - Phase 1 leftovers: done 2026-11-13 in block E (E1 design hook deleted, BDR-148; E2 Skill routing lines → descriptions, BDR-149). -- Phase 5 leftovers: - - [ ] Follow-ups: `lib/pack-census.sh:67` `grep -qx` → `grep -qxF`; fragment top-level key allowlist in `lib/pack-census-fragments.jq` (today only `enabledPlugins` keys are compared). Done 2026-11-02: MIGRATION step 2 `$root` re-derivation + autostash-conflict note (0463583, 9cd9591). +- Phase 5 leftovers: done 2026-11-13 (block H3, bugfix/pack-census-followups 2fb9a2f): `grep -qxF`, fragment top-level key allowlist (four keys profile.sh reads). - Phase 2 leftovers: - [ ] Phase 2 residuals (stated 2026-11-02): Bash write forms are outside the routing guard (the harness auto-mode "prefer Bash" path); a register.ts reload resets the skill latch; `.claude/worktrees/` writes are code; code-limits state dirs stay in TMPDIR; not caught by a static rule: `… | bash -s`, a sourced `gitflow_finish`, `git -C merge` (soft_deny prose only). - [ ] Phase 2 security gate follow-ups (2026-11-02, non-blocking): MEDIUM `rtk read -n .env` / `rtk read a.txt .env` typed directly pass every static deny (rc 3 → passthrough, no rule) → bench `Bash(rtk read * .env*)`, `Bash(rtk read * */.env*)` + `*/rtk` twins and teach phase2.jq the `* ` shape; LOW code-limits state dir (`mkdir -m 700`, owner check); LOW awk evasions (`system (`, `awk -f`, `gawk`/`mawk`); LOW pre-existing `cat x.key` (no dir prefix) parity gap; doctor.sh:255 jq message should name code-limits and push-guard. MEDIUM rtk read part done 2026-11-06 97c6afc (2 rules, bench R3-R7, LRN-266); the LOWs stay open. diff --git a/.claude/tasks/contracts/2026-11-13-pack-census-followups-1500.md b/.claude/tasks/contracts/2026-11-13-pack-census-followups-1500.md new file mode 100644 index 0000000..4668cce --- /dev/null +++ b/.claude/tasks/contracts/2026-11-13-pack-census-followups-1500.md @@ -0,0 +1,30 @@ +# CONTRACT — pack-census-followups (phase 5 leftovers, block H3) +- date: 2026-11-13 | flow: bugfix | branch: bugfix/pack-census-followups (off develop) +- status: active + +## REQUEST (verbatim — IMMUTABLE) +Follow-ups: `lib/pack-census.sh:67` `grep -qx` → `grep -qxF`; fragment top-level key allowlist in `lib/pack-census-fragments.jq` (today only `enabledPlugins` keys are compared). + +## CLARIFICATIONS +- [gated 2026-11-13, internal; amended after GATE 1: `model` is a documented fragment key, profile.sh:182/216/226, profiles/README.md:5-6] allowlist = the keys lib/profile.sh reads: `enabledPlugins`, `deniedMcpServers`, `disableClaudeAiConnectors`, `model`; any other top-level key → `RED lib/profiles/: unknown top-level key(s) `. + +## ACCEPTANCE CRITERIA +1. Fixed-string match on the retired list. + CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'grep -qxF -- "\$s" "\$REMOVED"' lib/pack-census.sh)$(grep -c 'grep -qx -- ' lib/pack-census.sh) + EXPECT: 10 + EVIDENCE: MET exit=0 marker-found :: 10 +2. Unknown top-level key is RED; the four known keys (incl. `model`) pass. + CHECK: cd /home/bchanot/Documents/claude && echo $(grep -c 'unknown top-level key' lib/pack-census-fragments.jq lib/tests/pack-census.test.sh | grep -c ':[1-9]')$(grep -c '"model"' lib/pack-census-fragments.jq) + EXPECT: 21 + EVIDENCE: MET exit=0 marker-found :: 21 +3. Census suite green with the new case; the live profiles pass the allowlist. + CHECK: cd /home/bchanot/Documents/claude && bash lib/tests/pack-census.test.sh 2>&1 | tail -1 + EXPECT: FAIL=0 + EVIDENCE: MET exit=0 marker-found :: PASS=40 FAIL=0 +4. shellcheck -x clean on lib/pack-census.sh; `make test suite=lib/tests/pack-census.test.sh` green. + CHECK: cd /home/bchanot/Documents/claude && shellcheck -x lib/pack-census.sh && PATH=$HOME/.bun/bin:$PATH make test suite=lib/tests/pack-census.test.sh 2>&1 | tail -1 + EXPECT: all suites green + EVIDENCE: MET exit=0 marker-found :: all suites green + +## FILE SCOPE +lib/pack-census.sh (:65 one flag), lib/pack-census-fragments.jq (one RED rule), lib/tests/pack-census.test.sh (one case). CHANGELOG → STEP 7. TODO phase 5 line → STEP 8.