Repository navigation
test(id-worlds): #17197 scenario 4 — journal mirror lag at handoff walkthrough - #17402
Conversation
…t handoff The fourth named failure walkthrough for #13938 item 4, on the mechanism item 2 landed in PR #17252 (mirror position receipts + replay barrier): the mirror confirms position 5 for the outgoing epoch while the incoming writer's replay has consumed only 3 positions at handoff, so the barrier stands — the incoming writer's mutation append is refused NotCleared (never queued) until replay reaches exactly the mirror-confirmed position; its first sync round then records a receipt under its own epoch, and the lagging mirror's late epoch-0 round is refused StaleEpoch. The shared assert_exactly_one_writer_per_epoch oracle runs over the resulting journal (DO at epoch 0, native-1 at epoch 1, stamp chain unbroken), and full replay rebuilds the same receipt with no barrier standing. Fidelity: real journal, lease machinery, receipt validation and barrier; the mirror sync round and the incoming writer's catch-up replay are simulated at the in-process transport seam (journaled receipt entries + note_replayed_position), native transport (#13938 item 3) not landed — reduced fidelity named here, on the PR, on #17197 and on #13938.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
LANDED — lane 0900-BU, 2026-11-30. PR #17402 MERGED 2026-11-30T18:19:38Z, merge commit Verification firsthand at head |
Refs #17197, #13938 — lands scenario 4, completing the four named failure walkthroughs of #13938 item 4 (scenarios 1–3 landed in PR #17268). #17197 stays open for its author's close-out; this PR's landing note on #17197 records all four scenarios landed.
What
One named walkthrough test in
pkgs/id/crates/id-worldsworld tests:walkthrough_journal_mirror_lag_at_handoff_keeps_exactly_one_writer(+126 lines, tests only).Scenario: the mirror confirms position 5 for the outgoing writer's epoch 0 (receipt from #13938 item 2, PR #17252), the lease hands off to native-1, and the incoming writer's replay has consumed only 3 positions — it lags the mirror-confirmed position. The replay barrier stands at 5: the incoming writer's mutation append is refused
NotCleared(never queued) at replayed 3 and at 4, clears exactly at 5, its first sync round records a receipt under epoch 1, and the lagging mirror's late epoch-0 round is refusedStaleEpoch. The sharedassert_exactly_one_writer_per_epochoracle then runs over the resulting journal (DO at epoch 0, native-1 at epoch 1, AppendStamp chain unbroken), and full replay rebuilds the same receipt with no barrier standing.Fidelity (named per the acceptance criteria)
Real journal, real lease machinery, real receipt validation and barrier. Reduced fidelity: the mirror sync round and the incoming writer's catch-up replay are simulated at the in-process transport seam (journaled receipt entries +
note_replayed_position), because native transport (#13938 item 3) has not landed. Also named on #17197 and #13938.Verification
Remote dispatch at this PR's head (run id + counts posted on the PR when concluded):
cargo test -p id-worlds --libfilters walkthrough / mirror / replay_barrier / receipt, pipefail, counts read firsthand from the log.{ "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-30T18:06:22Z", "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": "1afb80aa405c56b71c8a63176670cb22ba449a92" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.