Repository navigation
feat(fleet-queue): durable SQLite coordination replica for #8583 - #12692
Merged
Merged
Conversation
added 2 commits
November 22, 2026 22:22
…stubbed Failing-first: the CoordinationReplica contract tests for the durable SQLite-backed replica (model-oracle proptest mirroring work/routing.rs, plus reopen durability) land before the implementation; every trait method returns Unavailable in this commit.
SqliteReplica implements the CoordinationReplica contract from work::routing over a local SQLite store (rusqlite, bundled): claims, leases, and checkpoints persist across restarts; sync_up applies local claims to the attached cloud store and surfaces partition double-claims in the ReconcileReport, never silently merging them. Semantics match MemoryReplica exactly (caller-supplied clock, (worker, lane) identity, injected cloud view consumed by sync), checked by the model-oracle proptest landed in the previous commit.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 22, 2026
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.
What
Implements the #8583 local coordination replica against the
CoordinationReplicainterface settled by #12638:work::sqlite_replica::SqliteReplica, aCoordinationReplicabacked by a local SQLite file (rusqlite, bundled — the stack atlas-core already pins), gated on thequeue-brokerfeature alongsideturso_queue.repo-worker-codeworker id.sync_upreconciles against an attached cloud store: a local claim is applied to the cloud store (honored locally → honored globally); a task the cloud view holds for a different (worker, lane) surfaces indouble_claims, never silently merged;lost_claimsstays empty by construction.Oracle
Every automated test names its oracle: the explicit
ModelReplicastate machine in the module's tests (the same modelMemoryReplicais checked against inwork/routing.rs), exercised over generated operation sequences with proptest — single-writer, expiry crossings, lane isolation, repeated syncs compared on every step. Example tests pin the exact contract error strings, the double-claim report shape, and the one property the in-memory reference cannot offer: a claim recorded before the store closes is still held after it reopens.Failing-first: commit
a463302landed the tests against a stub returningUnavailable(fleet-run evidence in the #8583 completion record); this PR's head implements the trait.Scope
One slice of #8583. Not in this PR (recorded on #8583, in order): (1) routing the claim/lease/heartbeat verbs through
route_forwithmode_lineon their outputs (#8581 remainder 1 — the adapter that will call this replica); (2) the live database-down drill against the real Turso store; (3) Turso-native embedded-replica sync if store-level reconciliation proves insufficient — the trait is the boundary either way.No broker-served behavior changes: this is a new library module behind the existing feature; nothing calls it yet, so no redeploy is needed.
Refs #8583, #12538.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.