chore(memory): LRN engine API first, TODO gates timeout

This commit is contained in:
bchanot committed 2026-11-16 14:33:32 +01:00
1 parent 1a96fca750
commit 1ddc2445ef
2 files changed
+7

No files matched your search

+6
View File
@@ -2114,3 +2114,9 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
- **Context**: A4 `check --staged` next-ID rule (e0311f4). r1 counted body ID lines as entries → valid `add` refused. r2 ran on v1 HEAD → `upgrade` commit refused (`### BDR-n` → `## BDR-n` read as new); replay of trucks_at_work 17536ce: rc 0 today, rc 2 under r2, remedy would have steered to renumbering.
- **Apply**: replay allocator in same order (line order, any level, fenced or not); gate on dialect it assumes (v2 HEAD, ≥1 shape-valid entry, no open fence); before trusting, replay rule on real historical commits of each workflow (add, upgrade, merge, import). Tests must bite: mutate each gate clause, test must go red.
- **Reference**: lib/memory.sh `_mem_check_next_ids`, `_mem_next_id`; lib/tests/memory.test.sh T8f-T8o
## LRN-293 — Mod hook failure handling: read engine API remarks first (next.called guard idiom) (2026-11-16)
- **Pattern**: before designing failure handling for a mod hook, read the engine API remarks for that event; the engine may already document the pattern.
- **Context**: A6 router write guard fail-closed (859e504). r1 try/catch around guardWrite, r2 cfgErr hold + `.catch` latches: challengers found latches unreachable (no ensureConfig throw source), typed-skill latch unable to fire. claude-code.d.ts tool.call remark already prescribes `.catch(($, e, next) => next.called ? next(e) : { deny })`; Caught.called splits guard failure from downstream error, next(e) replays without re-run. r3 used it: guardWrite unchanged, 3 `.catch` blocks only.
- **Apply**: grep `~/.claude/plugins/marketplaces/claude-code-plugins/mods/types/claude-code.d.ts` for the event + `@remarks` before planning; prefer documented idiom over hand-built try/catch. Engine refusals reach hooks as `isError`, not `deny` (BDR-137): latch/success predicates test both.
- **Reference**: mods/model-router/hooks/register.ts guardCaught, guardPasses; BDR-136 amended
+1
View File
@@ -76,6 +76,7 @@ Open children of the shipped phases (History 2026-11-12), text verbatim.
- [x] D3 add-ons (done 9b12b12) from G2 (plugin-advisor.md): plan-budget WARN :317 (unreachable: plugin-gate never sends PLAN, detect_plan gone), :42 "absolute COST ESTIMATE still reported", :105 `(budget: ~<N>t | n/a)`, :222 "passive cost estimate = highest-cost package profile", "0t passive" claims for impeccable / design-motion-principles (:226 :227 :268 :269); USAGE.md :248 "Budget Pro (~11k tokens/5h)", :494 `(~400t)`, :923 `(~200t)`; session-banner.test.sh SB10 `gone()` passes on a missing file (add an existence check)
- [x] D6 project rule (done c69ce9c; lead paragraph fixed too, follow-ups in BUGS-FOUND): .claude/rules/graphify-vendored.md says `graphify install --platform claude` "touches nothing else", but graphifyy 0.9.67 appends a `# graphify` block to ~/.claude/CLAUDE.md (= CLAUDE.global.md); `graphify claude install` writes into the caller's cwd, so the install-plugins.sh trap protects $REPO only when run from $REPO
- [ ] gates.sh: warn or reject a criterion row labelled `^[0-9]+[a-z]\.` (LRN-284: `1b.` absorbed into criterion 1, its CHECK/EXPECT overwritten, false MET)
- [ ] gates.sh default `GATES_TIMEOUT=120` < full `make test` (~135 s on 2026-11-16): a "Full make test green" criterion goes NOT-MET on timeout alone (A6 run, re-run with GATES_TIMEOUT=400). Raise the default or have contract-interview write the timeout for full-suite criteria.
- [ ] lib/design-tool-gate.sh:70 `perl -e 'alarm shift; exec @ARGV' 15 21st whoami` kills one process only (same limit as the old session-start runner, fixed 490ad83): reuse the group-kill runner when this file is next touched.
- [ ] parked (code-clean 2026-11-09): hooks/rtk-rewrite.sh:84 no-op `[ "$CMD" = "$REWRITTEN" ] && REWRITTEN="$CMD"`: remove with the next real rtk-hook edit, re-pin `hooks/.rtk-hook.sha256` + rtk-rewrite.test.sh T13 in the same step
- [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)