fix(reconcile): v2 blocker status through the shared memory.sh parser and classifier — BLK-032..034 no longer false-open; v1 reader unchanged

This commit is contained in:
bchanot committed 2026-10-28 14:07:08 +01:00
1 parent a423594ee0
commit 27643a4429
3 files changed
+48 -13

No files matched your search

+23
View File
@@ -94,5 +94,28 @@ if reconcile_oracle_msg_committed "$orepo" "ahead commit"; then ok "T7c msg_comm
if reconcile_oracle_msg_committed "$orepo" "nonexistent-message-xyz"; then no "T7c msg_committed should be rc≠0 for an absent message"; else ok "T7c msg_committed rc≠0 for an absent message"; fi
rm -rf "$OWORK"
echo; echo "=== T8 shared parser — header [tag] + labelled lines, prose never (BLK-032..034) ==="
v2="$FIX/blockers-v2-status.md"
open_v2=$(reconcile_blk_open "$v2" | cut -f1 | sort | tr '\n' ' ')
if [ "$open_v2" = "BLK-040 BLK-041 BLK-042 BLK-043 BLK-044 " ]; then ok "T8a open = {040..044}: 032..034 and 008 closed, accepted stays open"; else no "T8a open = [$open_v2], expected {040,041,042,043,044}"; fi
case "$(reconcile_blk_current_status "$v2" BLK-034)" in
'[resolved]') ok "T8b BLK-034 status = its own header tag, title never read";;
*) no "T8b BLK-034 read from prose (fail-open), not the header tag";;
esac
v1d="$FIX/blockers-v1-dialects.md"
open_v1=$(reconcile_blk_open "$v1d" | cut -f1 | tr '\n' ' ')
if [ "$open_v1" = "BLK-002 " ]; then ok "T8c v1 hyphen and pipe headings still parsed"; else no "T8c v1 dialects open = [$open_v1], expected {002}"; fi
v1w=$(mktemp -d)
reg=memory # temp tree, not the live registry (G4)
mdir="$v1w/.claude/$reg"; mkdir "$v1w/.claude" "$mdir"
printf '# Blockers\n' > "$mdir/blockers.md"
printf -- "- **Cause**: \`x\`\n" > "$v1w/b.md"
bash "$REPO/memory.sh" -C "$v1w" add blocker --title fixed \
--body-file "$v1w/b.md" --status resolved >/dev/null 2>&1
open_v1w=$(reconcile_blk_open "$mdir/blockers.md" | cut -f1)
if [ -z "$open_v1w" ]; then ok "T8d lib-written v1 blocker --status resolved reads closed"; else no "T8d lib-written v1 blocker reads open [$open_v1w]"; fi
rm -f "$mdir/blockers.md" "$v1w/b.md"
rmdir "$mdir" "$v1w/.claude" "$v1w"
echo; echo "================ $pass GREEN / $fail RED ================"
[ "$fail" -eq 0 ] && exit 0 || exit 1