GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(worlds): execute spill v2 failover plans through the journal (#7572) by dezren39 · Pull Request #14512 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Slice of #7572 (spill v2 phase 1) — failover execution through the journal

The policy slice (PR #13425) planned failovers but nothing executed a plan: the world actor never maintained or invoked the pool, journaled no failover actions, and captured no grant position. This PR adds the execution seam named in that PR's checkpoint and in FailoverPlan's own contract.

What lands

  • FailoverPlan::execute (world/spill_pool.rs): assigns each action a durable lease position (id(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier) #13711) continuing the lease's own chain, builds the ordered journal entries — LeaseRevoked at e+1 with reason term expired, then LeaseGranted at e+2 (native successor termed term_ms from now_ms; a DO self-grant unterminated) — and proves the whole sequence against a scratch copy of the WriteLease state machine before any entry exists. A plan whose lease has moved since planning is refused, so a grant can never be journaled ahead of its predecessor's fence (acceptance: epochs stay a single per-world monotonic chain).
  • FailoverExecution: the entries, the intermediate (fence-window) and resulting lease states, and grant_position + resume_ready(position) — the §1 step-4 replay barrier the successor must reach before writing.
  • WorldActor::failover_write_lease + WorldCommand::FailoverWriteLease + WorldHandle::failover_write_lease, mirroring handoff_write_lease: plans from the journaled lease and a caller-supplied SpillPool, persists entries in plan order, and advances the live lease to the journaled prefix after each append — a crash between revoke and grant leaves the world holder-less (holder-lost), never split-brained.

Oracle coverage (design #5787 §7)

  • Holder dies mid-term, caught-up replica in pool → fence at e+1, grant at e+2, barrier = grant position, dead holder fenced after replay (unit + actor tests).
  • Holder dies, no eligible successor → DO self-grant, unterminated (unit + actor tests).
  • Fence-to-grant window → every writer refused holder-lost (unit test on the intermediate state).
  • Stale plan (lease moved since planning) → execution refused before any entry exists (unit test).

Tests

Route: cargo test -p id-worlds in the pkgs/id workspace on the laptop worktree (named fallback: the fleet Actions runner has no inbound file transfer for an unpushed worktree). Full lib suite: 1016 passed, 0 failed, including 5 new spill_pool execution tests and 2 new actor tests; clippy clean on the touched files; rustfmt applied.

Still remaining on #7572 after this slice

  • Host-adapter plumbing that maintains the pool (roster configuration + reader observations feeding observe).
  • Q2 failover detection/grant/replay timing measurements (acceptance criterion 3).
  • §7 rows that belong to later phases (replica reads during failover is F2/id: spill v2 phase 2 — read replicas with position-watermark staleness contract (#5787) #7573; multi-world fairness is F3/id: spill v2 phase 3 — multi-world spill admission control and fairness budgets (#5787) #7574).

Refs #7572

{
  "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-24T17:39:31Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/wt-lane-iw195-7572",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/wt-lane-iw195-7572",
      "repo": "developing-today/code",
      "branch": "queue/iw195-7572-failover-slice",
      "sha": "cd94fd2580214e2542844fae5294bc27b2d489f4"
    },
    "auth_subject": "oc-code-08",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
id(worlds): execute spill v2 failover plans through the journal
cd94fd2
FailoverPlan::execute turns a plan into ordered, position-stamped
journal entries (revoke at e+1, grant at e+2), proving the sequence
against the lease state machine before any entry exists, so a stale
plan can never journal a grant ahead of its fence. The execution
names the grant position as the successor's replay barrier and the
intermediate holder-less state of the fence-to-grant window.

WorldActor::failover_write_lease plans from the journaled lease and
a grantor-side SpillPool and journals the entries in order,
advancing the live lease to the journaled prefix after each append;
the WorldHandle command path mirrors handoff_write_lease.

Refs #7572
@coderabbitai

coderabbitai Bot commented Nov 24, 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 20 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: 87e4d23a-3a28-414c-8329-2b8570214462
Commits

Reviewing files that changed from the base of the PR and between 6cfcfa6 and cd94fd2.

Files selected for processing: 4

  • pkgs/id/crates/id-worlds/src/world/actor.rs
  • pkgs/id/crates/id-worlds/src/world/handle.rs
  • pkgs/id/crates/id-worlds/src/world/spill_pool.rs
  • pkgs/id/crates/id-worlds/src/world/tests.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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit bb5032d into main Nov 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/iw195-7572-failover-slice branch November 24, 2026 17:40
@dezren39 dezren39 mentioned this pull request Nov 25, 2026
id(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier) #13711
Closed
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
id: spill v2 phase 1 — pool roster, reader-then-holder eligibility, automatic lease failover (#5787) #7572
Open
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.