Repository navigation
feat(id): phase 5 client/operations surface + gated enablement for region-seam handoff (#3904) - #9175
Conversation
…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.
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
|
🤖 Agent note · picked up
|
…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).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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:HandoffOperations::newstarts with handoffs off;begin_handoffrefuses withOpsError::HandoffsDisabledand 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.route_operationis the single decision for a client operation: while an entity is in transit, reads AND writes return the typed, retryableEntityInTransitstatus (design §4 — no entity snapshot projection exists, commands are never queued/replayed). A started handoff with no export yet still serves at the source.StaleRoutecarrying the new owner epoch and region-map epoch, retryable through the coordinator. The fenced source never serves again; epochs are monotonic.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.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit