Skip to content

refactor(orcad): orcad artifacts live under orcad/ and node-runtime/ - #27963

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-3-3
Oct 12, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-3-3

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2
Prod 35 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​149 $\color{#cf222e}{\Huge{\mathbf{−}}}$​264 $\color{#cf222e}{\Huge{\mathbf{−}}}$​115

ELI5

Code that prepares orcad's files and the pinned Node runtime lived in the ssh/ folder, but the local orcad server also needs it, so orcad/ imported from ssh/ and ssh/ imported from orcad/. This PR moves that code to where it belongs: orcad files under src/main/orcad/, the pinned Node runtime under a new src/main/node-runtime/. ssh/ imports them; they no longer import ssh/.

What Changed

Users see no difference: the files moved, the code did not change.

  • To src/main/orcad/: orcad-artifact-materializer (+ test), orcad-host-unavailable (+ test), and build-toolchain-diagnosis. The diagnosis module keeps only the probe, parser and install hint that node-pty-precondition.ts uses. Five relay-era formatters with no callers are deleted: shouldProbeBuildToolchainAfterNativeDepsFailure, formatSkippedNodePtyWarning, formatMissingToolchainError, isNodeHeadersDownloadFailure and formatNodeHeadersDownloadError.
  • To src/main/node-runtime/: pinned-runtime-materializer (+ 2 tests), runtime-archive-download (+ test) and orcad-cache-path. These are its private helpers; nothing else imports them.
  • Importers in ssh/, ipc/, wsl/, ai-vault/ and orcad/ are re-pointed, including the vi.mock paths.
  • CI keeps the same coverage. The runtime-launcher protocol ratchet lists the new paths. The SSH hostile-host and Windows-host workflow path filters now include the moved files. Node-server qualification still treats them as cross-host. Shard timings were renamed.

Dependency direction after this PR: ssh → orcad, ssh → node-runtime, orcad → node-runtime. Two orcad → ssh imports remain, both in orcad-profile-state-startup.ts (ssh-host-key-store, orcad-held-fence-tokens). They set up SSH-owned profile files at startup and are outside this PR's file list.

Net: production −115 (+153/−268, mostly the trimmed diagnosis module), tests +2.

Why

Phase 3.99 layout rule: host-side orcad artifacts live under orcad/ or node-runtime/, and ssh/ imports them, never the reverse. The local orcad serve path needs the materializers without anything SSH-specific. Moving the pinned runtime's private helpers with it, rather than leaving them in ssh/, is what stops the new folder importing back into ssh/.

Linked Issue

N/A, internal Phase 3.99 cleanup (PR 3.3).

Visual Proof

N/A, no UI or behaviour change.

Testing

  • rg finds no reference to the old paths in src config tests mobile .github (@ts-nocheck files included). The only hits are two synthetic path strings inside node-server-change-scope.test.mjs fixtures, which build their own module tree. The deleted formatters have zero references.

  • pnpm test src/main/orcad src/main/node-runtime src/main/ssh/orcad src/main/ssh/ssh-host-server src/main/ipc/ssh-host-server src/main/wsl/wsl-pinned-runtime src/main/ai-vault/opencode-wsl plus the routing/ratchet config tests: 163 files, 1703 tests pass.

  • pnpm tc, pnpm lint, pnpm run check:code-quality:changed (0 findings), build:electron-vite, build:cli, build:orcad.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

P0/P1 review: my own review plus an independent reviewer.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

SSH/WSL/Windows: same code, new paths. The legacy relay bridge uses none of the moved files. Wire: no change.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5bccac1f-65c0-4414-8602-c3f5b03be703

📥 Commits

Reviewing files that changed from the base of the PR and between 93e0b80 and eb7a579.


📒 Files selected for processing (52)
  • .github/workflows/ssh-hostile-hosts.yml
  • .github/workflows/ssh-windows-hosts.yml
  • config/scripts/check-runtime-launcher-protocol-ratchet.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/node-server-qualification.mjs
  • config/scripts/packaged-orcad-template.cjs
  • src/main/ai-vault/opencode-wsl-runtime-preparation.test.ts
  • src/main/ai-vault/opencode-wsl-runtime-preparation.ts
  • src/main/ipc/ssh-host-server-on-connect-wiring.test.ts
  • src/main/ipc/ssh-host-server-on-connect-wiring.ts
  • src/main/node-runtime/orcad-cache-path.ts
  • src/main/node-runtime/pinned-runtime-materializer-node.test.ts
  • src/main/node-runtime/pinned-runtime-materializer.test.ts
  • src/main/node-runtime/pinned-runtime-materializer.ts
  • src/main/node-runtime/runtime-archive-download.test.ts
  • src/main/node-runtime/runtime-archive-download.ts
  • src/main/orcad/build-toolchain-diagnosis.ts
  • src/main/orcad/node-pty-precondition.ts
  • src/main/orcad/orcad-artifact-cache-retention.ts
  • src/main/orcad/orcad-artifact-materializer.test.ts
  • src/main/orcad/orcad-artifact-materializer.ts
  • src/main/orcad/orcad-host-unavailable.test.ts
  • src/main/orcad/orcad-host-unavailable.ts
  • src/main/orcad/orcad-local-serve-selection.ts
  • src/main/orcad/orcad-packaged-structured-chat.integration.test.ts
  • src/main/ssh/build-toolchain-diagnosis.ts
  • src/main/ssh/orcad-activation-gate.test.ts
  • src/main/ssh/orcad-installed-activation.ts
  • src/main/ssh/orcad-managed-auto-update.test.ts
  • src/main/ssh/orcad-managed-auto-update.ts
  • src/main/ssh/orcad-remote-context.ts
  • src/main/ssh/orcad-remote-deploy.ts
  • src/main/ssh/orcad-remote-launch-windows.ts
  • src/main/ssh/orcad-remote-windows-node.ts
  • src/main/ssh/orcad-runtime-deployment.test.ts
  • src/main/ssh/orcad-runtime-deployment.ts
  • src/main/ssh/orcad-runtime-maintenance.test.ts
  • src/main/ssh/orcad-runtime-maintenance.ts
  • src/main/ssh/orcad-runtime-target.ts
  • src/main/ssh/orcad-stdio-bridge-provider.test.ts
  • src/main/ssh/orcad-stdio-bridge-provider.ts
  • src/main/ssh/orcad-stdio-bridge.test.ts
  • src/main/ssh/orcad-stdio-bridge.ts
  • src/main/ssh/orcad-windows-host-preparation.ts
  • src/main/ssh/ssh-host-server-connect-events.ts
  • src/main/ssh/ssh-host-server-on-connect-telemetry.test.ts
  • src/main/ssh/ssh-host-server-on-connect.test.ts
  • src/main/ssh/ssh-host-server-on-connect.ts
  • src/main/ssh/ssh-hostile-host-cells.ts
  • src/main/ssh/ssh-hostile-host-managed-orcad.ts
  • src/main/wsl/wsl-pinned-runtime.test.ts
  • src/main/wsl/wsl-pinned-runtime.ts

💤 Files with no reviewable changes (1)
  • src/main/ssh/build-toolchain-diagnosis.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

Walkthrough

Orcad and Node runtime imports now resolve from their respective directories. A build-toolchain probe, parser, and install-hint selector are added under Orcad, while the SSH build-toolchain diagnosis module is removed. Workflow filters, qualification rules, protocol tracking, timing-map paths, and a template comment are updated to reflect the changed locations.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to eb7a5

The inspected imports resolve, and the identified toolchain-hint behavior predates this change. No actionable regression from this PR warrants delaying merge.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 41 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main refactor: moving Orcad artifacts under orcad/ and Node runtime helpers under node-runtime/.
Description check Passed The description is detailed and covers the purpose, changes, dependency direction, testing, compatibility impact, and checklist. It marks the linked issue as N/A even though the template requests an i…
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: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 41 files. (3 skipped: 3 unsupported.)


  • 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.

@OrcaWin
OrcaWin merged commit 4ad0129 into main Oct 12, 2026
59 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