Merge bugfix/t18-bun-skip into develop
This commit is contained in:
commit
2a27032ac4
4 files changed
+27
-1
No files matched your search
@@ -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.
|
||||
@@ -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 <id> (<reason>)"`, 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 </dev/null 2>&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).
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user