Repository navigation
refactor(ipc): remove unreachable runtime-environment provisioning and control-retry IPC - #32960
Conversation
…d control-retry IPC Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reachedYou'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. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
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>
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
runtimeEnvironments:createOrcadSshHost,runtimeEnvironments:resumeOrcadSshHostandruntimeEnvironments:listPendingOrcadSshProvisioninghandlers (orcad-ssh-provisioning-handlers.ts) and their registration inregisterOrcadRuntimeLifecycleHandlers.src/main/ssh/orcad-ssh-provisioning.ts(createOrcadSshHost,resumeOrcadSshHost,listPendingOrcadSshProvisioning). Only those handlers used it.src/shared/orcad-ssh-provisioning.tsdown toOrcadSshProvisioningIntent. The request, pending and result types had no other users.runtimeEnvironments:retryControlConnectionhandler,retryRemoteRuntimeSharedControlConnectionNow(only that handler used it), the preload bridge method, the optionalretryControlConnection?type on the runtime-environments API, and the web-preload no-op stub.RUNTIME_ENVIRONMENT_HANDLER_CHANNELS.Kept on purpose:
SshTarget.orcadProvisioningfield andOrcadSshProvisioningIntent.ssh-target-orcad-claims,isManagedOrcadSshTarget, the on-connect wiring and deployment still read and write them.RemoteRuntimeSharedControlConnection.retryNow().ensureRemoteRuntimeSharedControlConnectionstill calls it.runtimeEnvironments:retryConnectionsNow(the all-hosts retry), which is live.Why it's unreachable
git grepon main finds noipcRenderer.invokefor any of the three channel strings, and nocreateOrcadSshHost,resumeOrcadSshHostorlistPendingOrcadSshProvisioninginsrc/preload,src/renderer,mobile,testsor the CLI. History agrees:git log -Sshows these names have never been insrc/preloadorsrc/rendereron 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 callsruntimeEnvironments.retryControlConnection. Neither the direct name nor optional-call, destructured or aliased access turns up. The web build ships it asPromise.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.ipcRenderer.invokefor 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.src/preload/index.tsfrom before the bridge was split). That is a definition, not a call. No open PR calls any of these four methods.Tests
orcad-ssh-provisioning-handlers.test.tsandorcad-ssh-provisioning.test.ts. Both tested only the removed module.retries one control connection without reversing manual disconnect intentcase inruntime-environments-pairing.test.ts. It only exercised the removed handler.orcad-runtime-lifecycle-handlers.test.tsno longer expects the provisioning registration.retryRemoteRuntimeSharedControlConnectionNowmocks from 10 runtime-environment test harnesses.pnpm tcpasses.oxlinton the changed files is clean.pnpm run check:code-quality:changedpasses.pnpm formatproduces no diff.pnpm testonsrc/main/ipc/runtime-environments,src/main/ipc/ssh,src/main/ssh,src/preloadandsrc/renderer/src/web/preload-api: 305 files and 2993 tests pass.ssh-relay-endpoint-incumbent-shell.integration.test.ts(4 tests, which enumerate host processes). It fails the same way on the base commit.