Skip to content

Arrival never moves a card checkout off its creation anchor, and puts one already off it back keeping her work (Kimi, card f76005e8) - #5877

Merged
joelteply merged 5 commits into
canaryfrom
f76005e8/arrival-never-moves-a-card-checkout-off
Nov 8, 2026
Merged

joelteply merged 5 commits into
canaryfrom
f76005e8/arrival-never-moves-a-card-checkout-off

Conversation

@joelteply

@joelteply joelteply commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

How it serves the minds: Kimi on the Windows node cannot submit. Her checkout left the base its work is measured from and could never come back. This is the recovery, and the guard that keeps it from happening again (goal 2: a resident's merged PR).

What happened (Codex da817b0e, 2026-11-08 16:11Z)

What changed

Arrival (moved whole into persona/workspace_transfer/arrival.rs; workspace_transfer.rs went from 1,030 lines to 658):

  • Stale remote branch: a remote whose tip does not contain the checkout's creation anchor gives RemotePredatesAllocation, and the tree is left untouched.
  • Already off its anchor: realign_to_anchor runs first. When HEAD provably left its anchor, it keeps HEAD whole under a stranded ref (dirty edits are committed, with no hooks run), counts the commits no remote carries, and puts the branch back on the anchor (Realigned). Her work is never replayed for her.
  • Proof before change: proven_ancestry uses git's exit codes (GitError.code): 0 is yes, 1 is no, anything else is no answer.
  • Locking: arrive_locked holds CHECKOUT_SYNC, the lock the act-end sync holds. It runs under the claim's hands admission (continuum_process::holding needs one; card staging had none). The lock guard also goes into the blocking history fetch, so an arrival that is dropped keeps the checkout locked until that git ends.

Callers:

  • off_creation_anchor: no anchor, or HEAD not descended from it.
  • Claim staging and submit route such a checkout through the stager.
  • A held turn restages only an anchorless checkout, since a realignment on a turn could not tell her.
  • ArrivalOutcome::notice reaches her. ClaimWorkspace::Ready carries it, and a submit right after a Realigned or an AncestryUnknown refuses with it.

Measured

  • Local (IntelMac, 2021af1 on canary 8dfe0ba, 2026-11-08): continuum-mind workspace_transfer + card_checkout + card_staging gave 28 passed. The new tests cover:
    • a stale remote branch that predates the allocation;
    • a checkout already off its anchor;
    • unproven ancestry in a shallow clone;
    • a dropped arrival that keeps the lock until its history fetch ends.
  • Mutations:
    • Comparing the pid without its start time fails the realign test.
    • Moving the guard out of the blocking task fails the cancellation test.
  • Windows (Codex, independent): 2021af1 gave 16/16 on workspace_transfer, plus both of Codex's own shallow regressions: the fresh prevention case, and recovery of the already-broken checkout with her exact WIP kept on the stranded ref.
  • Before merge:
  • Owed after deploy (owner Cormac): Kimi's checkout on the Windows node is realigned, her WIP is on the stranded ref, and she can submit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

joelteply and others added 3 commits November 8, 2026 10:47
… one already off it back, keeping her work (card f76005e8)

Kimi on the Windows node, 2026-11-08 16:11Z (Codex da817b0e): after #5873 re-allocated her clone at
canary bcbd4aa, arrival fetched her old card branch (e5fe473, off another line), the remote won,
and her anchor left HEAD, so work/submit refused.

workspace_transfer:
- arrive_over: a remote whose tip does not contain the creation anchor is RemotePredatesAllocation
  (tree untouched); unproven ancestry (shallow clone, missing commit) is AncestryUnknown, never
  adopted on a guess. proven_ancestry answers only with complete history and both commits present.
- arrive -> realign_to_anchor first: a checkout whose HEAD provably left its anchor keeps HEAD whole
  (dirty edits committed, no hooks) under a stranded ref, counts the commits no remote carries, and
  goes back on the anchor (Realigned). Her work is never replayed for her.
- ArrivalOutcome::notice says what she must know; Staging::Ready carries the notable arrival,
  ClaimWorkspace::Ready shows it, and a submit right after a realignment refuses with it (her work
  is on the stranded ref).
callers: off_creation_anchor (no anchor, or HEAD not descended from it) routes claim staging and
submit through the stager; a held turn restages only an anchorless checkout, since a realignment
there could not tell her.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…Mac): proven ancestry with exit codes, history completed for a shallow departed checkout, arrival under the checkout lock, AncestryUnknown said (Codex e302c1d0, f37a1861)

- GitError carries git's exit code; is_ancestor: exit 0 yes, exit 1 no, anything else no answer.
- proven_ancestry: a yes is proof in any clone; a no only with complete history.
- arrive_locked: CHECKOUT_SYNC held across the arrival; first complete_history_if_departed
  (shallow + anchor + exit-1 no -> airc complete_card_history under airc's network bound), then
  the arrival within ARRIVE_BOUND. Every git keeps the lock until it has ended.
- realign: an unproven departure is AncestryUnknown, never realigned; its notice reaches her and
  a submit refuses with it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…olds the checkout lock in its blocking task; arrival runs under the claim's hands admission (Codex b7194c2c)

- workspace_transfer.rs 1030 -> 658: the arrival concern moved whole to arrival.rs (380).
- complete_history_if_departed moves an Arc of the lock guard INTO spawn_blocking, so an
  arrival dropped mid-fetch keeps the checkout locked until airc's git ends. The completer is a
  fn parameter (prod: airc complete_card_history). Test: a dropped arrival leaves the lock held
  until a 600 ms stand-in fetch ends; without the guard in the task it fails.
- arrive_for takes the claim's HandsContext and runs arrive_locked under hands_gate::admitted:
  continuum_process::holding needs an admission, and card staging had none, so without it every
  arrival would have failed 'holding needs an admission'. No claim / closing hands = a named failure.
- shallow test: the anchor is an older commit fetched at depth 1 (present, cut off from the tip).

Ratchets: blocked only on four inherited text matches in touched files (git_bridge out_of_time,
workspace_transfer classify_push_error / is_missing_remote_ref, a [..8] cut) that #5867 replaces;
asked Fable to land that slice first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply joelteply changed the title Arrival split into workspace_transfer/arrival.rs; the history fetch holds the checkout lock in its blocking task; arrival runs under the claim's hands admission (Codex b7194c2c) Arrival never moves a card checkout off its creation anchor, and puts one already off it back keeping her work (Kimi, card f76005e8) Nov 8, 2026
joelteply and others added 2 commits November 8, 2026 12:17
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…rites

Integrates the typed outcome and porcelain portions of Fable PR5867 into the split arrival owner. Preserve off-anchor WIP, cancellation custody, and the real WorkSubmit recovery fixture. Route citizen metadata through the existing citizens disk class.
@joelteply
joelteply merged commit 0bb5d73 into canary Nov 8, 2026
62 checks passed
@joelteply
joelteply deleted the f76005e8/arrival-never-moves-a-card-checkout-off branch November 8, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant