Repository navigation
Freeze the memory migration artifacts v0.1.1 to v0.3.0 wrote and apply, verify and roll them back with the current commands (#271) - #326
Merged
Conversation
…y, verify and roll them back with the current commands (#271) The release's own CLI writes every migration state per destination backend (planned, crashed before and after the first recorded write, partial, verified, verification_failed, rolled_back, rollback_partial) from memtomem, Mem0 and LangGraph sources into a shared destination per direction, for v0.1.2, v0.1.4 and v0.3.0, plus v0.1.1's two schema 1 artifacts. The default suite checks them with the standard library and HEAD's pure functions; the real suite runs HEAD's `memory migration` commands on rebound copies, and `--from memtomem` over the stores Memory-1 froze. Findings filed while freezing, pinned as measured where a test reaches them: #322, #323, #324, #325. No reader changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ebinding moved every row (#271) Review round 1 of the Memory-2b freeze: the real tests now hold HEAD-written Mem0 and LangGraph rows to their migration id, lineage and digest, and HEAD-written memtomem rows to their materialized source path and bytes; the crashed states' unrecorded rows get the same check as recorded targets (in the generator too); memtomem rebinding requires every row to move and the FTS mirror to agree; the Memory-1 `--from memtomem` copies are rebound first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts (#271) The snapshots a released syncmill wrote record each row's lineage_key, a sha256 the generic-api-key rule reads as a token (295 findings, all in tests/fixtures/persisted/memory/migration/**/snapshot.json). The frozen bytes cannot change, so one allowlist on top of the default rules skips that rule only on a lineage_key line of exactly those files; the same digest elsewhere, or another key in those files, is still reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #271 (Memory family, part 2b). Follows #321 (Mem0 and LangGraph stores) and #317 / #319 (memtomem stores). With this PR every Memory row of the persisted-contracts doc is frozen.
What this freezes
The artifacts
syncmill memory migrationwrites (manifest.json,snapshot.json,state.json,receipt.json,rollback.json, the materializedsources/, from v0.2.0 the.lock), and the stores they were planned from and written into. Each release's own CLI wrote all of them, for v0.1.2, v0.1.4 and v0.3.0:run, a finishedboard run, and three rows in each state namespace;verifieduses the default selection, which no state namespace overlaps;os._exitin place of thatstate.jsonwrite); partial (the destinationputraised); verified; verification_failed (a target deleted through the release's own adapter, thenverify); rolled_back; rollback_partial (a target rewritten in place, thenrollback). The resume states are also frozen for the other source into memtomem, and every direction is frozen at least planned and verified. 33 artifacts per release.v0.1.1 wrote schema 1 artifacts, with no destination binding. Two of them (planned, applied) are frozen under
legacy/.Release differences are frozen as written:
source_file. memtomem resolves it against the apply cwd, and the file is never written.created_atto the second, and keeps a LangGraph source's value without a zone.v0.2.0 and v0.1.3 are not frozen. Their migration code, adapters and SDK locks are byte-identical to v0.3.0 and v0.1.4.
How the tests hold HEAD to them
_loadof every released artifact, field by field.source_digest, the target ids and the destination binding, recomputed by HEAD._load, and byapply/verify/rollbackwith the exact messages. The only new file is an empty 0600.lock.SYNCMILL_TEST_MEMORY_BACKENDS_REAL=1, added to thememory-backends-realCI job). The tests rebind a copy first: memtomem'ssource_file, each manifest'starget_storage_digest(first recomputed for the release's own path), and a check that every row moved and the FTS mirror agrees. Then HEAD's CLI:Every command leaves the other artifacts' rows and the sources unchanged. HEAD's first open of a v0.1.x memtomem store rewrites every timestamp into its own format; a test pins that the instant is the same.
--from memtomemruns over the stores Freeze memtomem stores written by v0.2.0 and v0.3.0 and read them with the current readers (#271) #317 and Freeze the schema-1 memtomem stores v0.1.2 and v0.1.4 wrote and read them with the current readers (#271) #319 froze (v0.2.0, v0.3.0, schema 1 v0.1.2, v0.1.4).Findings (filed; #271 changes no reader)
_loadaccepts a snapshot record edited in content, namespace, tags, id or timestamp. Only the (lineage, digest) pairs are hashed, so the edit is written to the destination before verify fails, and rollback then refuses the row. Pinned as measured.applyrefuses the non-empty destination.rollbackreportsrolled_backwith 0 deleted, and the row survives. Pinned as measured.verifyof a planned, never-applied artifact rewrites its status toverification_failed.sharedrow'sshared-from=names the source backend's id (19 of 19 on the v0.3.0 Mem0 store).Verification
suite-run: CLEAN. 42 default tests pass. Real SDKs: 124 passed locally. The documented smoke command (2a's file plus this one) exits 0.memory_migration.pyeach fail a test, with an assertion or a refusal the test expects. They cover:_load;created_at, root tightening;.gitleaks.toml. Without it, 295generic-api-keyfindings, all on thelineage_keyline of the frozensnapshot.jsonfiles: a sha256 the release wrote, which cannot be reshaped. The allowlist targets only that rule, that line and those files. Checked in a scratch repository: the same digest in another file, and another key in those files, are still reported.🤖 Generated with Claude Code