Skip to content

fix(orchestration): observe created workers during pending startup - #9

Merged
DoozyX merged 3 commits into
mainfrom
DoozyX/retro-1-codex-readiness
Oct 6, 2026
Merged

DoozyX merged 3 commits into
mainfrom
DoozyX/retro-1-codex-readiness

Conversation

@DoozyX

@DoozyX DoozyX commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​137 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​137
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​39 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​26

ELI5

A worker that is still starting should remain readable while its terminal belongs to the same process. A disconnected SSH worker should remain unverifiable until its host supplies a verdict.

What Changed

Previously, orca orchestration worker-show could report identity_changed and worker-read could fail while a supervised worker start was still pending. They now recognize the terminal recorded when that start created it, provided the pane and process still match. Moving the same pane to another tab preserves access; a replaced process or an uncertain start remains excluded.

Pending SSH starts now report unverifiable rather than exited when the host verdict is missing, using the host recorded with the created terminal. Regression tests cover these cases, and the slow-exit release fixture supplies the newly consumed database method.

The agent_readiness wait is unchanged. The reported readiness timeout did not reproduce on current main; Codex readiness now comes from rule files that handle headerless Codex screens.

Why

The terminal record proves which process this start created without granting worker authority before readiness. Retaining pane equivalence supports tab moves without accepting another process. The release fixture supplies its real dependency instead of hiding the missing method behind an optional-call fallback in production code.

Linked Issue

Fixes #1

Visual Proof

N/A — no visible UI change; this changes orchestration CLI/RPC observation output only.

Testing

Tested on macOS only. SSH behavior is covered by unit regressions, not a live remote.

  • I manually tested these changes locally — no live app or remote test.
  • Automated tests added/updated.

Commands and results:

  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/runtime/rpc/methods/orchestration/worker/: 343/343 tests passed at the final revision.
  • env -u TMPDIR ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/runtime/terminal-close-slow-agent-exit.test.ts: 4/4 passed after the three missing-method failures were reproduced before the fixture fix.
  • pnpm tc: passed.
  • pnpm exec oxlint src/main/runtime/rpc/methods/orchestration/worker/starting-worker-terminal-identity.ts src/main/runtime/rpc/methods/orchestration/worker/worker-observation.ts src/main/runtime/rpc/methods/orchestration/worker/worker-terminal-custody-at-creation.test.ts src/main/runtime/terminal-close-slow-agent-exit.test.ts: passed.
  • pnpm exec oxfmt --check on the changed files: passed across the fix rounds.
  • pnpm run check:code-quality:changed 6b85338989d7c952ccb3d1d681f21dce7d696202: passed.
  • git diff --check 6b85338989d7c952ccb3d1d681f21dce7d696202..8ecf08001eeee361426cc80e8b5ec72d447e6040: passed.
  • env -u TMPDIR ORCA_BACKGROUND_LAUNCH=1 pnpm test: exit 1; 11,012 files passed and 13 failed. Three pre-existing failure files were config/scripts/check-changed-code-quality.test.mjs, src/shared/agent-resume-argv-drop.test.ts, and tests/e2e/relay-region-correction.unit.test.ts. All ten additional failure files passed sequential isolated reruns with env -u TMPDIR ORCA_BACKGROUND_LAUNCH=1 pnpm test <file>; these failures occurred under host load. The full suite was not green.

Full pnpm lint and pnpm build were not run; direct oxlint, formatting, the changed-code gate, and typechecking ran instead.

Review

Three review rounds; final verdict clean.

Agent skill upstream boundary

  • Not applicable.

Notes

Security: process identity remains required; observation does not grant startup authority.

Cross-platform: no operating-system-specific logic added; only macOS tested.

SSH: a missing host verdict remains unverifiable; unit coverage only.

Mobile: no mobile UI change; existing observation consumers receive the corrected verdict.

Compatibility: no new wire fields or opcodes; pending-start observation behavior changes for existing clients.

Performance: the missing-verdict path may read one existing terminal record; readiness polling is unchanged.

Checklist

  • This PR is small and focused.
  • I explained what changed and why.
  • Visual proof is N/A with a reason.
  • Self-reviewed for correctness, security, and performance.
  • Cross-platform, SSH/remote, and path/shortcut impact considered.
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass — narrower checks passed as listed above; the full suite retains the documented failures, and full lint/build were not run.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c9b25c6e-c4cc-492b-bb32-b2076ba05700
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

@DoozyX
DoozyX merged commit cc3714c into main Oct 6, 2026
29 of 33 checks passed
DoozyX pushed a commit that referenced this pull request Oct 20, 2026
…win projections stay on their host (review-5 #2 #9 #11) (stablyai#30890)

* fix(renderer): host writes route only through the strict owner, and twin projections stay on their host (review-5 #2 #9 #11)

A selected ssh: host that two paired servers proxy now resolves ambiguous at the one
selected-host resolver, so no caller can fall back to this app's own SSH connection.
File Explorer and SSH mutation expectations derive the full {endpoint, place} pair from
resolveOwner, so a server folder's nested SSH target stays the write's host. A local
lineage write projects onto its own host's rows only. The id-only store-write ratchet
now also covers persistence repo-row lookups by id alone (review-5 #10's shape).

* fix(ratchet): the id-only lookup scan also sees optional chaining and destructured ids

* fix(renderer): an unstamped folder keeps reading its host from its repos; editor focus fallback left for a follow-up

* docs(renderer): the File Explorer owner comment names its folder fallback
@DoozyX
DoozyX deleted the DoozyX/retro-1-codex-readiness branch November 15, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

orchestration: Codex worker readiness times out before task injection despite Ready terminal

2 participants