feat(prune-memory): v2 registries — § D dropped, status and merges through memory.sh, STEP 4 verify = memory.sh check
This commit is contained in:
1 parent
f15c360b95
commit
c318ee6297
5 files changed
+49
-79
No files matched your search
@@ -0,0 +1,13 @@
|
||||
---
|
||||
format: 2
|
||||
type: decisions_registry
|
||||
entry_prefix: BDR
|
||||
---
|
||||
|
||||
# Decisions registry (BDR)
|
||||
|
||||
## BDR-009 — first (2026-06-01)
|
||||
- **Status**: accepted
|
||||
|
||||
## BDR-009 — duplicate, the trap (2026-06-02)
|
||||
- **Status**: accepted
|
||||
@@ -1,17 +0,0 @@
|
||||
# Decisions
|
||||
|
||||
## Index
|
||||
|
||||
| ID | status | date | title |
|
||||
|----|--------|------|-------|
|
||||
| BDR-009 | accepted | 2026-06-01 | titleless |
|
||||
| BDR-010 | accepted | 2026-06-02 | has title |
|
||||
|
||||
## BDR-009
|
||||
Body exists. Heading above has NO trailing space and NO title -- this is
|
||||
the trap. STEP 4 loop-2 checks `^## BDR-009 ` (trailing space required)
|
||||
and so reports a FALSE ORPHAN even though this body is right here.
|
||||
|
||||
## BDR-010 — Has title
|
||||
Body exists. Control entry: heading has a title, so STEP 4 finds it and
|
||||
does NOT false-orphan it. Proves the bug is specific to title-less headings.
|
||||
@@ -71,16 +71,20 @@ else
|
||||
red 5 "STEP 4 certifies OK after a safety-critical line was deleted (no fidelity check)"
|
||||
fi
|
||||
|
||||
# ---- RED-6: STEP 4 verify must not false-orphan a title-less heading --------
|
||||
S6="$SANDBOX/red6"; mkdir -p "$S6/.claude/memory"
|
||||
cp "$HERE/fixtures/red6-orphan/.claude/memory/decisions.md" \
|
||||
# ---- RED-6: STEP 4 verify runs memory.sh check (duplicate ID caught) --------
|
||||
# v2 registries carry no Index; the structural verify is `memory.sh check`
|
||||
# (heading shape, unique IDs). HOME is pinned to a sandbox whose .claude/lib
|
||||
# is this repo's lib, so the run never depends on the machine's ~/.claude.
|
||||
S6="$SANDBOX/red6"; mkdir -p "$S6/.claude/memory" "$S6/home/.claude"
|
||||
ln -s "$HERE/../../../lib" "$S6/home/.claude/lib"
|
||||
cp "$HERE/fixtures/red6-check/.claude/memory/decisions.md" \
|
||||
"$S6/.claude/memory/decisions.md"
|
||||
extract_block "STEP 4" > "$S6/step4.sh"
|
||||
out="$( cd "$S6" && bash step4.sh 2>/dev/null )"
|
||||
if printf '%s\n' "$out" | grep -qE '^ORPHAN INDEX: BDR-009'; then
|
||||
red 6 "verify emits FALSE 'ORPHAN INDEX: BDR-009' (body exists; trailing-space bug)"
|
||||
out="$( cd "$S6" && HOME="$S6/home" bash step4.sh 2>&1 )"
|
||||
if printf '%s\n' "$out" | grep -qE 'duplicate BDR-009'; then
|
||||
green 6 "verify runs memory.sh check and names the duplicate BDR-009"
|
||||
else
|
||||
green 6 "verify does not false-orphan the title-less heading"
|
||||
red 6 "verify misses the duplicate BDR-009 (no memory.sh check in STEP 4)"
|
||||
fi
|
||||
|
||||
# ---- RED-7: STEP 2 plan example must use FICTIONAL ids, never live registry ids
|
||||
|
||||
Reference in new issue
Block a user