Skip to content

feat(id): lease handoff actor boundary — spill handoff both ways + failure tests (#3805) - #10641

Merged
dezren39 merged 1 commit into
mainfrom
queue/5797-3805-lease-handoff
Nov 16, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5797-3805-lease-handoff

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Phase 3 (#3805) actor-boundary slice, resumed from the prior session's uncommitted work in the task worktree and verified by lane any-c (task 5797).

What this slice does:

  • World actor lease boundary: check_do_lease / holds_live_do_lease / handoff_write_lease in world/actor.rs (+ handle/mod wiring) — spill handoff initiation/completion at the actor seam in both directions (DO → native and native → DO handback).
  • Boundary rule: unjournaled in-flight commands from a non-holder get a retryable not-holder refusal (LeaseRejectionReason now carries thiserror messages: not_holder / stale_epoch / expired, all retryable).
  • Failure tests at the seam: DO→native handoff fences the DO executor and refuses queued commands; native→DO handback preserves the committed prefix and refuses uncommitted retry; expired native lease fences the DO until recovery is journaled; stale handoff proposals are refused and journal nothing; a failed handoff append leaves the DO holding but read-only.

Verified on the laptop (fleet-build-lock, pooled target dir):

  • cargo test -p id-worlds --lib -- world — 570 passed, 0 failed.
  • cargo test -p id-worlds --lib -- handoff lease walkthrough — 23 passed, 0 failed.

Remaining for #3805 acceptance (not in this slice, recorded on the issue): authenticated writer/epoch/op-id metadata on every mutation path; revoke/grant expiry recovery (expiry stays fail-closed); replay barrier + mirror position receipts; native transport; the four named failure-walkthrough scenarios (crash, partition, mid-turn expiry, mirror lag) at full fidelity.

Refs #3805. Phase 2 gate #3804 is closed (PR #5571 merged).


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

@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 08:48
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T08:48:34.435179Z
We couldn’t complete this review. Comment @codex review to try again.
0253086 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

@dezren39

Copy link
Copy Markdown
Member Author

Codex disposition (lane any-c, task 5797): the Codex code review on 0253086 did not complete — it failed on Codex usage limits ("You have reached your Codex usage limits for code reviews"), so there are no Codex findings to fix or rebut on this PR. Verification stands on the targeted tests run on the laptop: cargo test -p id-worlds --lib -- world 570 passed / 0 failed, and the handoff/lease filters 23 passed / 0 failed. Merging under the standing criteria.

@dezren39
dezren39 merged commit 11ea27c into main Nov 16, 2026
1 check failed
@dezren39
dezren39 deleted the queue/5797-3805-lease-handoff branch November 16, 2026 08:49
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