Repository navigation
fix: preserve Memory relations in backups - #499
Merged
Merged
Conversation
Generated-By: gpt-6.1-terra
Generated-By: gpt-6.1-terra
Generated-By: gpt-6.1-terra
Generated-By: gpt-6.1-terra
Generated-By: gpt-6.1-terra
Sort by the stored TEXT column rather than the projected BLOB alias. SQLite can then use the key index for ordering while returning all key bytes, including embedded NULs. Refs: #443 Generated-By: gpt-6.2-sol
Owner
Author
|
Code review: standard scan, clean. Axes: Standards+Spec, Correctness/Logic Reviewed-Head: 27f42d5 |
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.
Intent
Closes #443
Preserve Memory relations across full export/import and snapshot create/restore, including relations stored under legacy generated keys.
Read first
src/functions/export-import.ts— durable store, validation, and replacement using actual storage keys.src/functions/snapshot.ts— relation replacement and stale-key pruning.src/engine/inproc/state.ts— exact SQLite key decoding for paged readers.Decisions
relatedand omit malformed confidence in backup data without changing source rows.Out of scope
concepts/filesnormalization: Verify: export and snapshot drop data a restore needs #458’s verified verdict rejected the reported consolidation crash on this fork.Verified
27f42d59: clean install, build, generated hooks, skills, typecheck,npm test(3,286 passed, one skipped),npm run eval:gate, andnpm run eval:gate:rules.EXPLAIN QUERY PLANconfirmed index ordering without a temporary sort.Not verified
Merge danger
Door: One-way for a replace or restore that prunes destination-only relations; reverting code does not undo a restore.
Blast radius: Full export/import and snapshot restoration of Memory relations.