Skip to content

Freeze the schema-1 memtomem stores v0.1.2 and v0.1.4 wrote and read them with the current readers (#271) - #319

Merged
memtomem merged 2 commits into
mainfrom
test/frozen-memory-schema1-271
Nov 16, 2026
Merged

memtomem merged 2 commits into
mainfrom
test/frozen-memory-schema1-271

Conversation

@memtomem

Copy link
Copy Markdown
Owner

Refs #271 (Memory family, part 1b). Follows #317, which froze the memtomem 0.6.8 stores of v0.2.0 and v0.3.0.

What this freezes

The memtomem 0.3.x stores (schema 1, migrated by HEAD on open) that v0.1.2 and v0.1.4 wrote through their own CLI, running the same scenarios as #317: run under every strategy, a failed run, Unicode with CRLF, ### headings, a body split into two chunks, a finished board run, room apply, and last a board run SIGKILLed in its second stage.

Two layouts: v0.1.4 writes a day file per namespace and copies each result from a private row into shared; v0.1.2 writes every namespace into one <date>.md and each result straight into shared. v0.1.3 (memtomem 0.3.12 like v0.1.4) writes rows of the same shape as v0.1.4 and gets no fixture.

Why generation differs from #317

memtomem 0.3.x re-derives a whole day file on every write and merges short chunks, so a later write replaces earlier rows (new ids, merged content); a per-scenario row delta does not exist. schema1/freeze.py therefore requires, per CLI step, the day-file entries it appended (append-only, against the scenario definitions; only the release's board GC may delete a finished run's scratch file), and proves the stored rows by replaying that history with the release's own chunker in the release's interpreter: an unchanged chunk keeps its namespace, a new one takes the writer's, a purge drops one. Every shared copy must be exactly the chunks its private write produced.

Layout of the change

  • tests/fixtures/persisted/memory/schema1/ — freeze.py (reuses ../freeze.py by import; that file is unchanged), v0.1.2/, v0.1.4/. One directory down, so frozen_memory_support.RELEASES stays ["v0.2.0", "v0.3.0"] and no Memory-1a file changes (a default test asserts that).
  • tests/frozen_memory_schema1_support.py, tests/test_frozen_memory_schema1.py (default suite, no engine), tests/test_frozen_memory_schema1_real.py (SYNCMILL_TEST_MEMTOMEM_REAL=1; added to CI's memory-backend-real job and to the smoke commands in CLAUDE.md, CONTRIBUTING.md and README.md).
  • docs/architecture/persisted-contracts.md — a "Memory (memtomem, schema 1)" row; the memtomem row's not-covered entry points to it.

Findings, frozen as measured

#271 changes no reader, so these are asserted as they are and filed as #318: a HEAD write to a released v0.1.4 shared day file on the release's UTC date fails half-way (Reindex would remove linked chunk identities); HEAD cannot purge a v0.1.2 scratch namespace, so its board GC degrades and retries; no kind tag was indexed, so later-phase recall never sees a released row; v0.1.4 shared holds duplicated text, dangling shared-from ids and an unindexed board-result; v0.1.2 relabels text across namespaces. The real tests pin HEAD's write date to a later day except where the release day is the point, so they do not depend on when they run.

Verification

  • suite-run: CLEAN. Schema-1 files: 32 default + 34 real-engine tests pass locally.
  • Mutation check: 21 mutations of HEAD readers, the generator's checks and the fixture bytes each fail a test; the review-round fixes were bitten the same way (a pre-opened copy loses its WAL; a later pipeline stage handed the first stage's context).
  • Review: design 3 rounds (all findings adopted after checking against the probe stores); implementation 2 rounds after the commit (round 1 WAL finding fixed; round 2's two findings fixed, none traced to round 1's fix).

🤖 Generated with Claude Code

memtomem and others added 2 commits November 16, 2026 09:46
…them with the current readers (#271)

v0.1.x locked memtomem 0.3.x, whose stores are schema 1 and which HEAD
migrates on open. memtomem 0.3.x re-derives a whole day file on every
write, so a later write replaces earlier rows; schema1/freeze.py
therefore requires the day-file entries each CLI step appended
(append-only, against the scenario definitions) and proves the stored
rows by replaying that history with the release's own chunker, including
every shared copy as exactly the chunks its private write produced.

Two layouts: v0.1.4 writes a day file per namespace and copies results
from private rows; v0.1.2 writes every namespace into one <date>.md and
results straight into shared. v0.1.3 writes rows identical in shape to
v0.1.4 and gets no fixture.

The fixtures live under memory/schema1/ so the Memory-1a release list and
files stay unchanged. The real-engine file joins CI's memory-backend-real
job and the smoke commands; persisted-contracts.md gains the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es are handed (#271)

The migration test read its copy through sqlite3 before HEAD opened it,
which checkpointed and removed the WAL the kill left; the reference rows
now come from a second copy and the opened copy is checked to still have
its WAL. A later phase's prompts are checked for released bodies too,
not only its recall, and a later-day write must leave every released day
file in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@memtomem
memtomem merged commit 41d0e83 into main Nov 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant