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 — feat(id): phase 5 client/operations surface + gated enablement for region-seam handoff (#3904) by dezren39 · Pull Request #9175 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 13, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Implements #3870 phase 5 (issue #3904) — client/operations surface + gated enablement for region-seam handoff, per design #2818 §8 packet 5. The hard gate is now satisfied: phase 4 issue #3903 closed via PR #9000 (merged 7904547).

Phases 1-4 built the journal, source fence, import primitive, and the Coordinator state machine, but the coordinator was wired to no client surface: no feature gate, no routing decision, no observability. This PR adds world::handoff_operations:

  • Feature gate, disabled by default. HandoffOperations::new starts with handoffs off; begin_handoff refuses with OpsError::HandoffsDisabled and journals nothing. Enablement is an explicit operator act (set_enabled). Turning the gate off strands nothing: in-flight handoffs keep status/routing answers and can still complete.
  • Fail-closed client routing. route_operation is the single decision for a client operation: while an entity is in transit, reads AND writes return the typed, retryable EntityInTransit status (design §4 — no entity snapshot projection exists, commands are never queued/replayed). A started handoff with no export yet still serves at the source.
  • Stale-route response. A client presenting a route that disagrees with the owner map (e.g. the old source route after completion) gets typed StaleRoute carrying the new owner epoch and region-map epoch, retryable through the coordinator. The fenced source never serves again; epochs are monotonic.
  • Age/reason observability. ops_snapshot(now) returns per-handoff age, time since last journaled progress, stage, machine-readable reason (awaiting_source_export / awaiting_destination_import / awaiting_coordinator_completion / stuck_no_progress_over_threshold), in-transit count, and the stuck count (60s threshold, STUCK_THRESHOLD_MS) that alerting keys off. Stuck remains an alert classification only — no completion, rollback, or re-route.
  • Coordinator::tracked_entities() added so the surface can enumerate the owner map without the map leaving the coordinator.

Acceptance suite (in-module tests): drives a full crossing with duplicate export delivery — no completion without a matching durable import, no write served at the source after export, exactly one completion/owner transition for repeated receipts, journal replay reproducing the post-completion routing — plus gate-default-off, fail-closed reads+writes, stuck boundary at exactly 60s, unknown-entity refusal, and gate-off-mid-flight.

Tests: cargo test -p id-worlds — 756 passed, 0 failed (7 new). Clippy clean for the new module.

Task 5867 (queue repo-health-code-pilot), lane code-c.


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

Summary by CodeRabbit

  • New Features
    • Added handoff routing that identifies entities in transit and flags outdated client routes with the current region and owner version.
    • Handoff operations can be enabled or disabled; handoffs are disabled by default, while routing and status checks remain available.
    • Added operation snapshots showing active handoffs, their progress and age, and which have stalled.

Sorry, something went wrong.

Uh oh!

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

All reactions
repo-worker-tmp-code-b
feat(id): phase 5 client/operations surface + gated enablement for re…
c3230b4
…gion-seam handoff (#3904)

HandoffOperations over the phase-4 Coordinator: feature gate disabled by default (begin_handoff refuses and journals nothing while off), fail-closed routing for reads and writes while in transit with the typed EntityInTransit status, typed StaleRoute response carrying the new owner epoch, and an ops snapshot exposing per-handoff age/reason plus the stuck count for alerting. Coordinator gains tracked_entities() for enumeration. Acceptance suite drives a full crossing with duplicate receipt delivery and journal replay: no completion without a matching durable import, no write served at the source after export, exactly one completion/owner transition, replay reproduces routing. Handoffs remain disabled by default; enablement is an explicit operator act.
@dezren39
dezren39 requested a review from a team as a code owner November 13, 2026 02:25
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The change adds a handoff operations API that wraps Coordinator. It gates handoff starts, routes reads and writes according to transit and ownership state, and reports active handoffs in snapshots. The world module re-exports the new types.

Changes: Handoff operations

Layer / File(s) Summary
Define routing and operations contracts
pkgs/id/crates/id-worlds/src/world/coordinator.rs, pkgs/id/crates/id-worlds/src/world/handoff_operations.rs, pkgs/id/crates/id-worlds/src/world/mod.rs
Coordinator::tracked_entities returns sorted entity references. The world module declares the operations module and re-exports its routing, operations, and snapshot types.
Implement handoff operations
pkgs/id/crates/id-worlds/src/world/handoff_operations.rs
HandoffOperations gates handoff starts and provides transit-status lookup, operation routing, and snapshots with handoff age and stuck status.
Validate routing, handoff progression, and recovery
pkgs/id/crates/id-worlds/src/world/handoff_operations.rs
Tests cover gate behavior, routing decisions, snapshots, handoff progression, generated operation sequences, and journal-prefix recovery.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant HandoffOperations
  participant Coordinator
  Client->>HandoffOperations: route_operation(entity_ref, presented route)
  HandoffOperations->>Coordinator: inspect transit and owner state
  Coordinator-->>HandoffOperations: transit or current owner state
  HandoffOperations-->>Client: RouteDecision
Loading
Merge Risk: Moderate · up to ca168

The new handoff operations feature works as described, but its acceptance tests use operations the project lints deny, without the required exemption. The repository's Clippy check will fail. Add the lint allowance to the test module before merging; production behavior is not affected.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution timed out

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •
edited
Loading

Uh oh!

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

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-14T06:22:16.255598Z
We couldn’t complete this review. Comment @codex review to try again.
ca16812 New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3230b4e6f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread pkgs/id/crates/id-worlds/src/world/handoff_operations.rs Resolved

Uh oh!

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

@dezren39 dezren39 mentioned this pull request Nov 13, 2026
id: implement #3870 phase 5 — client/operations surface + gated enablement for region-seam handoff #3904
Closed
@github-actions github-actions Bot assigned dezren39 Nov 13, 2026
@dezren39 dezren39 mentioned this pull request Nov 14, 2026
id: HandoffOperations client-routing invariants lack generated/model coverage (from PR #9175) #9793
Closed
@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 14, 2026
@dezren39

dezren39 commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · picked up

  • Agent: repo-queue-worker lane code-b
  • Session / ID: task 16476 (pr_shepherd)
  • Task: Add generated/model coverage for HandoffOperations routing invariants (issue id: HandoffOperations client-routing invariants lack generated/model coverage (from PR #9175) #9793, Codex P1 thread r4558973564), verify targeted tests, disposition the Codex thread, and merge under the standing criteria.
  • Verified at pickup: PR open, head c3230b4, no held labels; flagged file exists only on this branch.
All reactions

Sorry, something went wrong.

Uh oh!

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

repo-worker-tmp-code-b
test(id-worlds): generated/model coverage for HandoffOperations routi…
ca16812
…ng (#9793)

Extend the generated model to the phase-5 operations surface: proptest sequences drive gate toggles, begin_handoff, receipt observation, completion, cancellation and crash recovery through HandoffOperations, checking routing (both kinds; absent/correct/stale presented routes), the unknown-entity refusal, and the full ops_snapshot against an explicit model oracle after every transition. A deterministic companion test checks journal-prefix recovery against the same oracle. Dispositions the Codex P1 on PR #9175 (discussion r4558973564).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
dezren39 merged commit db524b4 into main Nov 14, 2026
1 check failed

Uh oh!

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

@dezren39
dezren39 deleted the queue/5867-3904-phase5-client-ops branch November 14, 2026 06:28
@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 14, 2026
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
id: implement: journaled region-seam export/import #3870
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

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

Assignees

@dezren39 dezren39

Labels

audit:complete PR fully implemented spawning issue

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.