Repository navigation
fix(orchestration): stop worker-list reporting a handed-on terminal as retained - #69
Merged
Merged
Conversation
…s retained A Dispatch whose terminal was transferred to a later Dispatch's resource has no owned resource, yet worker-list kept its handle and derived 'retained'. Treat a former owner named by a resource's prior owners as handed on, alongside the legacy same-process follow-up proof, so rows, counts and filters agree.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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).
Closed
DoozyX
added a commit
that referenced
this pull request
Nov 26, 2026
Merges stablyai/orca 840eeac (288 commits) into fork main 0d21b21. Conflict resolutions: - worker-terminal handed-on SQL: upstream names the follow-up a terminal went to (stablyai#48686); the fork also treats a terminal transferred to a later Dispatch's resource as handed on (#69). handed_on_to now names the follow-up, else the current holder of the row the Dispatch formerly owned, and handed_on is handed_on_to IS NOT NULL (every row has a holder). - federation: upstream's readiness deadline plus the fork's #29 rebinding pushed federation.ts past max-lines; the rebinding wait and its outcome move into federation-setup's waitForFederatedAgentReady. - local-worker-start: keep the fork's reminted pane handle (#29) and add upstream's slept-agent wake incarnation. - Claude launch: keep the fork's chrome-args split; add upstream's host MCP delivery imports. - Status bar usage: keep the fork's per-account entries and omp slot; carry upstream's compact bar, host label and WSL owner actions into them. The WSL owner placeholders use provider ids, since opencodeGo's id differs. - package.json: fork build:mac via build:native (now includes upstream's socket-owner helper) and build:mac:install; upstream build:mac:release. - Skills: keep the fork's plain `orca` CLI resolution (macOS-only fork); union the add-only digest ledger and regenerate manifest/sources. - Baselines pruned; the codex pane-isolation test now expects upstream's resume update-prompt suppression. Claude-Session: https://claude.ai/code/session_01BPjp5xUE1zMqoP6MDpiAdJ
DoozyX
added a commit
that referenced
this pull request
Nov 30, 2026
Merge stablyai/orca 395b551 (342 commits) into fork main 30107dc. Conflict resolutions (9 files), keeping fork behavior and upstream intent: - worker-terminal inventory: upstream SQL pushdown of terminal-state filters and counts (stablyai#52172) over the fork's JS scan; the fork's prior-owner handoff (#69) stays in WORKER_TERMINAL_HANDED_ON_TO_SQL, which the pushed-down retained predicate uses, so a handed-on Dispatch still lists no terminal. - electron-builder config: fork signing-identity / Touch ID requires plus upstream rmSync import; upstream's daily-channel removal (stablyai#52449) kept, and the fork-only channel test drops its daily cases. - build-computer-macos: fork single-arch copy vs universal lipo, then upstream's strip -x. - tsconfig.node: upstream inherited-git-env-setup rename (list now equals upstream). - package.json: upstream build:mac / build:mac:release via build:native, fork build:mac:install. - mobile client-context: fork RpcClientContext module plus upstream holdEntry. - status bar usage: fork account-entry roster plus upstream Antigravity notice row (stablyai#52953) and ProviderIcon size prop, fork omp icon sized too. Gates: install:release, mobile frozen install, pnpm tc, 22 conflict-area test files (94 tests), 3 worker-terminal perf contracts, #69 handed-on repro (fails on upstream's old SQL), check:changed --base=30107dced9e 54/55 with the load-timed-out worktree-removal-real-git test passing alone (16/16), build:mobile-web. Claude-Session: https://claude.ai/code/session_01BPjp5z8knubqaxZaD7QKW6
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
orca orchestration worker-listtold you a finished worker still held a terminal when that terminal had already been handed to a later worker. It now only says so when the worker really still has it.What Changed
Before: a failed worker whose terminal was reused by a later Dispatch showed
terminalState: retainedinworker-list, whileworker-showand the fleet projection said it had no terminal resource (absent/not_materialized). After: that worker shows no terminal state, matching the projection. A worker that owns a retained resource still showsretained.Mechanism: reusing a settled terminal moves its resource to the later Dispatch and records the old owner as a former owner. The old Dispatch kept its terminal handle and no resource, so
deriveWorkerTerminalListStatefell into its "handle without resource means retained" branch.WORKER_TERMINAL_HANDED_ON_SQLalready hid the handle for a same-process follow-up; it now also hides it when a resource names the Dispatch as a former owner. Listing, counts, the--terminal-statefilter and report-wait candidates share that constant, so they stay consistent.Why
The fix sits in the existing hand-on rule instead of changing the derive function, so legacy rows that have a handle and were never handed on keep their current
retainedvalue and nothing else is reinterpreted.Linked Issue
Fixes #38
Visual Proof
N/A: no UI change; CLI/runtime data only.
Testing
pnpm test src/main/runtime/rpc/methods/orchestration/worker/fleet/worker-list-pagination.test.ts --maxWorkers=2: 6 passed. The new test fails with the oldworker-terminal-inventory-counts.tsrestored (retainedinstead ofnull).pnpm check:changed: 53 checks passed.Platform: macOS only; the change is a SQL predicate with no platform-specific code.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Low. An extra index lookup runs per listed Dispatch that owns no resource. If it were wrong, a worker row would show no terminal state instead of
retained. A plain revert backs it out; no saved data changes.Level: Low
Review
Independent review round 1: clean (4 optional nits, 1 deferred pre-existing note).
Agent skill upstream boundary
Notes
Security, cross-platform, remote SSH, mobile and compatibility: no impact; internal query only.
Checklist