From b9f2d819b7955d57cef13555d9cee149802f6658 Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 16 Nov 2026 00:15:44 +0100 Subject: [PATCH 1/2] fix(tests): memory T18 prints SKIP instead of failing when bun is absent --- lib/tests/memory.test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tests/memory.test.sh b/lib/tests/memory.test.sh index 778cba0..9f01a7e 100755 --- a/lib/tests/memory.test.sh +++ b/lib/tests/memory.test.sh @@ -876,6 +876,7 @@ check T13d-banner-flips-off "$(banner "$FIX/v1h")" 0 cat v1h.bak > "$FIX/v1h/.claude/memory/blockers.md" # T18 the mod's entriesOf reads the same IDs as memory.sh index on this repo's # registries (parseIndex lists no EVAL row); FAILS when they are absent +if command -v bun >/dev/null 2>&1; then parity=$(R="$ROOT" OUT="$(bash "$MEM" -C "$ROOT" index 2>/dev/null)" \ bun -e ' import { readFileSync } from "node:fs" @@ -889,6 +890,9 @@ const diff = [...a].filter(x => !b.has(x)).concat([...b].filter(x => !a.has(x))) console.log(a.size > 0 && diff.length === 0 ? "same" : `differ ${diff}`) ' 2>&1) check T18-entriesOf-vs-index-ids "$parity" same +else + echo "SKIP T18-entriesOf-vs-index-ids (bun not on PATH)" +fi # T19 a path that looks like an awk assignment (x=1.md) is a file, not stdin printf 'x\n## sneaky\n' > 'x=1.md' sum=$(cksum < .claude/memory/learnings.md) From 38456680c26be4584d1058c1837f54d524ff9c33 Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 16 Nov 2026 00:15:51 +0100 Subject: [PATCH 2/2] chore(memory): T18 bun guard journal --- .claude/memory/journal.md | 3 +++ .../contracts/2026-11-16-t18-bun-skip-0010.md | 19 +++++++++++++++++++ .../plans/2026-11-14-bdr125-gap-audit-2330.md | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .claude/tasks/contracts/2026-11-16-t18-bun-skip-0010.md diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index e4cfe23..d85e289 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -763,3 +763,6 @@ rules: - A2 line width: 4 lines >80 cols re-wrapped (register.ts 591/683/3765, transcripts.ts 133; audit line numbers had drifted), no behavior change, make test green, security PASS. - A3 index fail-closed: memory_index rc 2 on non-regular/unreadable registry with kind, lax skip+stderr without kind (register.ts recall keeps rc 0); digest unknown on unparsable BLK row; SD9b/c re-pinned, SD9f/g/h + T20* added (87aecc1). Residuals BUGS-FOUND 07f9a7f. Next A4. - A4 staged next-ID: check --staged refuses new ## entry not = max+1 (line-order replay of _mem_next_id, body IDs feed max only); runs on v2 HEAD with entries + no open fence, so upgrade/first commit/template import pass (e0311f4). Challenge r2 caught upgrade false refusal (trucks_at_work 17536ce replay). Residuals BUGS-FOUND 074cdde. Next A5. + +## 2026-11-16 +- A5 T18 bun guard: memory.test.sh T18 entriesOf/index parity prints SKIP when bun absent instead of FAIL (b9f2d81); no prior bun-skip convention (memory-feedback.test.sh still hard-fails). settings.json left dirty by user choice (/model opus[1m] save). Next A6. diff --git a/.claude/tasks/contracts/2026-11-16-t18-bun-skip-0010.md b/.claude/tasks/contracts/2026-11-16-t18-bun-skip-0010.md new file mode 100644 index 0000000..0b9043b --- /dev/null +++ b/.claude/tasks/contracts/2026-11-16-t18-bun-skip-0010.md @@ -0,0 +1,19 @@ +# CONTRACT — t18-bun-skip (BDR-125 gap audit A5) +- date: 2026-11-16 | flow: hotfix | branch: bugfix/t18-bun-skip (off develop) +- status: active + +## REQUEST (verbatim — IMMUTABLE) +A5 (BDR-125 gap audit): lib/tests/memory.test.sh T18 (entriesOf vs index parity, :877-891) hard-fails when bun is not on PATH. Guard it with `command -v bun`: bun present → unchanged; absent → print `SKIP T18-entriesOf-vs-index-ids (bun not on PATH)` like the file's existing SKIP lines (T20f) and run no check. + +## CLARIFICATIONS +- [internal 2026-11-16] no existing bun SKIP convention to copy (memory-feedback.test.sh hard-fails); the file's own SKIP idiom (`echo "SKIP ()"`, T20f) is followed. Challenge step skipped: a one-branch test guard, nothing for the lenses to bite on. + +## ACCEPTANCE CRITERIA +1. memory suite green with bun on PATH (T18 still runs). + CHECK: cd /home/bchanot/Documents/claude && PATH=$HOME/.bun/bin:$PATH make test suite=lib/tests/memory.test.sh &1 | tail -1 + EXPECT: all suites green + EVIDENCE: MET exit=0 marker-found :: all suites green +2. Without bun on PATH the suite prints the SKIP line and no T18 FAIL (manual: run with a PATH that has no bun). + +## FILE SCOPE +lib/tests/memory.test.sh (T18 block :877-891). diff --git a/.claude/tasks/plans/2026-11-14-bdr125-gap-audit-2330.md b/.claude/tasks/plans/2026-11-14-bdr125-gap-audit-2330.md index 2fb583d..b70e7c7 100644 --- a/.claude/tasks/plans/2026-11-14-bdr125-gap-audit-2330.md +++ b/.claude/tasks/plans/2026-11-14-bdr125-gap-audit-2330.md @@ -5,7 +5,7 @@ - [x] A2 DONE merged 2315a0b (21ef47f). /hotfix line width regressions: mods/memory/hooks/register.ts:976 (86 col, breaks 4b c10 / 4c c9 oracles), lib/memory-feedback/transcripts.ts:133 (follow-ups c7), register.test.ts:71 optional. - [x] A3 DONE 87aecc1 (docs 038670e, residuals BUGS-FOUND 07f9a7f). /bugfix memory_index rc 0 on unreadable/non-regular blockers.md → digest `- open: none` (4c digest defect, BUGS-FOUND:87): non-zero rc → `- open: unknown`; SD9b/SD9c re-pinned. - [x] A4 DONE e0311f4 (tests strengthened in same commit, CHANGELOG eb801b7, residuals BUGS-FOUND 074cdde). memory.sh `check --staged`: new entry ID = max+1 (4a ask TODO:170; today comment "gap harmless" :162). -- A5 memory.test.sh T18 hard-fails without bun on PATH → SKIP line like other bun-gated tests. +- [x] A5 DONE b9f2d81. memory.test.sh T18 hard-fails without bun on PATH → SKIP line like other bun-gated tests. - A6 (user choice) routing guard fail mode (phase 2 shared rule "guards fail closed"; today fail-open). ## Batch B — measurements and live proofs (run by me headless where possible)