Commit Graph
20 Commits
Author SHA1 Message Date
bchanot b9f2d819b7 fix(tests): memory T18 prints SKIP instead of failing when bun is absent 2026-11-16 00:15:44 +01:00
bchanot e0311f4d4f feat(memory): check --staged refuses a new entry that skips or reuses an ID
A new ## entry must carry the next free ID, replayed in line order the way add allocates it. The rule runs only on a v2 HEAD with entries, so upgrade, first commits and template imports pass.
2026-11-15 21:59:04 +01:00
bchanot 87aecc1212 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.
2026-11-15 19:35:15 +01:00
bchanot d8e62c1420 fix(memory): one lexical status reader, body label beats a stale Index, clean stderr
memory_legacy_status is one fence-aware awk program (selector as a
positional, end derived from the ID prefix, stops at another entry or
## Index; no MEM_LEGACY_RE env read). upgrade computes one effective
status (strict word, else the v1 body label) for flush, Index-stated and
the oracle: a **Statut** : line is written as the dated upgrade status
instead of losing to the Index cell. Control chars become ? on stderr
and in written cells; journal keeps exactly one blank line.
2026-11-13 14:45:15 +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 dc5f127ea5 fix(tests): hook-running suites stub the claude CLI fail-closed
Inline stubs ran claude probe before checking the stub won PATH, and three suites ran the hook with no stub. A shared helper checks resolution, controls from another cwd and exits on any miss (BLK-043 family).
2026-11-06 16:39:38 +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 38afa9325d feat(memory): status reader through memory.sh, entries with lessons 2026-11-05 16:06:09 +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 6c9bb7c58b feat(memory): templates born v2 (format: 2, no Index); session banner names a v1 registry 2026-10-28 14:16:50 +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