Repository navigation
test(id-worlds): #17197 failure walkthroughs 1-3 — exactly one writer per epoch - #17268
Conversation
… per epoch Three named walkthrough tests at the transport seam (native transport, #13938 item 3, has not landed; reduced fidelity named here and on the PR): native crash holding the lease with failover to a pool successor, DO/node partition with both sides alive and the stale holder fenced by epoch on heal, and lease expiry mid-turn with post-expiry appends never landing. Each asserts the exactly-one-writer invariant over the resulting journal via a shared oracle helper (append-stamp chain unbroken, one writer per epoch) plus WorldCore::restore replay. Scenario 4 (journal mirror lag at handoff) stays on its #17195 wake. Refs #17197, #13938
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
🤖 Verification update — lane 0900-BA. Run 46460550985 on head d458232 concluded failure in the runner environment, before any test compiled: cargo could not create its git-db cache dir under the runner-preset |
The #13938 item-1 commit (923fa3d) defined the constant in journal.rs and used it from actor.rs tests and world/tests.rs via the world::* glob, but never added it to the pub use journal::{...} list in mod.rs — cargo test -p id-worlds fails to compile on main with 8 E0425 errors (run 46462603533 on this branch, errors all in pre-existing test code). One-line re-export, alphabetical position.
|
🤖 Fix-forward on this PR — lane 0900-BA. Run 46462603533 (head d458232) reached compilation and failed with 8 × E0425 Verification in flight: run 46464785838 (this branch @ 8096c27) + control run 46464865233 (unmodified main, same command — expected to reproduce the E0425 set, proving the breakage pre-existing). |
|
🤖 LANDED — lane 0900-BA. PR #17268 MERGED 2026-11-30T16:58:19Z, merge commit c5ebb5e, at exact head 8096c27. Verification (firsthand, logs read): branch run 46464785838 success — all three walkthroughs pass ( #17197 stays open: scenario 4 remains on its wake (#17195 landing), and acceptance criterion 1 needs all four. #13938 item 4 stays unchecked for the same reason (note 7284510214). |
What this is
#17197 scenarios 1–3 of 4: the named failure walkthroughs for the #13938 exactly-one-writer invariant, implemented as actor-level tests in
pkgs/id/crates/id-worlds/src/world/tests.rs(+256 lines, tests only).walkthrough_native_crash_holding_the_lease_keeps_exactly_one_writer— holder goes silent mid-term (crash at the seam); expiry fences everyone; failover revokes the dead holder (epoch 2) and grants the caught-up pool successor native-2 (epoch 3).walkthrough_partition_with_both_sides_alive_fences_the_stale_holder— native-1 holds a live one-hour term across a partition; the authority side recalls through the DO (epoch 2) and re-grants native-2 (epoch 3); on heal the stale holder presenting epoch 1 is fenced bycheck_writer.walkthrough_lease_expiry_mid_turn_never_lands_post_expiry_appends— term lapses mid-turn; appends attempted under the dead epoch are refused and journal nothing; only the journaled revoke/grant recovery reopens the write path.Each walkthrough asserts the shared oracle
assert_exactly_one_writer_per_epochover the resulting journal — append-stamp chain unbroken ({writer}:{epoch}:{seq}, seq counting stamps from 1) and exactly one writer per epoch — plusWorldCore::restorereplay as the second oracle half.Fidelity — named, not silent (acceptance criterion 2)
Native transport (#13938 item 3) has not landed and is not descoped on #2819, so per the issue's own prescription the scenarios run against the in-process transport seam: the crash is the holder never acting again, the partition is the authority proceeding while the far-side holder's term stays live. This is reduced fidelity for scenarios 1–2 and is named here, on #17197, and on #13938.
Not in this PR
Scenario 4 (journal mirror lag at handoff) tests the item-2 mechanism (replay barrier + mirror position receipts, #17195), which is not landed — its PR #17252 is open. Scenario 4 stays on the wake recorded on #17197: #17195 closed/merged. This PR therefore Refs, not Closes.
Verification
Remote dispatch on this exact head: fleet run 46460550985 (developing-today-forks/fleet) —
cargo test -p id-worlds --lib walkthrough_. Conclusion recorded on the PR when it lands; merge on green per the loop's own-verification rule (CI is not a gate).Refs #17197, #13938
{ "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-30T16:19:57Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/code-17197-ba", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/code-17197-ba", "repo": "developing-today/code", "branch": "xaltha/0900ba-17197-walkthroughs", "sha": "d45823224724012cd5b3fa5be5f7436bff8eac91" }, "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.