Skip to content

refactor(build): relay survivors named for what they are - #27962

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​40 $\color{#cf222e}{\Huge{\mathbf{−}}}$​57 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17
Prod 31 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​135 $\color{#cf222e}{\Huge{\mathbf{−}}}$​165 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30

ELI5

The old SSH relay is gone, but some live build pieces still carried its name: the script that bundles the programs Orca runs inside WSL, the Windows process-table addon build, and a shared list of file names. This PR renames them for what they do today, and moves the relay-era file list next to the only code that still reads it.

What Changed

Users see no difference. Build outputs and their paths (out/relay/wsl) are unchanged.

  • pnpm run build:relay → pnpm run build:wsl-guest, and config/scripts/build-relay.mjs → build-wsl-guest.mjs. It only builds the WSL guest programs. Its test override env var is now ORCA_WSL_GUEST_OUT_ROOT. Every package script, workflow and test that called it is updated.
  • build-windows-process-tree-relay-addon.mjs → build-windows-process-tree-addon.mjs, relay-windows-process-tree-prepared-addon(.test).mjs → windows-process-tree-prepared-addon(.test).mjs. The helpers are renamed canReusePreparedAddon, windowsProcessTreeAddonHasBreakawayLauncher and windowsProcessTreeAddonDefect. The addon is staged for orcad now.
  • src/shared/relay-artifacts.ts is split:
    • src/shared/remote-bundle-artifacts.ts keeps the live names: the bundle platform list (used by bundled ripgrep), OPENCODE_SQLITE_READER_FILENAME and WSL_CLAUDE_PROFILE_HELPER_FILENAME.
    • src/main/ssh/relay-install-artifacts.ts holds the relay-era install list, which only the host census and the relay install model read (daemon service children, version and install-complete names, required files). It is unchanged and will be deleted with the census.
    • The Windows process-table addon name now comes from the existing ORCAD_WINDOWS_PROCESS_TREE_FILENAME. It is the same windows-process-tree.node, previously declared twice.
    • Removed as unused: isWindowsRelayPlatform, and relayOptionalArtifactFilenames (it was only used by its own test).

Why

Phase 3.99 rule: live code carries no relay names, and the relay-era leftovers sit together so that retiring them later takes one PR. The cloud/mobile relay (src/main/runtime/relay/*) is a different, live system and is untouched. The legacy relay bridge keeps everything it uses: the census list moved without changes, and the install model and daemon-child matching behave the same.

Net: production −30 (+135/−165), tests −17 (+40/−57).

Linked Issue

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

Visual Proof

N/A, no UI or behaviour change.

Testing

  • rg finds no remaining relay-artifacts, build:relay, build-relay.mjs, old script names, or old helper/constant names in src config tests mobile .github (@ts-nocheck files included).

  • ORCA_WSL_GUEST_OUT_ROOT=<tmp> pnpm run build:wsl-guest emits the same four files. build:electron-vite, build:cli and build:orcad pass.

  • Focused vitest: relay install artifacts, daemon service children, install model, incumbent probe, host census, legacy relay bridge, bundled ripgrep, breakaway launcher, Windows process table, WSL Claude profile / OpenCode prep, WSL hook relay manager (26 files, 322 tests). Config script tests for the renamed scripts and routing (11 files, 260 tests).

  • pnpm tc, pnpm lint, pnpm run check:code-quality:changed (0 findings).

  • The Windows-only addon build and WSL lanes run in CI.

  • 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

Windows: addon build steps renamed in node-server-tests, e2e, ssh-windows-hosts and win-orcad-serve-switch-e2e. The ssh-windows-hosts path filters were updated. WSL: same bundle, same path. SSH/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: d4645846-9ccd-401c-b287-78f77c6093ae

📥 Commits

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


📒 Files selected for processing (39)
  • .github/workflows/e2e.yml
  • .github/workflows/node-server-tests.yml
  • .github/workflows/packaged-browser-e2e.yml
  • .github/workflows/pr.yml
  • .github/workflows/ssh-windows-hosts.yml
  • .github/workflows/terminal-ime-e2e.yml
  • .github/workflows/win-orcad-serve-switch-e2e.yml
  • .github/workflows/windows-wsl-e2e.yml
  • config/scripts/build-windows-process-tree-addon.mjs
  • config/scripts/build-wsl-guest.mjs
  • config/scripts/check-runtime-electron-ratchet.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/node-server-change-scope.mjs
  • config/scripts/node-server-change-scope.test.mjs
  • config/scripts/orcad-windows-prebuild-workflow.test.mjs
  • config/scripts/orcad-windows-process-tree.mjs
  • config/scripts/pr-code-change-scope.mjs
  • config/scripts/windows-process-tree-gyp-rebuild.mjs
  • config/scripts/windows-process-tree-prepared-addon.mjs
  • config/scripts/windows-process-tree-prepared-addon.test.mjs
  • config/scripts/wsl-hook-relay-reattach-benchmark.mjs
  • package.json
  • src/main/agent-hooks/wsl-hook-relay-live.integration.test.ts
  • src/main/agent-hooks/wsl-hook-relay-manager.ts
  • src/main/ai-vault/opencode-wsl-runtime-preparation.ts
  • src/main/claude-accounts/claude-profile-wsl-router.ts
  • src/main/ssh/relay-daemon-service-children.ts
  • src/main/ssh/relay-install-artifacts.test.ts
  • src/main/ssh/relay-install-artifacts.ts
  • src/main/ssh/remote-install-model.ts
  • src/main/ssh/ssh-relay-endpoint-incumbent-shell.integration.test.ts
  • src/main/ssh/ssh-system-transport.integration.test.ts
  • src/main/windows/windows-process-table.ts
  • src/shared/bundled-ripgrep.ts
  • src/shared/orcad-artifacts.ts
  • src/shared/relay-artifacts.ts
  • src/shared/relay-optional-artifacts.test.ts
  • src/shared/remote-bundle-artifacts.ts
  • src/shared/windows-breakaway-launcher.ts

💤 Files with no reviewable changes (2)
  • src/shared/relay-optional-artifacts.test.ts
  • src/shared/relay-artifacts.ts

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



📝 Walkthrough

Walkthrough

Build commands and workflows now use build:wsl-guest in place of build:relay. Windows process-tree addon scripts, checks, and staging references use non-relay names and the Orcad artifact filename. Relay install artifact definitions move from a shared module to an SSH-local module. Related imports, tests, and build-scope references are updated.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to a9e3c

No issue requiring a change before merge was identified. The renamed build commands and artifact references appear consistent.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 27 files. (10 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 identifies the primary change: renaming remaining relay-related build components to reflect their current purpose.
Description check Passed The description is complete and aligned with the template. It explains the change, rationale, testing, scope, compatibility impact, and checklist status. The N/A linked issue is justified as an intern…
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 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 27 files. (10 skipped: 10 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 7c13365 into main Oct 12, 2026
67 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