diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md index c416e64..7dfcb55 100644 --- a/.claude/memory/blockers.md +++ b/.claude/memory/blockers.md @@ -417,3 +417,4 @@ rules: - **Friction**: `make test` red on lib/tests/mods.test.sh since 2026-11-13 16:24: claude CLI auto-updated 2.1.316 → 2.1.323; `claude plugin validate --strict` now type-checks the mods and fails on warnings. - **Real cause**: mods/memory/hooks/register.test.ts:191,205,2805 TS2339 (unions `{stdout} | "hang"`, `{text} | "hang"`, `store` on `never`: test helpers never narrow the `"hang"` arm); mods/model-router: 13 warnings of the same validator. Pre-existing code, new validator. - **Solution**: pending: narrow the three test sites (type guard on the `"hang"` arm) and read the 13 model-router warnings (`claude plugin validate --strict mods/model-router`), as its own /bugfix (block H item). Until then every `make test` reports that one suite red; the other 59 suites decide. +- **Status (2026-11-13)**: resolved 6433e4d: the failing warnings were TS errors (17 sites incl. register.ts memory:1579 and model-router:4659), not the .catch info lines; narrowed, both mods pass validate --strict, make test all green diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 7adda33..340626b 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -743,3 +743,4 @@ rules: - /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. - /bugfix phase2-deny-lows (block H4a): 28 deny rows (awk exec primitives + spacing + -f, key/pem/id_rsa/id_ed25519 root forms, rtk twins) locked by T63, doctor jq message (a43ba1b, docs bc90b88). GATE 2 LOWs folded in round 2. make test red on mods.test.sh: claude CLI auto-updated to 2.1.323 at 16:24 (BLK-046), unrelated. Phase 2 'stated residuals' line = accepted limits of BDR-125 phase 2, closed by justification. - correction: the CLI 2.1.323 validator blocker above is BLK-049, not BLK-046. +- /bugfix mods-strict-types (BLK-049): 17 TS sites narrowed for CLI 2.1.323 validate --strict, kits 288/640 unchanged, make test all green again. An analyzer corrected my premise (the 15 '.catch' lines are info, the TS errors fail strict). Other session's Fable 5.2 rename found uncommitted in this checkout: split out, ships as its own branch. diff --git a/.claude/tasks/contracts/2026-11-13-mods-strict-types-1700.md b/.claude/tasks/contracts/2026-11-13-mods-strict-types-1700.md new file mode 100644 index 0000000..ecbfd08 --- /dev/null +++ b/.claude/tasks/contracts/2026-11-13-mods-strict-types-1700.md @@ -0,0 +1,31 @@ +# CONTRACT — mods-strict-types (BLK-049, block H4c) +- date: 2026-11-13 | flow: bugfix | branch: bugfix/mods-strict-types (off develop) +- status: active + +## REQUEST (verbatim — IMMUTABLE) +BLK-049: make test red on mods.test.sh after the claude CLI auto-updated to 2.1.323: `claude plugin validate --strict` now type-checks the mods and fails on warnings. + +## CLARIFICATIONS +- [gated 2026-11-13, analyzer] the failing warnings are TypeScript errors only: mods/memory register.test.ts:191,205,2805 (TS2339) + register.ts:1579 (TS2345, Bash hook return type); mods/model-router register.test.ts:310,1194,1383,1598,1617,1640,2365,2958,4599,4665,5157,6593,6595 + register.ts:4659 (TS2322, AgentSpawnResult incl. `{deny}`). The "gating hook with .catch" lines are informational, not counted. Fix = type narrowing / annotations only, zero runtime behaviour change; the guards' fail-open stays (BDR-136 point 4). + +## ACCEPTANCE CRITERIA +1. Both mods pass strict validation. + CHECK: cd /home/bchanot/Documents/claude && claude plugin validate --strict mods/memory >/dev/null 2>&1 && claude plugin validate --strict mods/model-router >/dev/null 2>&1 && echo STRICT-OK + EXPECT: STRICT-OK + EVIDENCE: MET exit=0 marker-found :: STRICT-OK +2. mods suite green. + CHECK: cd /home/bchanot/Documents/claude && PATH=$HOME/.bun/bin:$PATH make test suite=lib/tests/mods.test.sh 2>&1 | tail -1 + EXPECT: all suites green + EVIDENCE: MET exit=0 marker-found :: all suites green +3. Kit tests unchanged in count and green (no test deleted or skipped). + CHECK: cd /home/bchanot/Documents/claude/mods/model-router && PATH=$HOME/.bun/bin:$PATH timeout 300 claude plugin test . 2>&1 | tail -3 + EXPECT: 0 fail + EVIDENCE: MET exit=0 marker-found :: 640 pass 0 fail Ran 640 tests across 1 file. [33.62s] +4. Memory kit green. + CHECK: cd /home/bchanot/Documents/claude/mods/memory && PATH=$HOME/.bun/bin:$PATH timeout 300 claude plugin test . 2>&1 | tail -3 + EXPECT: 0 fail + EVIDENCE: MET exit=0 marker-found :: 288 pass 0 fail Ran 288 tests across 1 file. [6.92s] +5. make test green (manual, bun on PATH). + +## FILE SCOPE +mods/memory/hooks/register.ts (:1579 type only), mods/memory/hooks/register.test.ts, mods/model-router/hooks/register.ts (:4659 type only), mods/model-router/hooks/register.test.ts.