Repository navigation
fix(orchestration): follow a reminted pane handle during worker readiness - #61
Merged
Merged
Conversation
…ness A session-graph reload remints a live pane's handle while worker-start waits on it, and the wait failed with terminal_handle_stale. Local and federated starts now wait once more on the same process under its new handle and rebind the worker's terminal custody row to it.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Nov 14, 2026
Closed
DoozyX
added a commit
that referenced
this pull request
Nov 22, 2026
Conflicts: project-group-operations.ts (kept fork Claude-account assignment helpers and upstream setProjectGroupParents); local-worker-start.ts (took upstream readiness structure, ported fork reminted-handle rebinding #61 into placed-worker-readiness.ts and handOver). Extracted recordClaudeBackgroundTasks and dashboardCardsKeepPositions to keep merged files under the max-lines fence. Claude-Session: https://claude.ai/code/session_01BPjp5w5YjQ5F2NAXKWuguC
DoozyX
added a commit
that referenced
this pull request
Nov 23, 2026
Upstream origin/main 0b23e7a (388 commits) into fork main 6f98610. Accepted upstream's test-suite cut (stablyai#46786) and dead card components (stablyai#46833) on all 44 modify/delete conflicts. Fork-feature regression tests removed with it: - #63: federation-worker-brief-agent-in-front, orchestration-structured-worker-retry - #67: federated-release-safety, federated-transport-safety, worker-release - #69: worker-list-pagination - claude accounts: repo-update-host-guard, claude-session-account-move - git graph: hosted-review-creation-gitlab-self-hosted - passkeys: main-process-ready-persistence-cleanup - branch cleanup: remove-worktree-branch-cleanup, worktree-remove-branch-deletion, remove-worktree - test isolation: dependency-security-release Fork-only tests that imported upstream-deleted fixtures were removed too. Code conflicts keep both sides: - Claude background evidence helper now uses upstream's running-task map (stablyai#47081); status payload carries fork monitoredWork + upstream backgroundCommands. - Worker start: upstream bindTerminal/handOver split reads the re-minted pane handle from setupStage (#29/#61); fork deadline brief guard (#63) plus upstream abort checks in preamble delivery. - Status bar: fork per-account usage roster with upstream's unreachable-host gating (stablyai#42644); a null account owner now shows no roster instead of local accounts. - client-ui-params.ts: moved feature-interaction schemas to their own module to stay under max-lines with the fork's omp status-bar fields. Gates: install:release, mobile frozen install, pnpm tc, mobile typecheck and typecheck:tests, conflict-area tests (38 files), independent review (1 finding, fixed), check:changed vs fork parent (only finding: upstream's unchanged bot-run-results.test.ts casts).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ELI5
When Orca reloads its window layout while a new worker is starting, the worker's terminal gets a new internal id. Orca kept waiting on the old id and reported the start as failed, although the agent was running fine.
What Changed
Before:
orca orchestration worker-startcould fail withterminal_handle_stalebefore the task was injected, leaving a live agent with no task.After: the readiness wait retries once on the pane's new handle when the same process is still behind it, and the worker is bound to that handle.
Mechanism:
waitForWorkerAgentReadyRebindingalready existed onmainbut nothing called it. Local worker start now goes through a smallwaitForWorkerStartAgentReadythat calls it and moves the creation custody row (rebindWorkerTerminalResourceHandle, matched on owner, old handle and process incarnation) to the new handle. The federated attach path calls the rebinding wait directly.Why
Retrying the whole start would launch a second agent beside the live one. Following the same process under its new handle keeps the one that already started. The pane key and process incarnation are read before the wait, so a different process in the same pane is never adopted.
Linked Issue
Fixes #29
Visual Proof
N/A: runtime behaviour in worker start; no UI change.
Testing
pnpm tc:nodeexit 0.pnpm test src/main/runtime/rpc/methods/orchestration/worker/testing/worker-run-dispatch-contracts.test.ts src/main/runtime/terminal/wait src/main/runtime/orchestration/legacy-remote --maxWorkers=2plus the federation tests: 314 passed, including the new case that rejects the first wait withterminal_handle_staleand expects the worker bound toterm_reminted. Not reproduced against a live Orca reload. macOS only.Risk
Level: Low
Only the
terminal_handle_stalepath during readiness changes. The riskiest part is the custody-row update; it is restricted to the same owner, old handle and process incarnation. Plain revert backs it out.Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Supersedes #54.