Skip to content

fix(memory): fold dirty banks into v11 schema - #13

Merged
ScriptedAlchemy merged 11 commits into
masterfrom
split/holographic-schema-cleanup
Jun 8, 2026
Merged

fix(memory): fold dirty banks into v11 schema#13
ScriptedAlchemy merged 11 commits into
masterfrom
split/holographic-schema-cleanup

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Fold dirty-bank tracking back into the unshipped holographic memory v11 schema by making v11 the latest schema version.
  • Preserve dirty-bank rows that are updated during rebuild cleanup by deleting only the updated_at snapshot that was rebuilt.
  • Add regression coverage for folded schema versioning and dirty-row race preservation.

Test plan

  • cargo test --test migration_test
  • cargo test --test memory_test
  • cargo test --test db_test
  • cargo fmt --check
  • cargo build

Stacked on #12 (split/holographic-docs).

Keep the unshipped holographic stack on one memory schema version and preserve dirty-bank rows that are updated during rebuild cleanup.
@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e90e25d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/memory/store.rs
ScriptedAlchemy added 10 commits June 8, 2026 02:01
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.
Preserve v12 as an exposed compatibility migration so dirty-bank schema folding does not strand existing databases or debug builds.
@ScriptedAlchemy
ScriptedAlchemy changed the base branch from split/holographic-docs to master June 8, 2026 02:59
@ScriptedAlchemy
ScriptedAlchemy merged commit e11e676 into master Jun 8, 2026
5 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the split/holographic-schema-cleanup branch July 4, 2026 01:13
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