fix(memory): fold dirty banks into v11 schema - #13
Conversation
Keep the unshipped holographic stack on one memory schema version and preserve dirty-bank rows that are updated during rebuild cleanup.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97bd373926
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
rebuild_dirty_banks uses memory_bank_dirty.updated_at as an optimistic-concurrency token, clearing a marker only when its value is unchanged since the row was snapshotted. Because mark_bank_dirty wrote a second-resolution current_timestamp(), a re-dirty in the same second as the snapshot reused that value and was silently cleared, dropping a concurrent change made during the rebuild. Advance the token strictly on every mark via max(excluded.updated_at, memory_bank_dirty.updated_at + 1), and add a regression test asserting same-second re-dirty moves the marker forward.
…it/holographic-schema-cleanup
Preserve v12 as an exposed compatibility migration so dirty-bank schema folding does not strand existing databases or debug builds.
Summary
updated_atsnapshot that was rebuilt.Test plan
Stacked on #12 (
split/holographic-docs).