Skip to content

refactor(ipc): group SSH and runtime-environment IPC handlers into ipc/ssh/ and ipc/runtime-environments/ - #30362

Merged
nwparker merged 1 commit into
mainfrom
nwparker/r2-m6-ipc-folders
Oct 18, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/r2-m6-ipc-folders

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 102 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​348 $\color{#cf222e}{\Huge{\mathbf{−}}}$​325 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23
Prod 113 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​473 $\color{#cf222e}{\Huge{\mathbf{−}}}$​450 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23

ELI5

src/main/ipc had about 130 SSH and runtime-environment IPC handler files sitting loose among everything else. This PR moves them into two subfolders, ipc/ssh/ and ipc/runtime-environments/. Nothing the app does changes.

What Changed

  • SSH handlers. src/main/ipc/ssh.ts, ssh.test.ts and every src/main/ipc/ssh-* file (47 files) move to src/main/ipc/ssh/ with git mv. Names are unchanged.
  • Runtime-environment handlers. src/main/ipc/runtime-environment*, orcad-* and managed-orcad-actions* (85 files) move to src/main/ipc/runtime-environments/ with git mv. Names are unchanged.
  • References rewritten:
    • imports and vi.mock paths in 69 importers;
    • path literals in reliability-gates.jsonc, ci-shard-timings.json and the compat-boundary importer list;
    • the Windows host lane's src/main/ipc/ssh-host-server-*.ts path filter.
  • E2E routing. Two route regexes (around lines 131 and 251) now accept an optional ssh/ or runtime-environments/ segment.
  • Moves only. git diff -M shows every moved file as a rename. The only edits inside them are their ../ import depth.

Why

This is round 2's folder plan (§4.2, M6): one concept per folder, so the SSH and runtime-environment IPC surfaces sit together and apart from the rest of ipc/.

Linked Issue

N/A (SSH hardening round 2, S11/M6).

Visual Proof

N/A: a pure file move.

Testing

  • typecheck:ci: clean.
  • All of src/main/ipc, src/main/ssh, src/main/managed-server and src/main/wsl, plus the e2e routing, orcad scope and compat-boundary config tests and every other changed test file, single worker: 1,092 files, 11,415 tests, all passing.
  • Path-literal, legacy-relay fence, compat-boundary and process-host import checks: pass.
  • Full local "static analysis and typecheck" job: clean.
  • Codex review (gpt-6.1-sol, high): clean.

…c/ssh/ and ipc/runtime-environments/

git mv plus import, vi.mock and path-literal rewrites; e2e route regexes and the Windows host lane
filter follow the moved handlers.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The change updates import and mock paths to match the nested runtime-environments and ssh IPC directories. It also updates workflow filters, test routing, reliability-gate references, compatibility baselines, and CI timing keys. The summaries report no changes to runtime behavior or public declarations.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to e6798

Historical test records no longer show the commands that produced their results. Restore those commands before merging, or accept this bounded audit-trail inaccuracy.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Description check Warning The description explains the change, rationale, affected paths, visual impact, and testing. However, it does not provide the required linked issue and omits several template sections, including Review… Add an actual issue reference after "Fixes #" or provide the required repository-approved issue link. Complete the missing template sections, including Review, Notes, Agent skill upstream boundary, and Checklist. Add the AI Disclosure secti…
Docstring Coverage Inconclusive 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 7 functions across 50 files. (153 skipped:… 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 summarizes the primary change: grouping SSH and runtime-environment IPC handlers into dedicated subdirectories.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, rationale, affected paths, visual impact, and testing. However, it does not provide the required linked issue and omits several template sections, including Review, Notes, the Agent skill upstream boundary, and the Checklist.

Resolution

Add an actual issue reference after "Fixes #" or provide the required repository-approved issue link. Complete the missing template sections, including Review, Notes, Agent skill upstream boundary, and Checklist. Add the AI Disclosure section if the contributor is external.

Full details: Docstring Coverage

Explanation

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 7 functions across 50 files. (153 skipped: 6 unsupported, 147 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 56adb79e-903a-4959-9b3b-51b021d3d1ba
📥 Commits

Reviewing files that changed from the base of the PR and between 658953d and e6798d4.

📒 Files selected for processing: 215
  • .github/workflows/ssh-windows-hosts.yml
  • config/legacy-relay-compat-tags-baseline.txt
  • config/legacy-relay-importers-baseline.txt
  • config/main-layout-writer-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/check-compat-boundary-imports.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/pr-e2e-route-contracts.test.mjs
  • config/scripts/pr-e2e-source-routing.mjs
  • config/scripts/vitest-node-runtime-files.mjs
  • config/scripts/vitest-sqlite-runtime-files.mjs
  • src/main/ai-vault/runtime-session-scanner.test.ts
  • src/main/ai-vault/runtime-session-scanner.ts
  • src/main/ai-vault/runtime-session-search-call.test.ts
  • src/main/ai-vault/runtime-session-search-call.ts
  • src/main/browser/doc-preview-file-reader.test.ts
  • src/main/browser/doc-preview-file-reader.ts
  • src/main/ephemeral-vm-runtime-ssh.test.ts
  • src/main/ephemeral-vm-runtime-ssh.ts
  • src/main/ipc/agent-session-attachment-upload.test.ts
  • src/main/ipc/agent-session-attachment-upload.ts
  • src/main/ipc/ai-vault-host-leg-cache-retention.test.ts
  • src/main/ipc/ai-vault-search.test.ts
  • src/main/ipc/ai-vault-unresolved-owner.test.ts
  • src/main/ipc/browser.ts
  • src/main/ipc/desktop-browser-bridge-wiring.test.ts
  • src/main/ipc/desktop-browser-bridge-wiring.ts
  • src/main/ipc/ephemeral-vm-managed-ssh.test.ts
  • src/main/ipc/ephemeral-vm-runtime-handlers.ts
  • src/main/ipc/ephemeral-vm.test.ts
  • src/main/ipc/managed-host-status-publication.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/ipc/runtime-environments/managed-orcad-actions.ts
  • src/main/ipc/runtime-environments/orcad-delta-move-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-delta-move-handlers.ts
  • src/main/ipc/runtime-environments/orcad-leave-behind-handlers.ts
  • src/main/ipc/runtime-environments/orcad-runtime-conversion-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-runtime-conversion-handlers.ts
  • 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-runtime-maintenance-handlers.test.ts
  • src/main/ipc/runtime-environments/orcad-runtime-maintenance-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-abortable-requests.ts
  • src/main/ipc/runtime-environments/runtime-environment-browser-client-host-handler.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-browser-client-host-handler.ts
  • src/main/ipc/runtime-environments/runtime-environment-call-queue.ts
  • src/main/ipc/runtime-environments/runtime-environment-capability-evidence.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-capability-evidence.ts
  • src/main/ipc/runtime-environments/runtime-environment-cli-removal-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-connectivity-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-diagnostics-broadcast.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-diagnostics-broadcast.ts
  • src/main/ipc/runtime-environments/runtime-environment-federated-read-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-federated-read-transport.bench.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-handler-channels.ts
  • src/main/ipc/runtime-environments/runtime-environment-host-dispatch.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-host-key.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-host-key.ts
  • src/main/ipc/runtime-environments/runtime-environment-host-service-ops.ts
  • src/main/ipc/runtime-environments/runtime-environment-managed-host-disconnect.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.ts
  • src/main/ipc/runtime-environments/runtime-environment-manual-disconnect.ts
  • src/main/ipc/runtime-environments/runtime-environment-mobile-relay-hosts.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-mobile-relay-hosts.ts
  • src/main/ipc/runtime-environments/runtime-environment-pairing-verification.ts
  • src/main/ipc/runtime-environments/runtime-environment-preference.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-preference.ts
  • src/main/ipc/runtime-environments/runtime-environment-recovery-handler.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-recovery-handler.ts
  • src/main/ipc/runtime-environments/runtime-environment-removal-cleanup.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-removal-cleanup.ts
  • src/main/ipc/runtime-environments/runtime-environment-removal-storage.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-repair-handler.ts
  • src/main/ipc/runtime-environments/runtime-environment-request-connections.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-request-connections.ts
  • src/main/ipc/runtime-environments/runtime-environment-retry-connections-probe.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-revision-guard.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-revision-guard.ts
  • src/main/ipc/runtime-environments/runtime-environment-session-reconcile.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-session-reconcile.ts
  • src/main/ipc/runtime-environments/runtime-environment-session-tabs-delta-decoding.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-session-tabs-delta-decoding.ts
  • src/main/ipc/runtime-environments/runtime-environment-session-tabs-delta.integration.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-shared-control-answers.ts
  • src/main/ipc/runtime-environments/runtime-environment-shared-control-support.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-connection.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-diagnostics.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-owner.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-probe.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-recovery.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-status-retirement.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-subscription-handlers.ts
  • src/main/ipc/runtime-environments/runtime-environment-subscription-identity.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-subscription-layout-recording.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-support-routing.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-support-routing.ts
  • src/main/ipc/runtime-environments/runtime-environment-tailscale-response.ts
  • src/main/ipc/runtime-environments/runtime-environment-transport-generation.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-transport-generation.ts
  • src/main/ipc/runtime-environments/runtime-environment-transport-routing-tailscale-hint.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-transport-routing.ts
  • src/main/ipc/runtime-environments/runtime-environment-unreachable-hint.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-unreachable-hint.ts
  • src/main/ipc/runtime-environments/runtime-environment-usage-record.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-ipc-test-harness.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/runtime-environments/runtime-environments.ts
  • src/main/ipc/runtime-upload-file-stream.test.ts
  • src/main/ipc/runtime-upload-file-stream.ts
  • src/main/ipc/runtime-upload-slice-boundaries.test.ts
  • src/main/ipc/runtime-upload-temp-sweep.test.ts
  • src/main/ipc/runtime-upload-temp-sweep.ts
  • src/main/ipc/settings.ts
  • src/main/ipc/skill-cloud-ipc-handlers.test.ts
  • src/main/ipc/skill-cloud-ipc-handlers.ts
  • src/main/ipc/skill-install-management-ipc-handlers.test.ts
  • src/main/ipc/skill-install-management-ipc-handlers.ts
  • src/main/ipc/ssh/ssh-app-shutdown.test.ts
  • src/main/ipc/ssh/ssh-browse.test.ts
  • src/main/ipc/ssh/ssh-browse.ts
  • src/main/ipc/ssh/ssh-connect-attempt-registry.ts
  • src/main/ipc/ssh/ssh-connect-decision-cancellation.test.ts
  • src/main/ipc/ssh/ssh-connect-flow.ts
  • src/main/ipc/ssh/ssh-connection-handlers.ts
  • src/main/ipc/ssh/ssh-connection-state-callbacks.ts
  • src/main/ipc/ssh/ssh-credential-cancel.test.ts
  • src/main/ipc/ssh/ssh-disconnect-cancellation.test.ts
  • src/main/ipc/ssh/ssh-handler-reregistration.test.ts
  • src/main/ipc/ssh/ssh-host-launch-session-note.test.ts
  • src/main/ipc/ssh/ssh-host-launch-session-note.ts
  • src/main/ipc/ssh/ssh-host-server-connect.ts
  • src/main/ipc/ssh/ssh-host-server-decision-failure.test.ts
  • src/main/ipc/ssh/ssh-host-server-on-connect-wiring.test.ts
  • src/main/ipc/ssh/ssh-host-server-on-connect-wiring.ts
  • src/main/ipc/ssh/ssh-host-sleep-reconnect.test.ts
  • src/main/ipc/ssh/ssh-host-sleep-reconnect.ts
  • src/main/ipc/ssh/ssh-host-user-disconnect.test.ts
  • src/main/ipc/ssh/ssh-host-user-disconnect.ts
  • src/main/ipc/ssh/ssh-ipc-context.ts
  • src/main/ipc/ssh/ssh-ipc-mock-shapes.ts
  • src/main/ipc/ssh/ssh-ipc-module-mocks.ts
  • src/main/ipc/ssh/ssh-ipc-test-harness.ts
  • src/main/ipc/ssh/ssh-managed-host-port-forward-lifecycle.test.ts
  • src/main/ipc/ssh/ssh-managed-port-forward-restore.ts
  • src/main/ipc/ssh/ssh-managed-server-unlink-broadcast.test.ts
  • src/main/ipc/ssh/ssh-passphrase.test.ts
  • src/main/ipc/ssh/ssh-passphrase.ts
  • src/main/ipc/ssh/ssh-port-forward-handlers.ts
  • src/main/ipc/ssh/ssh-port-forward-persistence.ts
  • src/main/ipc/ssh/ssh-port-forward-restore.test.ts
  • src/main/ipc/ssh/ssh-renderer-broadcast.ts
  • src/main/ipc/ssh/ssh-session-teardown.ts
  • src/main/ipc/ssh/ssh-shutdown-drain.ts
  • src/main/ipc/ssh/ssh-sign-in-requirement.test.ts
  • src/main/ipc/ssh/ssh-sign-in-requirement.ts
  • src/main/ipc/ssh/ssh-state-broadcast-fanout.test.ts
  • src/main/ipc/ssh/ssh-target-crud-handlers-ownership.test.ts
  • src/main/ipc/ssh/ssh-target-crud-handlers.ts
  • src/main/ipc/ssh/ssh-target-lifecycle-queue.ts
  • src/main/ipc/ssh/ssh-target-registry.test.ts
  • src/main/ipc/ssh/ssh-test-connection-probe-registry.test.ts
  • src/main/ipc/ssh/ssh-test-probe-presence.test.ts
  • src/main/ipc/ssh/ssh.test.ts
  • src/main/ipc/ssh/ssh.ts
  • src/main/ipc/wsl-host-gate-off.test.ts
  • src/main/ipc/wsl-host-handlers.ts
  • src/main/managed-server/lifecycle/orcad-managed-tunnel.ts
  • src/main/managed-server/lifecycle/orcad-runtime-conversion-wiring.ts
  • src/main/managed-server/lifecycle/orcad-runtime-conversion.ts
  • src/main/managed-server/lifecycle/orcad-runtime-deployment.ts
  • src/main/managed-server/lifecycle/orcad-runtime-status.ts
  • src/main/skills/skill-client-mediated-transfer-cancellation.test.ts
  • src/main/skills/skill-client-mediated-transfer.test.ts
  • src/main/skills/skill-client-mediated-transfer.ts
  • src/main/skills/skill-cloud-grant-installation.test.ts
  • src/main/skills/skill-cloud-grant-installation.ts
  • src/main/skills/skill-remote-error-category-parity.test.ts
  • src/main/skills/skill-remote-install-service.test.ts
  • src/main/skills/skill-remote-install-service.ts
  • src/main/skills/skill-runtime-capability.test.ts
  • src/main/skills/skill-runtime-capability.ts
  • src/main/ssh/legacy-relay/ssh-relay-version-mismatch-error.ts
  • src/main/ssh/orcad-migration-delta-move.test.ts
  • src/main/ssh/orcad-migration-delta-snapshot.test.ts
  • src/main/ssh/orcad-migration-repository-link.test.ts
  • src/main/ssh/orcad-runtime-maintenance.ts
  • src/main/ssh/orcad-ssh-provisioning.ts
  • src/main/ssh/runtime-ssh-access.ts
  • src/main/ssh/ssh-connection-reconnect-ladder.test.ts
  • src/main/startup/headless-serve-ssh-registration.test.ts
  • src/main/startup/headless-serve-ssh-registration.ts
  • src/main/startup/main-process-quit.ts
  • src/main/startup/main-process-runtime-launch-activation.test.ts
  • src/main/startup/main-process-runtime-launch.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/main/window/attach-main-window-services.test.ts
  • src/main/window/attach-main-window-services.ts
  • src/main/window/clipboard-agent-session-attachment-paste.test.ts
  • src/main/window/clipboard-ipc-handlers.test.ts
  • src/main/window/clipboard-runtime-image-upload.ts
  • src/main/window/clipboard-runtime-owned-ssh-paste.test.ts
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle-test-harness.ts
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle.test.ts
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle.ts

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

"runner": "local",
"platform": "macos",
"command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/runtime-environments-subscription-teardown.test.ts",
"command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/runtime-environments/runtime-environments-subscription-teardown.test.ts",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

git diff 658953dc23b90d3c637a20951669089f3ed04df8 e6798d4330c358e3ba5915443fd2258376fe3820 -- config/reliability-gates.jsonc | rg -n -C 5 '5318|evidenceRuns|currentCommand|subscription-teardown|terminal-hidden|ssh.test.ts'
sed -n '5300,5325p;10662,10684p;12120,12179p;18768,18783p' config/reliability-gates.jsonc
rg -n 'evidenceRuns|currentCommand' config/scripts/check-reliability-gates.mjs | head -60

Repository: stablyai/orca

Length of output: 42140


Preserve historical commands in dated evidence records.

The evidenceRuns[].command fields record the commands that produced the dated results. Keep those commands unchanged. Use relocated paths in commands, testFiles, and currentCommand where present.

@nwparker
nwparker merged commit 1938bd0 into main Oct 18, 2026
58 checks passed
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