Repository navigation
id-sync: B07 resolutions name the conflicting versions, not a local report - #11950
Merged
Merged
Conversation
…eport A resolution's signed header now names the ConflictKey of exactly the heads it joins (SHA-256 over the sorted event ids) instead of the receiving store's report id. Report ids include when and from where a replica saw each version, so they differ between replicas and a resolution signed against one replica's report could never apply on another. The key is the same everywhere the same versions are held; each replica still keeps its own report, and report-first holds because two heads always come with an open report. Refs #10248 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 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.
Before: a B07 resolution had to name the receiving store's own report id. That id hashes when and from where the store saw each version, so two replicas holding the same conflict have different ids, and a resolution signed on one replica was refused on every other. Anti-entropy (B09) could never carry a resolution between replicas.
After: a resolution names the conflict itself, the
ConflictKeyof exactly the heads it joins (SHA-256 over the sorted event ids). The same signed resolution resolves the same conflict on every replica, while each replica keeps its own report as the durable record. The wire layout is unchanged (still 32 bytes after the0x01tag).How:
conflict_key()andConflictReport::conflict_key()are new.applyaccepts a version joining two or more heads only when its header names the key of the heads it joins;ResolutionRequirednow also carries that key, andNotAResolutioncarries the key named. Report-first still holds: an object has two heads only while it has an open report, and the audit check now confirms each resolution closes a report created earlier that covers exactly the versions it names.tests/federation_b07.rs(8 tests) computes the key independently, predicts outcomes from it, and adds a test where two replicas see the same versions in different orders, keep different report ids, and both accept the one signed resolution.Refs #10248
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.