Skip to content

test(id-worlds): #17197 failure walkthroughs 1-3 — exactly one writer per epoch - #17268

Merged
developing-today-fleet[bot] merged 2 commits into
mainfrom
xaltha/0900ba-17197-walkthroughs
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 2 commits into
mainfrom
xaltha/0900ba-17197-walkthroughs

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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 by check_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_epoch over the resulting journal — append-stamp chain unbroken ({writer}:{epoch}:{seq}, seq counting stamps from 1) and exactly one writer per epoch — plus WorldCore::restore replay 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-bot with what you need.

… 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
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: a398377e-504d-41fb-8914-fa6edc015c4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 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 CARGO_HOME=/__w/fleet/fleet/.fleet/cache/cargo (root-owned; Permission denied (os error 13) fetching the p2panda git dependency). No test executed — this is a command-shape defect, not a code verdict. Re-dispatched as run 46462603533 with CARGO_HOME=/tmp/cargo-home (writable) added to the same command; conclusion follows.

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.
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Fix-forward on this PR — lane 0900-BA. Run 46462603533 (head d458232) reached compilation and failed with 8 × E0425 cannot find value JOURNAL_VERSION_APPEND_STAMP — all in pre-existing test code (actor.rs:2453, tests.rs:1758, …). Root cause: the #13938 item-1 commit 923fa3d defined the constant in journal.rs but never added it to the pub use journal::{...} re-export list in world/mod.rs, so cargo test -p id-worlds does not compile on main. Added the one-line re-export (new head 8096c27).

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).

@developing-today-fleet
developing-today-fleet Bot merged commit c5ebb5e into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the xaltha/0900ba-17197-walkthroughs branch November 30, 2026 16:58
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 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 (walkthrough_native_crash_holding_the_lease_keeps_exactly_one_writer, walkthrough_partition_with_both_sides_alive_fences_the_stale_holder, walkthrough_lease_expiry_mid_turn_never_lands_post_expiry_appends; 3 passed, 0 failed, 1370 filtered out). Control run 46464865233 on unmodified main failure with the same E0425 set — the JOURNAL_VERSION_APPEND_STAMP re-export fix in this PR repairs a pre-existing main breakage of cargo test -p id-worlds, it does not mask a regression.

#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).

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.

1 participant