Repository navigation
feat: publish records and provenance checkpoints atomically - #231
Closed
vinceblock99 wants to merge 4 commits into
Closed
vinceblock99 wants to merge 4 commits into
vinceblock99 wants to merge 4 commits into
Conversation
Repositories kept graph state in .atomic/pristine.redb and the provenance journal in .atomic/changes.redb. Both now live in one .atomic/atomic.redb. - atomic-core: a registry of every table (pristine/schema.rs) with a schema version in the new atomic_meta table. LegacyDatabases::merge_into copies each table through its typed definition into a fresh file, verifies a per-table digest against the source, refuses unknown non-empty tables, and leaves retired tables (stacks, channels, file_mtimes) behind. - atomic-repository: ensure_database merges a legacy layout on first open (atomic.redb.merging -> atomic.redb; old files kept in .atomic/legacy/<ts>/) and finishes an interrupted retirement. Concurrent openers serialize on the legacy file lock. open/open_existing/open_readonly wait up to 5s for a busy database. The change store can share the repository's redb handle (Repository::redb_change_store) or open an existing file without creating it. - atomic agent database-owner: opens atomic.redb only while serving a store request. Startup, Ping and Shutdown never touch it, so the owner no longer locks other atomic processes out of the repository. - hooks: close the repository before acknowledging a checkpoint, since the owner now opens the same file.
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.
Separate commits can leave change objects, graph state, and provenance out of sync after a crash. This PR makes each record and each provenance checkpoint commit its related state together, and recovers interrupted agent turns.
atomic.redband publish them with the corresponding graph or session updates.Validation of this source tree: 9,139 tests passed (243 ignored), Clippy, rustdoc and formatting checks; real
go-uuidmigration and Codex hook workflows, including eight crash-recovery points. The branch source tree is identical to the tested version.Draft follow-up to #230. Targets
feat/atomic-redbto isolate this work; retarget todevafter #230 merges. Protobuf/RPC contracts are unchanged.