Skip to content

refactor(ipc): remove unreachable runtime-environment provisioning and control-retry IPC - #32960

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/dead-ipc-runtime-environments
Oct 24, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/dead-ipc-runtime-environments

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​330 $\color{#cf222e}{\Huge{\mathbf{−}}}$​328
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​263 $\color{#cf222e}{\Huge{\mathbf{−}}}$​261

ELI5

Main still answers four runtime-environment IPC channels that nothing in the app asks for: three for creating, resuming and listing "managed SSH host" provisioning requests, and one to retry a single host's control connection. No preload or renderer code calls the first three, and the renderer never calls the fourth. This deletes the dead paths.

What Changed

  • Removed the runtimeEnvironments:createOrcadSshHost, runtimeEnvironments:resumeOrcadSshHost and runtimeEnvironments:listPendingOrcadSshProvisioning handlers (orcad-ssh-provisioning-handlers.ts) and their registration in registerOrcadRuntimeLifecycleHandlers.
  • Removed src/main/ssh/orcad-ssh-provisioning.ts (createOrcadSshHost, resumeOrcadSshHost, listPendingOrcadSshProvisioning). Only those handlers used it.
  • Trimmed src/shared/orcad-ssh-provisioning.ts down to OrcadSshProvisioningIntent. The request, pending and result types had no other users.
  • Removed the runtimeEnvironments:retryControlConnection handler, retryRemoteRuntimeSharedControlConnectionNow (only that handler used it), the preload bridge method, the optional retryControlConnection? type on the runtime-environments API, and the web-preload no-op stub.
  • Dropped all four channels from RUNTIME_ENVIRONMENT_HANDLER_CHANNELS.

Kept on purpose:

  • The persisted SshTarget.orcadProvisioning field and OrcadSshProvisioningIntent. ssh-target-orcad-claims, isManagedOrcadSshTarget, the on-connect wiring and deployment still read and write them.
  • RemoteRuntimeSharedControlConnection.retryNow(). ensureRemoteRuntimeSharedControlConnection still calls it.
  • runtimeEnvironments:retryConnectionsNow (the all-hosts retry), which is live.

Why it's unreachable

  • Provisioning channels: git grep on main finds no ipcRenderer.invoke for any of the three channel strings, and no createOrcadSshHost, resumeOrcadSshHost or listPendingOrcadSshProvisioning in src/preload, src/renderer, mobile, tests or the CLI. History agrees: git log -S shows these names have never been in src/preload or src/renderer on main. The main handlers came over in the Phase 3 port (Phase 3: every SSH host runs a managed Orca server (orcad), replacing the relay, and orca serve runs on it #24863) without the bridge and UI. Those only ever lived on the closed POC branch (feat(orcad): consolidate Bun runtime and SSH/Remote migration #16741).
  • retryControlConnection: the preload method exists, but no renderer code calls runtimeEnvironments.retryControlConnection. Neither the direct name nor optional-call, destructured or aliased access turns up. The web build ships it as Promise.resolve(). Its only planned caller was the closed fix(remote-browser): a client-hosted tab survives a network outage instead of staying unavailable #25799 (client-hosted-browser-park-reattach), which never merged.
  • No generic forwarding: every preload ipcRenderer.invoke for these channels uses a literal string, and no preload forwards arbitrary channel names. No channel name is built from a template that could produce these.
  • Open PRs: I fetched the heads of all 4,363 open PRs and grepped them for every removed name. The only matches outside the files that define them are older copies of the preload bridge (src/preload/index.ts from before the bridge was split). That is a definition, not a call. No open PR calls any of these four methods.
  • Version compatibility: this is in-process IPC between preload and main, which always ship in the same build. No runtime RPC method is touched, so remote, web and mobile clients are unaffected.

Tests

  • Deleted orcad-ssh-provisioning-handlers.test.ts and orcad-ssh-provisioning.test.ts. Both tested only the removed module.
  • Deleted the retries one control connection without reversing manual disconnect intent case in runtime-environments-pairing.test.ts. It only exercised the removed handler.
  • orcad-runtime-lifecycle-handlers.test.ts no longer expects the provisioning registration.
  • Removed the stale retryRemoteRuntimeSharedControlConnectionNow mocks from 10 runtime-environment test harnesses.
  • Local checks:
    • pnpm tc passes.
    • oxlint on the changed files is clean.
    • pnpm run check:code-quality:changed passes.
    • pnpm format produces no diff.
    • pnpm test on src/main/ipc/runtime-environments, src/main/ipc/ssh, src/main/ssh, src/preload and src/renderer/src/web/preload-api: 305 files and 2993 tests pass.
    • The only failure is ssh-relay-endpoint-incumbent-shell.integration.test.ts (4 tests, which enumerate host processes). It fails the same way on the base commit.

…d control-retry IPC

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ 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: c035342f-614e-432e-b1a0-6366102117e5
📥 Commits

Reviewing files that changed from the base of the PR and between dad8735 and 90221f8.

📒 Files selected for processing: 23
  • src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-connectivity-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-federated-read-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-handler-channels.ts
  • src/main/ipc/runtime-environments/runtime-environment-request-connections.ts
  • src/main/ipc/runtime-environments/runtime-environments-call-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-capability-cache.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-pairing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-repair.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-status-diagnostics.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-lifecycle.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-teardown.test.ts
  • src/main/ipc/wsl-host-gate-off.test.ts
  • src/main/ssh/orcad-ssh-provisioning.test.ts
  • src/main/ssh/orcad-ssh-provisioning.ts
  • src/preload/api/runtime-api.ts
  • src/preload/api/runtime-environments-bridge.ts
  • src/renderer/src/web/preload-api/web-runtime-environments-api.ts
  • src/shared/orcad-ssh-provisioning.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent 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: 39318a6a-f85d-4ad7-8889-ecf429717352
📥 Commits

Reviewing files that changed from the base of the PR and between 87eccfe and dad8735.

📒 Files selected for processing: 23
  • src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-connectivity-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-federated-read-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-handler-channels.ts
  • src/main/ipc/runtime-environments/runtime-environment-request-connections.ts
  • src/main/ipc/runtime-environments/runtime-environments-call-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-capability-cache.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-pairing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-repair.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-status-diagnostics.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-lifecycle.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-teardown.test.ts
  • src/main/ipc/wsl-host-gate-off.test.ts
  • src/main/ssh/orcad-ssh-provisioning.test.ts
  • src/main/ssh/orcad-ssh-provisioning.ts
  • src/preload/api/runtime-api.ts
  • src/preload/api/runtime-environments-bridge.ts
  • src/renderer/src/web/preload-api/web-runtime-environments-api.ts
  • src/shared/orcad-ssh-provisioning.ts
💤 Files with no reviewable changes: 20
  • src/main/ipc/runtime-environments/runtime-environments-call-routing.test.ts
  • src/main/ssh/orcad-ssh-provisioning.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-status-diagnostics.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-request-connections.ts
  • src/main/ipc/runtime-environments/runtime-environments-capability-cache.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-repair.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-federated-read-routing.test.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-teardown.test.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-lifecycle.test.ts
  • src/main/ipc/wsl-host-gate-off.test.ts
  • src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.ts
  • src/preload/api/runtime-environments-bridge.ts
  • src/preload/api/runtime-api.ts
  • src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environments-subscription-routing.test.ts
  • src/renderer/src/web/preload-api/web-runtime-environments-api.ts
  • src/main/ssh/orcad-ssh-provisioning.ts
  • src/main/ipc/runtime-environments/runtime-environments-pairing.test.ts
  • src/shared/orcad-ssh-provisioning.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

📝 Walkthrough

The changes remove managed Orcad SSH provisioning operations, their IPC handlers, and related types and tests. They also remove the single-environment shared-control retry function, IPC channel, and preload API methods. The runtime channel list adds runtimeEnvironments:allowOrcadMoveLeavingBehind. Test mocks are updated to retain the bulk retry function.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to dad87

The removed internal APIs have no remaining repository callers, and no merge-blocking risk was identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the change, rationale, retained behavior, testing, and known baseline failure. However, it omits required template sections, including Linked Issue, Visual Proof with an N/A e… Add the missing template sections. Provide an actual linked issue or explain the applicable maintainer exception, state N/A for visual proof with a reason if no visual or interaction change exists, complete the review and impact notes, addr…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removal of unreachable runtime-environment provisioning and control-retry IPC.
Linked Issues check Passed No active directly linked issue remains. Issue #25799 is closed and supplies historical context only. It does not add coding requirements for this pull request.
Out of Scope Changes check Passed The changes remove the four stated unused IPC channels, their handlers, bridge declarations, dead provisioning code, and related tests and mocks. These changes support the stated cleanup objective. Th…
Full details: Out of Scope Changes check

Explanation

The changes remove the four stated unused IPC channels, their handlers, bridge declarations, dead provisioning code, and related tests and mocks. These changes support the stated cleanup objective. The channel-list diff removes the four target channels and does not add an unrelated channel.

Full details: Description check

Explanation

The description explains the change, rationale, retained behavior, testing, and known baseline failure. However, it omits required template sections, including Linked Issue, Visual Proof with an N/A explanation if applicable, Review, Notes, Agent skill upstream boundary, and Checklist.

Resolution

Add the missing template sections. Provide an actual linked issue or explain the applicable maintainer exception, state N/A for visual proof with a reason if no visual or interaction change exists, complete the review and impact notes, address the agent-skill boundary, and complete the checklist items.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · 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.

@OrcaWin
OrcaWin merged commit 861299e into main Oct 24, 2026
59 checks passed
treeman99 added a commit to treeman99/orca that referenced this pull request Oct 25, 2026
Conflicts 311 (DU 215, UD 9, UU 87). Most UU hunks were upstream's comment audit
rewriting comments beside fork lines: fork code kept, upstream comment taken.
- bundled skills: upstream now embeds SKILL.md text and installs in-app/CLI with no
  npx or network (stablyai#31662/stablyai#31688/stablyai#31867/stablyai#31918). The fork's offline engine
  (skills/packages extraResources, CLI runOfflineSkillMutation, update runner CLI
  injection) is retired; lock helpers kept as src/shared/skill-lock-file.ts.
  WSL bridge still prints npx upstream: the shared builder keeps printing
  `orca skills install`, retargeted to orca-ide for WSL.
- corporate skill bundle: freshness inventory deleted upstream; bundle-owned names
  now leave the app plan input (runtime-bundled-skill-install appInput); setup panel
  takeover moved to the in-app panel with a corporateOwned branch
- agent detection extracted to installed-agent-detection.ts: allowlist filter now
  wraps the extracted functions
- new gates: chat program publication for disallowed agents ('missing'); quick
  workspace chat-capable preference (pickTuiAgent chosenUsable) clears the allowlist
- upstream removed unreachable IPC (stablyai#32942 stablyai#32954 stablyai#32960): fork gates and tests on
  worktrees:listAll, dashboard popout spawn, retryControlConnection retired
- unregistered gates found in comment-only hunks registered in the ledger
  (agent-tab-shortcuts, quick-workspace, remote hook installers, terminal error toast,
  agents catalog install suggestions)
- vitest setup: fork isolation files appended after UNIT_SETUP_FILES
- installer-utils.test.ts hit max-lines: fork proxy cases moved to a fork-owned file
- corporate bundle state reads userData through the app-environment port (runtime
  electron ratchet)
- i18n merged key-by-key (base v1.4.238); locales pruned to the fork en key set
- lockfile regenerated from upstream with --lockfile-only; bun stays excluded

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant