fix(memory): index fails closed on an unreadable registry

memory_index skipped a non-regular blockers.md and dropped the awk rc, so the digest printed a false '- open: none'. With a kind it now returns 2; without, it skips the bad registry with a stderr line. The digest prints unknown on a malformed row.
This commit is contained in:
bchanot committed 2026-11-15 19:35:15 +01:00
1 parent 2315a0b33a
commit 87aecc1212
5 files changed
+144 -13

No files matched your search

+2 -1
View File
@@ -336,7 +336,8 @@ _digest_blockers() { # <root> <memory.sh>
[[ "$row" == "| BLK-"* ]] || continue
line="${row#| }"; line="${line% |}"
rest="${line#* | }"; rest="${rest#* | }"
[[ "$rest" == *" | "* ]] || continue
[[ "$rest" == *" | "* ]] || {
echo "- open: unknown (memory.sh index failed)"; return 0; }
status="${rest##* | }"; title="${rest% | *}"
case "$status" in
open) open=$((open + 1))