Repository navigation
refactor(runtime): split OrcaRuntimeService and compatibility tests - #17605
Conversation
|
Too many files changed for review (499 files, 100 file limit). Bypass the limit by tagging |
There was a problem hiding this comment.
Important
The split is mostly faithful, but two things need attention before merge: 172 implementation files now carry @ts-nocheck with a safety-net claim that does not hold up, and the refactor silently dropped three public members plus one characterization test despite the PR's stated "public exports stable" goal.
Reviewed changes
- Runtime service decomposition — the 43,928-line
OrcaRuntimeServicemonolith becomes a 58-line composition entrypoint over ~132 chainedOrcaRuntimeWith*extendsclasses (each ≤400 lines), withorca-runtime-core.ts/orca-runtime-state-fields.ts/orca-runtime-postlude.tsholding shared types, constants, and constructor wiring. - Browser/file adapter splits —
orca-runtime-browser.tsbecomes theruntime-browser-commands-*chain andorca-runtime-files.tsbecomesruntime-file-commands-*, keeping theRuntimeBrowserCommands/ command-surface entrypoints. - Compatibility suite split — the 52k-line test file becomes an ordered top-level
await import(...)aggregator (orca-runtime.test.ts) overorca-runtime-tests/*.spec.tsfragments with dedicated mock, fixture, lifecycle, and scenario-builder setup. - Guards and baselines — new
orca-runtime-module-size.test.ts(400-line ratchet) andruntime-extraction-regressions.test.ts; four retired entries removed fromconfig/max-lines-baseline.txt.
⚠️ 172 implementation files are now type-unchecked, and the claimed AST-equivalence guard does not exist
The original orca-runtime.ts had zero @ts-nocheck directives — it was fully covered by pnpm tc:node. After the split, 172 of the 529 non-test files in src/main/runtime/ begin with // @ts-nocheck -- mechanically split from OrcaRuntimeService; behavior is covered by AST equivalence and characterization tests. That claim is not substantiated: there is no AST or structural equivalence test anywhere in the repo, and the only new guard, runtime-extraction-regressions.test.ts, contains three tests (skill-discovery wiring, getOrchestrationDbIfAvailable returning null, and the session-inventory capability gate) — none of which compare split output against the original. pnpm tc:node now passing says nothing about the split implementation.
Technical details
# title: restore type checking (or a real equivalence guard) for the split modules
## Affected sites
- `src/main/runtime/orca-runtime-core.ts:1` — representative `@ts-nocheck` header repeated across 172 non-test files
- `src/main/runtime/runtime-extraction-regressions.test.ts` — the only new "extraction" guard; 3 tests, no AST comparison
- `src/main/runtime/orca-runtime-module-size.test.ts` — counts lines only, no behavioral/structural check
## Required outcome
- Either remove `@ts-nocheck` from the split modules and make them type-check under `pnpm tc:node`, or
- Add the claimed AST/structural equivalence test that compares each split module against the original 43k-line file, and
- In both cases correct the header comment so it does not reference a non-existent guard.
## Why it matters
- A typo'd method reference, a renamed symbol, or a broken `this` access anywhere in the ~132-class `extends` chain now surfaces only at runtime (if at all), because nothing in CI type-checks these files.
- The 1,215-test characterization suite exercises behavior and passes, but it is not an equivalence check and cannot catch type-level drift.
## Open questions for the human
- Is the `@ts-nocheck` blanket temporary (follow-up PR to re-enable types) or intended to be permanent?⚠️ Three public members of OrcaRuntimeService were silently dropped, and one characterization test vanished
Comparing the split against the original file shows the refactor was not a pure 1:1 transform. Three public members of OrcaRuntimeService were removed without any callout in the PR body, and the characterization suite lost exactly one test.
Technical details
# title: restore or explicitly retire the dropped public surface
## Affected sites (original locations)
- `orca-runtime.ts:40846` — `jiraSearchUsers(query?, siteId?)` removed; no replacement in `runtime-jira-commands.ts`, and the `searchUsers as searchJiraUsers` import was also dropped
- `orca-runtime.ts:41284` — `browserOpenUrlOnClient` bound field removed, along with the underlying `RuntimeBrowserCommands.browserOpenUrlOnClient` (old `orca-runtime-browser.ts:1732`); the new browser chain has no `browserOpenUrl*` method
- `orca-runtime.ts:6629` — `shouldRelayTerminalBrowserOpens()` removed; its characterization test `relays terminal browser launches only while headless owns the graph` (old `orca-runtime.test.ts:3138`) was dropped, not relocated
## Evidence
- Original suite: 1134 `it(` blocks; new fragments: 1133. A name-by-name diff shows the single dropped test is the `shouldRelayTerminalBrowserOpens` one.
- Repo-wide search shows none of the three members have live callers (no RPC registration, renderer, CLI, or shared reference), so this is likely dead public surface rather than an active break.
## Required outcome
- Restore the three members (and the test), or
- If intentional, document the removals in the PR description — "public exports stable" currently reads as false.
## Open questions for the human
- Were these intentionally pruned as dead surface, or lost during the split?ℹ️ Nitpicks
orca-runtime-module-size.test.ts:14-17— the guard's own message says "every split implementation module," but the filter only matchesorca-runtime.ts,orca-runtime-*,runtime-browser-commands-*, andruntime-file-commands-*; theruntime-*families this PR also introduces (runtime-linear-*,runtime-worktree-*,runtime-terminal-*,runtime-github-*,runtime-gitlab-*,runtime-repository-*) are unguarded. No file currently exceeds 400 lines, so this is latent, but broadening the filter would make the guard honest.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
6f3dfbc to
8e327dd
Compare
There was a problem hiding this comment.
Important
This delta restores the three public members the prior review flagged as dropped (jiraSearchUsers, browserOpenUrlOnClient, shouldRelayTerminalBrowserOpens) and ports the remaining compatibility fixes; I verified every restored member and fix byte-for-byte equivalent to origin/main. I'm not approving yet because the prior review's type-checking concern is still open: 172 implementation files still carry @ts-nocheck, and no AST/structural equivalence guard exists to back the header comment's claim.
Reviewed changes
- Restored dropped public members —
jiraSearchUsers,browserOpenUrlOnClient, andshouldRelayTerminalBrowserOpensare back, re-registered over RPC asjira.searchUsersandbrowser.openUrl, with theshouldRelayTerminalBrowserOpenscharacterization test re-added inwindow-authority.spec.ts. - Admission-tier threading —
getHostedReviewExecutionOptionsnow carries aGitAdmissionTierthrough hosted-review branch lookup ('background'), create/eligibility ('interactive'), refresh (admissionTierForRefreshReason), andcloneRepo. - Structured-session visibility persistence —
publishStructuredAgentSessionTab/closeStructuredAgentSessionTabnow drivesetSessionTabVisibility, and startup restoration prefersgetPersistedVisibleSessionTabIndexwhen present. - Owner-record fidelity — the two
resolvePaneAgentOwnercall sites now useresolvePaneAgentOwnerRecordand threadownerIsLaunchintonormalizeCompatibleAgentTitleForOwner/resolveCompatibleAgentTypeForOwner. - Strict worktree reconciliation — worktree-create verification now uses
listWorktreesSharedStrict+resolveCreatedWorktree(withdescribeCreatedWorktreefallback) instead of the lenientlistWorktrees+findCreatedWorktree. - Skill-share cancellation barrier — a post-preparation
if (signal?.aborted)check restores the pre-publish cancellation barrier, covered by a new test. - Hook transport env cleanup —
ORCA_AGENT_HOOK_TRANSPORTrejoins the agent-hook env list and its stale-value removal test.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…-refactor # Conflicts: # src/main/runtime/orca-runtime-files.ts
…nfirmed contract Audit follow-ups for the OrcaRuntimeService split: - Freeze the 171 @ts-nocheck files behind a ratchet so no new file can disable type checking. The split's linear mixin chain cannot express forward references yet, so the existing suppressions are grandfathered; the baseline may only shrink. - Drop the stray @ts-nocheck at the end of orca-runtime-get-status.ts. It sat after the first statement, where TypeScript ignores it, so the module was already checked. - Restore `retireRejectedPty(ptyId, stopConfirmed: boolean)` as a required argument. The split widened it to optional and patched the resulting error with `stopConfirmed === true`; an omitted argument would have silently taken the unverified-stop path instead of failing to compile. - Guard that every orca-runtime-tests fragment is imported by the compatibility entrypoint. The fragments are .spec.ts, which no Vitest include glob matches, so one left out of the list would silently stop running.
…-refactor main hoisted the runtime-local `runtimeWorktreeIdsEqual` into a shared `worktreeIdsEqual` (stablyai#17428) inside the file this branch split apart. Kept the split and ported the change into the module that now owns that code: runtime-worktree-path-identity.ts delegates to the shared implementation instead of keeping its own copy, so the duplicate the upstream commit was removing does not survive the merge. All 51 call sites keep their import.
There was a problem hiding this comment.
Important
The delta's headline mitigation — freezing the grandfathered @ts-nocheck set behind a ratchet — is wired into lint but never executes in desktop PR CI, so the guard currently enforces nothing.
Reviewed changes
@ts-nocheckratchet — newcheck-ts-nocheck-ratchetscript (plus a 171-entry baseline and unit tests) freezes the grandfathered set so any new file carrying the directive fails; the ratchet is appended to thelintaggregate.- Stray directive removal —
orca-runtime-get-status.tsdrops its trailing// @ts-nocheck, which sat after the first statement where TypeScript ignores it (verified: tsc still reports errors past that point). - Stop-confirmed contract restore —
retireRejectedPty(ptyId, stopConfirmed: boolean)is required again and passes the boolean through directly, reverting the split's optional widening plus=== truepatch. - Fragment coverage guard —
orca-runtime-test-fragment-coverage.test.tsasserts everyorca-runtime-tests/*.spec.tsfragment is imported exactly once from the compatibility entrypoint. - Worktree identity consolidation — the split now re-exports the shared
worktreeIdsEqual(from theorigin/mainmerge) asruntimeWorktreeIdsEqual; I verified the shared implementation is byte-identical to the removed local function.
⚠️ The @ts-nocheck ratchet never runs in desktop PR CI
The ratchet is this delta's core response to the still-open type-checking concern, but it is only appended to the lint aggregate script. Desktop PR CI's static_analysis job does not invoke pnpm lint — it runs discrete steps, and its two sibling ratchets (check:max-lines-ratchet, check:runtime-electron-ratchet) each get their own step while check:ts-nocheck-ratchet does not. The only workflows that run pnpm lint are mobile.yml (mobile workspace) and docs.yml (docs workspace). A new @ts-nocheck file would therefore pass every desktop PR check today. And even once wired, note the ratchet only freezes the set — it does not restore type checking for the 171 grandfathered modules or substantiate the per-file AST equivalence header claim, so the prior merge-blocker stands regardless.
Technical details
# Title: run the ts-nocheck ratchet in desktop PR CI
## Affected sites
- `package.json:14` — `check:ts-nocheck-ratchet` added to the `lint` aggregate, which PR CI never invokes
- `.github/workflows/pr.yml` `static_analysis` — has steps for `check:max-lines-ratchet` and `check:runtime-electron-ratchet` but no `check:ts-nocheck-ratchet` step
## Required outcome
- Add an explicit `pnpm run check:ts-nocheck-ratchet` step to the `static_analysis` job in `.github/workflows/pr.yml`, mirroring the two sibling ratchet steps, so the gate actually runs on every desktop PR.
## Why it matters
- The freeze is the intended enforcement layer for the type-unchecked split; unwired, it provides false assurance and the PR's validation section overstates what CI will catch.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…pped Audit findings against the refactor's true base (ad5ba25): - retirePtyAgentLaunchAuthority collected pane keys after deleting the restored-authority receipt instead of before it. collectPaneKeysForPty reads that receipt, so a receipt-only pane lost its key and never had its agent-hook compatibility authority retired. on-pty-exit.ts already carried a comment naming this exact invariant. - The PTY-exit path kept orchestrationMailboxNotifications.retirePty but lost the loop that schedules a debounced mail-pointer repoint for the dead pty's terminal handle and any run bound to its panes. Restores the schedule call count to 7, matching base. - subscribeToPtyExit lost isPtyKnownExited's leaf fallback and its post-registration lifecycle-generation recheck. leavesByPtyId is rebuilt from the renderer graph independently of ptysById, so a leaf can outlive its pty record; without the fallback a caller waiting on an already-dead pty never gets released. - The chain root declared `[key: string]: unknown`, which base had nowhere. It leaked through the exported runtime type into every consumer, so any misspelled member access typechecked as unknown instead of erroring, and it accounted for 957 of the suppressed errors. Removing it costs zero type errors.
…ation Two more behaviors the split dropped, each with a regression test that fails against the pre-fix code: - The worker-exit escalation stopped deriving its title through buildOrchestrationTaskDisplayMetadata and inlined `task.spec` instead. That ignored an explicit task_title, dropped the single-line normalization and the 80-character bound, and turned the no-spec case into a quoted, duplicated id. A multi-paragraph spec landed verbatim in the coordinator's banner. The existing 11 tests all use short single-line specs, where the derived title and the raw spec are identical, so none of them could see it. Also reverts an added `if (!handle) return` guard: the dispatch lookup is deliberately keyed on the pane as well, because a reminted handle no longer matches the row while the pane identity outlives the remint. - updateAutomation stopped going through automationChangePublications and published `source` unconditionally while gating the fallback on a non-null destination. A destination the store can no longer name then published only the stale source, so subscribers scoped elsewhere kept rendering a row that had left them — the exact case the helper documents. The helper had been left with zero callers; all three sites use it again.
…sh hosts Follow-ups from auditing the skill install path against the refactor's base: - resolveWorktree wrapped showManagedWorktree in `.catch(() => null)`, so a transient git or IO failure surfaced to the user as skill-install-workspace-not-found with the real cause discarded. Errors propagate again; a genuine id mismatch still returns null. - resolveSkillSshTarget threw skill-install-workspace-host-unavailable when the execution host was neither local nor ssh, on both the repo and folder branches. Base gated these on connectionId, so a runtime-owned repo simply was not an SSH install and fell through to the local path. Both return null again, and the error code the split invented is now unreferenced. - listManagedSkillInstalls awaited the receipt walk and the worktree resolve in sequence. They are independent and either can hit disk, WSL, or an SSH scan, so Promise.all is restored. Deliberately unchanged: resolving the worktree through listResolvedWorktrees rather than showManagedWorktree, which disambiguates a worktree id colliding across hosts and is covered by its own test, and the SSH-folder skill-install-ssh-dispatch-required throw, which matches the repo branch.
…-refactor main advanced 45 commits, six of them landing inside the orca-runtime.ts this branch splits apart. Git resolves that as a plain "take one side", and either side silently loses work, so each was ported into the module that now owns the code: - stablyai#17655 bound ref and worktree scans -> runtime-repository-ref-queries - stablyai#17448 preserve user-set workspace names -> the worktree-create modules - stablyai#17667 cut cold worktree-switch attach latency -> the mutation lock, including the deletion half (worktree-terminal-mutation-wait.ts is gone) - stablyai#17718 preserve large agent prompt pastes -> the agent-prompt write path - stablyai#17486 unblock targeted SSH session tab refresh -> the mobile refresh modules - stablyai#17159 close readiness gaps -> 34 runtime hunks and 5 test hunks Every added line of the six was checked against the merged tree; the unmatched ones are all renames or line splits, verified individually. Two defects surfaced while porting, both predating this merge: - isMobileSessionSurfaceMembershipAllowed read a session accessor that answers null where main's answers undefined, so main's `session !== undefined` guard was always true and the fence stopped fencing. Three clauses found in neither main nor the split base had been added ahead of it to compensate, and one of them dropped a freshly published split leaf out of syncWindowGraph. Restored to main's control flow with the sentinel normalized; stablyai#17159's two new tests cover it from both directions. - retiredMobileSessionPtyIds was write-only state this branch invented. Its only reader was the clause above, and it exists in neither main nor the split base. - RuntimeTerminalWriter.writeAgentPrompt had no callers and still carried the chunked-paste shape stablyai#17718 replaced.
Pre-merge auditAudited as a claimed pure refactor. It is not one — the extraction renames methods into service classes and, in two places, changes behavior deliberately. Nine behavior regressions were found and fixed on the branch; every one was green in CI beforehand. Fixed
#9 shipped with the original split and survived 1,176 tests plus a full green CI. It surfaced only because upstream landed a test that happened to walk into it. Also removed: Three regression tests added, each verified to fail against the pre-fix code. Guards added
Merge
Not addressed — needs a feature review, not refactor sign-off
|
The stablyai#17448 port added a third import from ../ipc/worktree-logic, which the code-quality oxlint config rejects under --deny-warnings. Plain oxlint does not flag it, so it only surfaced in CI's static analysis job.
pr-workflow-lint-parity requires every leaf command in `pnpm lint` to have a matching step in pr.yml. The ratchet was wired into lint but not the workflow, so PR CI would not have enforced it.
…launch evaluate main advanced 9 commits; none touch the orca-runtime.ts this branch splits, so nothing needed porting. CI failed twice on `Execution context was destroyed` thrown from headless-paired-runtime-host's first `evaluate` after launch — a different spec each run, which is the signature of the flake stablyai#17780 describes rather than a regression. That commit added retryTransientMainEvaluate and adopted it in five helpers but not this call site, even though its docblock names exactly this case: the first evaluate after electron.launch() resolves, before the app is ready. Wrapped it the same way.
There was a problem hiding this comment.
Important
No new issues in this delta — the three restoration commits and the origin/main merge re-sync all verify byte-for-byte against the base — but the standing merge-blocker is unchanged: 171 implementation files still carry @ts-nocheck, and check:ts-nocheck-ratchet is still absent from desktop PR CI, so the freeze enforces nothing.
Reviewed changes
- Restored four dropped behaviors —
collectPaneKeysForPtyis now read beforeretirePtyAgentLaunchAuthoritydeletes the restored-authority receipt; theonPtyExitmail-pointer repoint loop is back;subscribeToPtyExitregainsisPtyKnownExited's leaf fallback plus its post-registration lifecycle-generation recheck; and the[key: string]: unknownindex signature is removed from the chain root. - Restored escalation prose and unscoped automation publication — worker-exit escalation titles derive through
buildOrchestrationTaskDisplayMetadata, and the three automation mutation sites route throughautomationChangePublicationsagain. - Restored skill-install error propagation — transient lookup errors propagate instead of surfacing as
skill-install-workspace-not-found; non-ssh hosts returnnullinstead of hard-erroring; and the receipt walk + worktree resolve run in parallel. - Merged
origin/main— re-synced the split modules with upstream terminal/PTY/mobile/worktree changes (handle-replacement fencing, durable headless-terminal retirement, PTY-close surface authority, absent-tab adjudication, shared/exclusive worktree mutation lock, atomic agent-prompt paste, repo-search limit clamping, worktree display-name resolution).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Important
The ts-nocheck ratchet is now wired into desktop PR CI, closing the prior CI-enforcement gap. The substantive merge-blocker is unchanged, however: 171 implementation files still carry @ts-nocheck with a header that claims "covered by AST equivalence and characterization tests", but no type-checking or structural-equivalence guard backs that claim.
Reviewed changes
- Wired
check:ts-nocheck-ratchetinto PR CI —bb7f38bfb7adds anEnforce ts-nocheck ratchetstep topr.ymlstatic_analysis(between the max-lines and Electron-import ratchet steps), satisfyingpr-workflow-lint-parity. The ratchet passes locally (171 grandfathered, no new suppressions), so the freeze is now actually enforced on desktop PRs. - Merged duplicate
worktree-logicimports —c8332b98e0collapses a third../ipc/worktree-logicimport inruntime-local-worktree-create-candidate.tsthatoxlint --deny-warningsrejected. - Merged
origin/main— including the paired-host launch evaluate retry and unrelated upstream fixes.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
main's #17605 split RuntimeFileCommands into a mixin chain and gutted orca-runtime-files.ts to a re-export barrel, so every guard this branch added sat in a file that no longer holds the code. Resolved orca-runtime-files.ts to main's barrel verbatim and ported each guard to the method's new home: - the mutation funnel (resolveFileExplorerMutationPath/Paths) into runtime-file-commands-search-local-runtime-files.ts, beside the read funnel it wraps - the ten mutation methods and their 13 resolveAuthorizedMutablePath sites into runtime-file-commands-write-file-explorer-file.ts and runtime-file-commands-create-file-explorer-dir-no-clobber.ts, preserving which operands pass followsLink - assertMutableHostPath into runtime-file-commands-write-terminal-artifact-file.ts Verified by intent, not by compiling: neutering all 3 isRepositoryAdminPath call sites turns 51 of 119 tests red, matching the pre-merge figure, so the guards are still attached to the code the RPC actually reaches. All 13 authorization sites remain downstream of their SSH early-return and the funnel remains above the fork in every method.
Upstream split OrcaRuntimeService into modules (stablyai#17605); the two call sites this PR touches moved out of orca-runtime.ts, so the same lines are re-applied in their new homes: the leaderPaneKey pass-through in orca-runtime-create-terminal.ts and the resolver injection plus paneKey plumbing in orca-runtime-resolve-terminal-split-source-authority.ts. Everything else auto-merged. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gHoNRQpffLLRjf6aSDDWc
`resolveOmittedHostScopeSelectors` documented `omittedHostIds` as built partly from workspace sessions and explicitly rejected filtering any id out of it. The sourcing rule changed in #18595 and the comment has to change with it, or the next reader finds a comment contradicting the code and re-derives the whole investigation — which is how this bug survived #17605, where a mechanical split carried the code across and dropped the comment explaining it. The disclosure duty is unchanged: a repo, folder workspace, mirrored row, or resolved worktree on a `runtime:` host is content the listing did not cover, so it stays named. A bare `workspaceSessionsByHostId` partition is not a gap — the client holds no repo, worktree, or row behind it.
…tablyai#17605) * refactor(runtime): split OrcaRuntimeService into focused modules * test(runtime): cover admission tiers and strict worktree reconciliation * fix(runtime): preserve owner and structured session visibility * fix(runtime): port post-extraction compatibility fixes * fix(runtime): preserve skill-share cancellation barrier * test(runtime): update identity inventory after extraction * fix(runtime): preserve hook transport environment cleanup * fix(runtime): consolidate idle probe imports * test(runtime): retire split file process allowlist entry * fix(runtime): route child process types through shared boundary * test(runtime): preserve worktree host metadata precedence * fix(runtime): update extracted test seams * fix(runtime): gate the split's ts-nocheck set and restore the stop-confirmed contract Audit follow-ups for the OrcaRuntimeService split: - Freeze the 171 @ts-nocheck files behind a ratchet so no new file can disable type checking. The split's linear mixin chain cannot express forward references yet, so the existing suppressions are grandfathered; the baseline may only shrink. - Drop the stray @ts-nocheck at the end of orca-runtime-get-status.ts. It sat after the first statement, where TypeScript ignores it, so the module was already checked. - Restore `retireRejectedPty(ptyId, stopConfirmed: boolean)` as a required argument. The split widened it to optional and patched the resulting error with `stopConfirmed === true`; an omitted argument would have silently taken the unverified-stop path instead of failing to compile. - Guard that every orca-runtime-tests fragment is imported by the compatibility entrypoint. The fragments are .spec.ts, which no Vitest include glob matches, so one left out of the list would silently stop running. * fix(runtime): restore four behaviors the OrcaRuntimeService split dropped Audit findings against the refactor's true base (9dd3804): - retirePtyAgentLaunchAuthority collected pane keys after deleting the restored-authority receipt instead of before it. collectPaneKeysForPty reads that receipt, so a receipt-only pane lost its key and never had its agent-hook compatibility authority retired. on-pty-exit.ts already carried a comment naming this exact invariant. - The PTY-exit path kept orchestrationMailboxNotifications.retirePty but lost the loop that schedules a debounced mail-pointer repoint for the dead pty's terminal handle and any run bound to its panes. Restores the schedule call count to 7, matching base. - subscribeToPtyExit lost isPtyKnownExited's leaf fallback and its post-registration lifecycle-generation recheck. leavesByPtyId is rebuilt from the renderer graph independently of ptysById, so a leaf can outlive its pty record; without the fallback a caller waiting on an already-dead pty never gets released. - The chain root declared `[key: string]: unknown`, which base had nowhere. It leaked through the exported runtime type into every consumer, so any misspelled member access typechecked as unknown instead of erroring, and it accounted for 957 of the suppressed errors. Removing it costs zero type errors. * fix(runtime): restore escalation prose and unscoped automation publication Two more behaviors the split dropped, each with a regression test that fails against the pre-fix code: - The worker-exit escalation stopped deriving its title through buildOrchestrationTaskDisplayMetadata and inlined `task.spec` instead. That ignored an explicit task_title, dropped the single-line normalization and the 80-character bound, and turned the no-spec case into a quoted, duplicated id. A multi-paragraph spec landed verbatim in the coordinator's banner. The existing 11 tests all use short single-line specs, where the derived title and the raw spec are identical, so none of them could see it. Also reverts an added `if (!handle) return` guard: the dispatch lookup is deliberately keyed on the pane as well, because a reminted handle no longer matches the row while the pane identity outlives the remint. - updateAutomation stopped going through automationChangePublications and published `source` unconditionally while gating the fallback on a non-null destination. A destination the store can no longer name then published only the stale source, so subscribers scoped elsewhere kept rendering a row that had left them — the exact case the helper documents. The helper had been left with zero callers; all three sites use it again. * fix(skills): stop swallowing lookup errors and hard-erroring on non-ssh hosts Follow-ups from auditing the skill install path against the refactor's base: - resolveWorktree wrapped showManagedWorktree in `.catch(() => null)`, so a transient git or IO failure surfaced to the user as skill-install-workspace-not-found with the real cause discarded. Errors propagate again; a genuine id mismatch still returns null. - resolveSkillSshTarget threw skill-install-workspace-host-unavailable when the execution host was neither local nor ssh, on both the repo and folder branches. Base gated these on connectionId, so a runtime-owned repo simply was not an SSH install and fell through to the local path. Both return null again, and the error code the split invented is now unreferenced. - listManagedSkillInstalls awaited the receipt walk and the worktree resolve in sequence. They are independent and either can hit disk, WSL, or an SSH scan, so Promise.all is restored. Deliberately unchanged: resolving the worktree through listResolvedWorktrees rather than showManagedWorktree, which disambiguates a worktree id colliding across hosts and is covered by its own test, and the SSH-folder skill-install-ssh-dispatch-required throw, which matches the repo branch. * fix(runtime): merge duplicate worktree-logic imports The stablyai#17448 port added a third import from ../ipc/worktree-logic, which the code-quality oxlint config rejects under --deny-warnings. Plain oxlint does not flag it, so it only surfaced in CI's static analysis job. * ci: run the ts-nocheck ratchet in PR checks pr-workflow-lint-parity requires every leaf command in `pnpm lint` to have a matching step in pr.yml. The ratchet was wired into lint but not the workflow, so PR CI would not have enforced it. * Merge remote-tracking branch 'origin/main' and retry the paired-host launch evaluate main advanced 9 commits; none touch the orca-runtime.ts this branch splits, so nothing needed porting. CI failed twice on `Execution context was destroyed` thrown from headless-paired-runtime-host's first `evaluate` after launch — a different spec each run, which is the signature of the flake stablyai#17780 describes rather than a regression. That commit added retryTransientMainEvaluate and adopted it in five helpers but not this call site, even though its docblock names exactly this case: the first evaluate after electron.launch() resolves, before the app is ready. Wrapped it the same way.

Summary
OrcaRuntimeServiceimplementation with focused, domain-named runtime modules and a small composition/export entrypoint.Validation
pnpm test src/main/runtime/orca-runtime.test.ts— 1,216 passed, 1 skipped.pnpm tc:node— passed.pnpm check:max-lines-ratchet— passed; 44 grandfathered suppressions, no new bypasses.pnpm run check:code-quality:changed— passed; 0 new findings across 494 changed files.oxlint,oxfmt --check, andgit diff --check— passed.mainmerge and is mergeable.Unrelated pre-existing worktree edits were intentionally left unstaged and are not part of this PR.