Repository navigation
fix(wsl): held terminals read as a sentence; a person's worktree create starts its own terminals - #35935
Conversation
…te starts its own terminals RPC errors for a terminal held on a stopped or unchecked WSL distro keep runtime_error but carry a readable message and the hold in data. A headless launch the runtime held records the coded wslDistroStopped skip. A worktree create someone asked for (UI, CLI, agent, paired client) starts its setup and default terminals as their act; an automation's create stays background.
[Medium impact] This PR appears safe to merge; no actionable issues were found. SummaryThis PR makes held-terminal RPC errors readable and records held automation launches as friendly skips. It also marks terminals from person-driven worktree creates as user actions.
No actionable issues were found. No tests were run during this review.
|
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
78f8f65f-2570-4b64-912e-b05e6e3317c6
Files selected for processing: 15-
src/main/automations/headless-dispatch-durability.test.tssrc/main/automations/headless-dispatch-runner.tssrc/main/ipc/worktree-remote.tssrc/main/ipc/worktrees-local-create-flow.test.tssrc/main/runtime/rpc/errors.test.tssrc/main/runtime/rpc/errors.tssrc/main/runtime/rpc/methods/worktree-create-args.test.tssrc/main/runtime/rpc/methods/worktree-create-args.tssrc/main/runtime/rpc/methods/worktree.test.tssrc/main/runtime/runtime-managed-worktree-create-types.tssrc/main/runtime/runtime-worktree-terminal-provisioning.test.tssrc/main/runtime/runtime-worktree-terminal-provisioning.tssrc/main/runtime/workspaces/workspace-activation.tssrc/main/runtime/workspaces/workspace-creation.tssrc/shared/wsl-distro-stopped-hold.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
| const hold = parseWslDistroHold(describeDispatchError(error)) | ||
| return hold ? automationRunFailure('wslDistroStopped', { distro: hold.distro }) : null |
There was a problem hiding this comment.
Do not describe an unverifiable distro as stopped.
When parseWslDistroHold returns unverifiable, this branch still creates a wslDistroStopped failure. Its run-history message says the distro is stopped, although Orca could not check its state. Keep the required skip and code, but use neutral failure copy for both states or render the message from hold.state. (raw.githubusercontent.com)
ELI5
When Orca holds a terminal because its WSL distro is stopped (#35813, #35865), some places still showed the raw code
terminal_held_wsl_distro_stopped:Ubuntu:Flag-off: applies to WSL bridge workspaces, which exist with
ORCA_INTERNAL_WSL_HOSTSunset too. Nothing changes for SSH, WSL-host (orcad) or non-WSL workspaces.User risk: low.
What Changed
wsl-distro-stopped-hold.ts):wslDistroHoldUserMessage(hold)gives the sentence, with stopped and unverifiable variants.wslDistroHoldRpcFailure(message)gives the RPC message anddata.rpc/errors.ts):mapRuntimeErrormaps a hold to the same code,runtime_error, with the readable message plusdata: { wslDistroHold: { distro, state } }.resolveTerminalPanerecovery and any other RPC-surfaced hold.headless-dispatch-runner.ts): a launch that rejects with a hold becomes askipped_unavailablerun with fix(automations): a scheduled run never starts a stopped WSL distro #35857'swslDistroStoppedcode. Any other launch error still fails with its own message. This was thelaunchAgentTerminaldedup path.buildManagedWorktreeCreateArgs(RPCworktree.createandagent.launch's create) setswslUserActunless the create carriesautomationProvenance.spawnLocalStartupAndSetupTerminalsinipc/worktree-remote.ts) marks its startup and setup terminals.RuntimeManagedWorktreeCreateArgs.wslUserActflows throughcreateInResolvedProject'screateTerminalandprovisionports (and the folder-workspace create).provisionWorktreeTerminalscarries it in the sharedsurfacingoptions, so every setup and default terminal gets it.Why
runtime_errormeans no client breaks, and the structured hold indatalets newer clients act on it.Linked Issue
N/A (maintainer change; follow-up to #35813, #35857 and #35865)
Visual Proof
N/A: wording only, no new UI.
Testing
errors.test.ts:runtime_error, with the sentence anddata;headless-dispatch-durability.test.ts: a held launch records thewslDistroStoppedskip, and another error still fails with its message.worktree-create-args.test.ts: a person's create setswslUserAct, and an automation's doesn't.runtime-worktree-terminal-provisioning.test.ts: every default terminal of a person's create carrieswslUserAct, and an automation's carry none.worktrees-local-create-flow.test.tsandworktree.test.ts: exact expectations now includewslUserAct. One redundant exact setup assertion becameobjectContainingto stay within max-lines; the setup command stays pinned in the neighbouring test.pnpm tc,pnpm run typecheck:ci,oxlint, the anti-slop lint,check:code-quality:changed, the ast-grep test and gates, the worktree IPC, workspace, RPC and automation suites, and the fullsrc/main/runtimesuite.structured-agent-shell-environment, failed under load and passes alone.Review
Agent skill upstream boundary
Notes
datais an optional addition. Older clients show the new message, which is clearer than the raw code.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)