Skip to content

feat(runtime): isolate the server behind a compatibility launcher - #26374

Merged
nwparker merged 2 commits into
mainfrom
nwparker/orcad-launcher-split
Oct 8, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/orcad-launcher-split

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Orca selects its bundled runtime through a small launcher before loading the server and its dependencies.

What Changed

Previously orcad.js contained the server. It now verifies and loads a separate orcad-server.js; the launcher remains compatible with Node 18. Host Node 18 support and the current SSH runtime default remain unchanged.

The launcher embeds the server digest while preserving the public hash older clients calculate. POSIX remote startup keeps orcad.js in the process arguments so older clients recognize the serving PID. Packaging, preflights, local startup and Windows startup include the separate server file and retain support for older single-file slots.

Runtime and digest faults exit with configuration-error code 78. Server import crashes retain Node's exit code 1, allowing supervisors to retry them.

Why

Runtime selection must happen before server dependencies are parsed. A small JavaScript launcher provides that boundary without another native binary and distribution pipeline. Keeping server crash handling outside launcher validation preserves the previous restart behavior.

Linked Issue

N/A — maintainer change.

Visual Proof

N/A — runtime startup and packaging changes have no visible UI change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

On macOS: focused runtime, SSH, artifact and worker suites pass, along with typecheck, changed-code quality and pnpm build:orcad. The crash regression test reproduced exit 78 before the fix and passes with exit 1 afterward. Runtime and digest rejection tests still verify exit 78.

A fresh built launcher ran through real Node 18, handed off to pinned Node 24, paired a client, created a private worktree and real terminal, returned command output, and shut down gracefully. Fresh relay integration tests pass with main's upstream reconnect-holdoff fixture fix (#26389). CI on final head 245a6c7 passed all 57 applicable checks (15 skipped), including Linux, macOS, Windows and remote/packaged startup coverage. The Docker managed-host job passed an unchanged retry after an SSH cancellation assertion; a deterministic reproduction identified a reachable race in unchanged reconnect code, preserved separately for follow-up.

Post-merge verification at acd298a: fresh server and CLI builds succeeded. Real Node 18 launched the bundled runtime; client pairing, private worktree creation, real terminal command output and graceful shutdown passed again. The merged runtime suites passed 35 tests with one deliberate skip.

Review

Fresh adversarial reviews from all three sub-agents are CLEAN at 245a6c7. Final Claude Opus 5.5 review via Orca orchestration also returned CLEAN after those reviews, with 191 focused tests passed and one deliberate skip. The review loop found and corrected the server import crash exit-code regression.

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

The Node 24 runtime policy remains separate in #26171. No remote wire format change. The relay fixture fix is already on main and contributes no files to this PR.

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 8, 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: 2822e459-c7de-4c8e-a4a8-4f962a08a0c7
📥 Commits

Reviewing files that changed from the base of the PR and between bd60d4a and 245a6c7.

📒 Files selected for processing (2)
  • src/main/orcad/launcher.ts
  • src/main/orcad/orcad-launcher-isolation.integration.test.ts

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


📝 Walkthrough

Walkthrough

The build now produces a separate Orcad server bundle and compatibility launcher. The launcher checks runtime eligibility and verifies the server bundle’s digest before loading it. Build identity calculations use the launcher’s content hash. Local and remote startup paths select the server entry when present and retain compatibility with single-entry slots.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 245a6

The change moves server startup behind a compatibility launcher that checks the runtime and the server digest before loading. No merge-blocking risk is evident from the supplied files.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.52% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 40 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: isolating the server behind a compatibility launcher.
Description check ✅ Passed The description covers the required sections, including the user-facing change, rationale, testing, compatibility, review notes, and checklist. The maintainer correctly marks the linked issue as not a…
  • Fix all pre-merge checks with AI
✨ 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
  • Autopilot · 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.

@nwparker
nwparker force-pushed the nwparker/orcad-launcher-split branch from cc27a67 to bd60d4a Compare October 8, 2026 01:42
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