Files
claude_mac/.claude/tasks/contracts/2026-10-31-memory-v2-minors-0400.md
T

3.9 KiB

CONTRACT — memory-v2-minors

REQUEST (verbatim — IMMUTABLE)

Phase 4a parked minors (ledger .superpowers/sdd/2026-10-27-memory-v2-write/progress.md): empty memory.lock.steal never stale (manual rm); ## Index comment-edge mismatch; upgrade header doc lacks the non-table refusal; memory-commit rc 6 message misleading on a v1→v2 heading-rewrite upgrade; labelled "not resolved yet" reads resolved on v2; body ## line splits an entry (refuse at add); -C + relative --body-file (say absolute in § WRITE); tour/deploy/audit-delta § WRITE pointer; reconcile.sh:24-25 and :41-42 stale comments; _mem_blob → git cat-file blob; evals template "Later status" line; partial stage dropped on rc 6; 39 pre-existing >80-char lines in reconcile.sh / memory-commit.sh.

CLARIFICATIONS

  • 2026-10-31 user: a status word negated by not/no/never/pas (same clause: no , ; . : ( ) -> between, at most one word between) is ignored; memory.sh add refuses a body holding an unfenced ## line; rc 6 keeps today's reset and names the paths whose partial stage was dropped.
  • Scope split (main loop): this contract = the code half (plan A1-A9). The doc half (-C + --body-file in § WRITE, tour/deploy/audit-delta pointer, evals template "Later status") is a separate /feat.
  • Plan r3: .claude/tasks/plans/2026-10-31-memory-v2-minors-0400.md (block T17, not T16; § R3 overrides r2).
  • 2026-11-01 user: A2 (Index comment-edge) and A7 (rc 6 upgrade wording) dropped as moot (0 ## Index left outside faunosteo).

ACCEPTANCE CRITERIA

  1. The memory suite and the memory-commit deterministic suite are green and hold the new checks (T17-steal-empty-dead, T17-steal-empty-fresh, T17-negated-status, T17-upgrade-negated-refused, T17-add-body-heading-refused, T17-add-body-heading-fenced, T17-blob-absent, T17-blob-read-error; run-deterministic "rc 6 names a dropped partial stage"). CHECK: cd /home/bchanot/Documents/claude && a=$(make test suite=lib/tests/memory.test.sh 2>&1) && printf '%s\n' "$a" | grep -q 'FAIL=0' && b=$(make test suite=lib/tests/run-deterministic.sh 2>&1) && printf '%s\n' "$b" | grep -q 'all suites green' && for n in T17-steal-empty-dead T17-steal-empty-fresh T17-negated-status T17-upgrade-negated-refused T17-add-body-heading-refused T17-add-body-heading-fenced T17-blob-absent T17-blob-read-error; do grep -q "$n" lib/tests/memory.test.sh || exit 1; done && grep -q 'partial stage dropped on' lib/tests/run-deterministic.sh && echo MINORS-OK EXPECT: MINORS-OK EVIDENCE: MET exit=0 marker-found :: MINORS-OK

  2. reconcile suite green; lib/memory.sh, lib/memory-commit.sh and lib/reconcile.sh are shellcheck-clean and hold no line over 80 columns. CHECK: cd /home/bchanot/Documents/claude && r=$(make test suite=lib/tests/run-reconcile.sh 2>&1) && printf '%s\n' "$r" | grep -q ' 0 RED' && shellcheck lib/memory.sh lib/memory-commit.sh lib/reconcile.sh && [ "$(LC_ALL=C awk 'length($0) > 80' lib/memory.sh lib/memory-commit.sh lib/reconcile.sh | wc -l)" = 0 ] && echo LIB-LINT-OK EXPECT: LIB-LINT-OK EVIDENCE: MET exit=0 marker-found :: LIB-LINT-OK

  3. Real data: memory.sh -C <repo> index over the 14 repos holding registries is identical before and after, except robin_petier EVAL-005 (accepted → keep, expected) and any other move named in the report. Judged by the verifier from the main loop's replay.

  4. Each fix check fails on develop's lib (T17-negated-status: at least the r3 biting cases); the over-reach guards (T17-steal-empty-fresh, T17-add-body-heading-fenced) fail on their named mutant instead (-mmin +0, fence-blind scan). Executor reports the controls; judged by the verifier.

  5. The reflow (plan A9) changes no behaviour: declare -f / declare -p RECONCILE_DEFER_RE of reconcile.sh and memory-commit.sh are byte-identical before and after (executor reports the diff). Judged by the verifier.

FILE SCOPE

  • lib/memory.sh
  • lib/memory-commit.sh
  • lib/reconcile.sh
  • lib/tests/memory.test.sh
  • lib/tests/run-deterministic.sh