You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(orcad): orcad artifacts live under orcad/ and node-runtime/ - #27963
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.
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)
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 | 4 | 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
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
The title clearly and concisely describes the main refactor: moving Orcad artifacts under orcad/ and Node runtime helpers under node-runtime/.
Description check
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, soorcad/imported fromssh/andssh/imported fromorcad/. This PR moves that code to where it belongs: orcad files undersrc/main/orcad/, the pinned Node runtime under a newsrc/main/node-runtime/.ssh/imports them; they no longer importssh/.What Changed
Users see no difference: the files moved, the code did not change.
src/main/orcad/:orcad-artifact-materializer(+ test),orcad-host-unavailable(+ test), andbuild-toolchain-diagnosis. The diagnosis module keeps only the probe, parser and install hint thatnode-pty-precondition.tsuses. Five relay-era formatters with no callers are deleted:shouldProbeBuildToolchainAfterNativeDepsFailure,formatSkippedNodePtyWarning,formatMissingToolchainError,isNodeHeadersDownloadFailureandformatNodeHeadersDownloadError.src/main/node-runtime/:pinned-runtime-materializer(+ 2 tests),runtime-archive-download(+ test) andorcad-cache-path. These are its private helpers; nothing else imports them.ssh/,ipc/,wsl/,ai-vault/andorcad/are re-pointed, including thevi.mockpaths.Dependency direction after this PR:
ssh → orcad,ssh → node-runtime,orcad → node-runtime. Twoorcad → sshimports remain, both inorcad-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/ornode-runtime/, andssh/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 inssh/, is what stops the new folder importing back intossh/.Linked Issue
N/A, internal Phase 3.99 cleanup (PR 3.3).
Visual Proof
N/A, no UI or behaviour change.
Testing
rgfinds no reference to the old paths insrc config tests mobile .github(@ts-nocheckfiles included). The only hits are two synthetic path strings insidenode-server-change-scope.test.mjsfixtures, 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-wslplus 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
Notes
SSH/WSL/Windows: same code, new paths. The legacy relay bridge uses none of the moved files. Wire: no change.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)