14 Commits
Author SHA1 Message Date
bchanot 99f10b2a26 feat(prune-memory): read statuses through one classifier, v1 and v2
reconcile_status_classify generalizes the BLK classifier to a prefix; STEP 1
runs it on decisions and blockers, unreadable statuses are an info-only count.
RED-9 runs the shipped block on v1 and v2 fixtures.
2026-11-12 00:11:03 +01:00
bchanot 7ca6b18f08 fix(tests): gate round, fail-closed sources and gitflow-test mktemp
gitflow-test aborts on a failed mktemp or newrepo before its reset --hard; helper sources exit on failure; no lint suppression left; T19c reads a real registry; doctrine rewrapped.
2026-11-06 17:27:44 +01:00
bchanot 9b3961e622 fix(memory): an assignment-shaped path is read as a file by awk
awk took --body-file x=1.md or a check/upgrade dir like a=b for a var=value operand and read stdin: checks passed vacuously and the entry got stdin. _mem_path_safe prefixes ./ to that shape only.
2026-11-06 16:34:25 +01:00
bchanot e4fb8f7670 fix(memory): phase 4a minors — negated status words, dead empty steal, body heading, blob errors, dropped partial stages
- status parser: a word negated in its clause (not|no|never|pas, at most
  one word between, no `, ; . : ( ) -> → —`) is not a status; shared by
  the v2 parser and the v1 legacy word reader, so `upgrade` refuses a
  "not resolved yet" instead of writing resolved
- lock: an empty memory.lock.steal older than 60 s is a dead stealer
- add: refuse an unfenced `## ` body line (rc 2, line named)
- _mem_blob: rc 1 absent, rc 2 read error; check --staged refuses rc 2
- memory-commit rc 6 names each dropped partial stage with its blob id
  and a `git update-index --cacheinfo` restore line
- upgrade header: a non-table `## Index` is refused (rc 2)
Tests: memory.test.sh T17 block, run-deterministic rc 6 partial-stage case.
2026-11-01 11:39:51 +01:00
bchanot 2dae5282f6 fix(memory): upgrade refuses a prose or mixed v1 closure instead of writing resolved
The repair copied the v1 reader's lexical verdict, read the verdict diff while rewriting the file, and listed same-ID sub-headings twice. It now writes only a single closed word from a Status label, names and refuses the rest, and asserts one upgrade line per entry.
2026-10-30 20:23:40 +01:00
bchanot aab9e4d9a0 fix(memory): bounded lock loop, entry-ID validation, refuse a non-table Index, check refuses nothing-to-check, Date label spacing 2026-10-28 18:28:54 +01:00
bchanot 28c5a4209b fix(memory): resolve the lib dir before -C so upgrade finds the templates from a relative path 2026-10-28 17:53:48 +01:00
bchanot 7806ab426b fix(memory): upgrade keeps an EVAL Index action the body lacks; lib lines ≤ 80 2026-10-28 17:25:36 +01:00
bchanot c742b1f322 fix(memory): upgrade-side v1 reader skips status lines inside code fences 2026-10-28 16:23:33 +01:00
bchanot 197b899c3f fix(memory): upgrade-side v1 range ignores headings inside code fences 2026-10-28 16:01:22 +01:00
bchanot 7b26000f48 fix(memory): upgrade reads each entry's v1 status within its own range 2026-10-28 15:16:31 +01:00
bchanot fdba49d6a8 fix(memory): upgrade never repairs an entry the v1 reader could not see; RECONCILE_GREP honoured 2026-10-28 14:57:05 +01:00
bchanot 18d1c0b6bc feat(memory): upgrade migrates every v1 dialect — headings normalized, frontmatter added, verdict oracle 2026-10-28 14:34:48 +01:00
bchanot a423594ee0 feat(memory): lib/memory.sh single registry writer — add/status/journal/index/check/upgrade, shared status parser, noclobber lock 2026-10-28 14:05:18 +01:00