Skip to content

fix(id-events): keep post-fork events as voided evidence - #13184

Open
dezren39 wants to merge 3 commits into
mainfrom
xaltha/12050-frozen-rival
Open

dezren39 wants to merge 3 commits into
mainfrom
xaltha/12050-frozen-rival

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

Implements the decision record on #12050 (option (a)): preserve Phase 1 dependency presence. A valid post-fork event is now retained as voided evidence instead of being refused Frozen, so after dependencies on it resolve independent of arrival order. It is never applied: resolve.rs already guarantees events at/above a fork point stay voided.

The bug

decide_in refused any event whose seq sat above the author's lowest fork proof as Refusal::Frozen, storing nothing. A dependent naming that event in after then parked forever in one arrival order (dependent waits → post-fork event refused → row never released) while applying cleanly in the other — arrival order decided convergence.

Change

  • event_store/mod.rs: new proof_at(forks, author, seq) helper beside lowest_proof.
  • event_store/ingest.rs: a proof at the event's own seq still governs it (merge / Frozen / Fork as before). An event above the fork point with no own-seq proof now falls through to the normal conflicts/backlink/deps path and is stored voided when it links. Module docs updated (step 3 "Fork point"; the "known limit" section replaced).
  • Scope boundary: an event at a fork proof's own seq that displaces neither header is still refused Frozen — the EVENTS position holds one event per (author, seq), so it cannot be retained; the issue's matrix covers above-point events.
  • Tests: new arrival-order matrix test (test_a_dependent_on_a_post_fork_event_resolves_in_either_arrival_order, per-event and batch, asserting identical final state in both orders); reworked frozen-chain / frozen-reason / released-into-frozen tests; sync tally test now counts post-fork arrivals as voided (received 2, refused 0, voided 2); crash workload outcome for the post-fork event is now Ingest::Voided. One doc comment updated in tests/event_store_properties.rs.

Verification (remote dispatch, fleet-run workflow, GitHub-hosted runners)

Closes #12050

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T10:24:17Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "bbfc8aa3a3b4f3e3d399b7e76beb6962c0daa5b9"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

An event above its author's fork point was refused as Frozen when it
arrived after the fork, but kept as voided when it arrived before, so an
after hash naming it was present in one arrival order and absent in the
other, stranding dependent events on some replicas.

Implement the decision recorded on #12050 (preserve Phase 1 dependency
presence): an event above the fork point is now decided on its own
conflicts, backlink, and dependencies, and kept as voided evidence when
it links. The resolution never applies it. A fork proof at the event's
own sequence number now governs it wherever that point sits, so proof
replacement keeps the two lowest IDs there in every order. The frozen
refusal remains only for an event at a proof's own sequence number that
displaces neither header: the position holds one event, and the headers
are the events present there.

Adds the order/API matrix test (both arrival orders, per-event and
batch) and updates the tests that pinned the refusal.
…#12050)

The range-session tally test pinned the old frozen refusal: events
above a fork point arriving after the fork are now kept as voided
evidence, so the session counts them as voided and refuses none.
…#12050)

The ingest crash sweep asserted the seq-3 delivery after the fork was
refused as frozen; it is now stored as voided evidence, and the sweep's
outcome checker already handles that disposition.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f74df061-92a2-4c8e-a7ac-a5652838ea00
Commits

Reviewing files that changed from the base of the PR and between 1d25ed1 and 1ea1e5f.

Files selected for processing: 5

  • pkgs/id/crates/id-events/src/event_store/ingest.rs
  • pkgs/id/crates/id-events/src/event_store/mod.rs
  • pkgs/id/crates/id-events/src/event_store/sync.rs
  • pkgs/id/tests/crash/store.rs
  • pkgs/id/tests/event_store_properties.rs
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T10:26:08.602760Z 1ea1e5f 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.

This branch has not been deployed

No deployments
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.

id(event-store): frozen-rival arrival order can strand dependent events

1 participant