Skip to content

id-sync: B07 first-class conflict reports before any resolution - #11947

Merged
dezren39 merged 1 commit into
mainfrom
b07-conflict-report
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
b07-conflict-report

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: sync had no conflict artifact. Nothing recorded two signed versions of the same object diverging, so nothing stopped a merge from quietly picking a winner, and there was no addressable record to review.

After: a divergence's first output is a ConflictReport, stored under its own SHA-256 address and logged before anything else happens to that object. A merge is accepted only as a signed version that names the open report, and a conflict on one object never holds up another.

How: federation/slices/b07_conflict_report.rs adds ConflictStore. Every version goes through the B32 gate first; its signed payload carries a small header (object id, parents, optional resolves). The store tracks each object's heads. When an object gets more than one head, the store builds a report naming the conflicting versions, the identity each key is bound to, the verifying key, ingress path and source peer, each body's digest and length, the common base, scopes, the store policy digest, and a retention expiry. A version that joins two or more heads without naming the open report is refused (ResolutionRequired), as is one naming any other report. Reports are immutable: a changed conflict gets a superseding report, and a full merge marks the report Resolved. Versions with missing parents are held and applied when the parents arrive. Retention drops only closed reports.

tests/federation_b07.rs (invariant oracle, 7 tests) runs random streams across three objects against an independent reference (brute-force heads and base, expected refusals), checks every report field, checks the audit order (each resolution comes after its report), then replays each object alone into a fresh store and requires identical outcomes. Like the other slices, the module is path-included and not yet wired into lib.rs.

Refs #10248


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

ConflictStore admits versions through the B32 gate, keeps each
object's version DAG and heads, and on divergence persists an
addressable ConflictReport (versions, bound signers, sources, body
digests, common base, scopes, policy digest, retention expiry) before
anything else. A version joining heads must name the open report;
reports are immutable and superseded or resolved by later events.
Conflicts on one object never affect another.

Refs #10248

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 22:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T22:16:27.006957Z f90e1fb PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit cc62157 into main Nov 18, 2026
@dezren39
dezren39 deleted the b07-conflict-report branch November 18, 2026 22:15
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

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.

2 participants