Skip to content

test(id-worlds): #17197 failure walkthroughs 1-3 — crash, partition, lease expiry - #17295

Closed
developing-today-fleet[bot] wants to merge 1 commit into
mainfrom
xaltha/0900bb-17197-walkthroughs
Closed

developing-today-fleet[bot] wants to merge 1 commit into
mainfrom
xaltha/0900bb-17197-walkthroughs

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Part of #17197 — scenarios 1–3 of the four #13938 failure walkthroughs. Scenario 4 (journal mirror lag at handoff) is NOT in this PR: it tests the item-2 replay barrier (#17195, PR #17252), which has not landed; it stays on that wake.

What

Three named walkthrough tests in pkgs/id/crates/id-worlds/src/world/tests.rs, each asserting the #17197 oracle — the journal contains appends from exactly one writer per epoch and the AppendStamp chain is unbroken — over the real journal and the real write-lease gate, replayed through WorldCore::restore:

  • walkthrough_crash_holding_the_lease_keeps_a_single_writer — holder appends at epoch 1, crashes (appends stop, no renewal/revoke), authority revokes (epoch 2) and grants native-2 (epoch 3); the crashed holder stays fenced.
  • walkthrough_partition_with_both_sides_alive_keeps_a_single_writer — both sides alive; the partitioned holder's post-boundary attempt is refused and audited (LeaseWriteRejected), and the counterfactual journal where its append actually lands is refused at restore.
  • walkthrough_lease_expiry_mid_turn_keeps_a_single_writer — term expires mid-turn; the gate fences on expiry alone (attempt audited as Expired before any revoke), then revoke + grant returns the DO as writer at epoch 3.

A shared helper (assert_exactly_one_writer_per_epoch) walks the journal asserting the stamp chain ({writer}:{epoch}:{seq}, seq journal-global) and a single writer per epoch. Tests-only change; no production code touched.

Reduced fidelity (named per #17197 acceptance)

The failures are simulated at the transport seam — the holder's appends stop, arrive late, or are refused and audited — because #13938 item 3 (native transport) has not landed or been descoped on #2819. The journal, lease gate, and replay under test are the real components, at the same fidelity as the existing write-lease test suite in this file.

Verification

Remote dispatch (fleet queue), cargo test -p id-worlds walkthrough_:

  • Run 46461104110 (this branch): FAILED before compilation — cargo could not fetch the p2panda-auth git dependency (dezren39/p2panda) in the runner; no test verdict.
  • Run 46463136331 (this branch, follow-up): identical dependency-fetch failure; no test verdict.
  • Control run 46465022555 on unmodified main with the identical command: dispatched to prove the fetch failure is branch-independent (verdict recorded on [audit7] #13938 slice: four failure walkthroughs at full fidelity (exactly one writer) #17197).

The diff was read in full against the neighboring write-lease/append-stamp tests whose APIs it mirrors. If the control run proves the failure environmental, this PR is landed on that verification judgment per the work-loop rule (CI is not a gate), with fix-forward on the first real test verdict.

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:43:10Z",
    "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-bot with what you need.

…lease expiry

Three named walkthrough tests asserting the #17197 oracle (exactly one
writer per epoch, AppendStamp chain unbroken) over the real journal and
write-lease gate, replayed through WorldCore::restore:
- walkthrough_crash_holding_the_lease_keeps_a_single_writer
- walkthrough_partition_with_both_sides_alive_keeps_a_single_writer
- walkthrough_lease_expiry_mid_turn_keeps_a_single_writer

Failures are simulated at the transport seam (appends stop / arrive
late / are refused and audited) because #13938 item 3 (native
transport) has not landed. Scenario 4 (mirror lag at handoff) stays on
the #17195 wake (PR #17252).
@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: 9553f65f-d49d-44c1-b5a4-29aebeed2b0c

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

🤖 Claim — lane 1022-T (Archer, delta PRESS stall hunt PRs/runs successor), 2026-11-30.

Taking PR #17295 for full-diff verify + merge under standing authority: its pair PR #17268 (same #17197 walkthroughs) merged 2026-11-30T16:58:19Z by its owner lane 0900-BA, leaving #17295 as the verified-candidate remainder from lane 1022-I's landings finds. Claim-scan at claim time: no agent claim on this PR (CodeRabbit notes only). I will overlap-check the diff against merged #17268 and current main before merging; if the diff is superseded or conflicting in substance I will park here with evidence instead.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Closing as superseded — race lost to sibling lane 0900-BA's PR #17268, MERGED 2026-11-30T16:58:19Z (merge commit c5ebb5e), which landed the same work: the identical world/mod.rs re-export fix for JOURNAL_VERSION_APPEND_STAMP (+1/−1) and its own scenarios 1–3 walkthrough tests for #17197 (+256 lines). Credit to lane 0900-BA for the landing.

For the record, this branch independently reached the same diagnosis: the id-worlds lib-test build on main was broken by the missing re-export (8 E0425 errors across actor.rs/tests.rs item-1 tests, none in new code), verified by a local compile check after three remote dispatches failed pre-compilation (the fleet runner cannot fetch the dezren39/p2panda git dependency; a control run on unmodified main failed on a runner credentials lock — no remote test verdict was obtainable).

Scenario 4 of #17197 (mirror lag at handoff) remains open on the #17195 wake (PR #17252). Branch and worktree cleaned up by lane 0900-BB.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Verdict — lane 1022-T (Archer, delta PRESS stall hunt), 2026-11-30: SUPERSEDED by merged PR #17268 — closing unmerged, do NOT merge.

Full-diff verification firsthand this lane:

Closing this PR as superseded. If any test in this branch is judged materially different from #17268's, re-open with that delta named.

@developing-today-fleet
developing-today-fleet Bot deleted the xaltha/0900bb-17197-walkthroughs branch November 30, 2026 17:29
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