Skip to content

chore: delete verified-unused modules and exports - #27438

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-7
Oct 11, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-7

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​565 $\color{#cf222e}{\Huge{\mathbf{−}}}$​555
Prod 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​32 $\color{#cf222e}{\Huge{\mathbf{−}}}$​597 $\color{#cf222e}{\Huge{\mathbf{−}}}$​565

ELI5

Some files and exported names in Orca are no longer used by anything except their own tests. This PR deletes them, writes one orcad exit code in one place instead of five, and removes comments that point to a documentation folder that no longer exists. Nothing the app does changes.

What Changed

Before: the build carried seven modules that only their own tests import, a few orcad exports nobody reads, orcad's "configuration fault" exit code (78) typed out as a bare number in five files, two private copies of the shared errorMessage helper, and comments linking to the deleted docs/reference/ folder.

After: those modules and exports are gone, and so is everything that pointed at them (CI path filters, the shard-timing table, one focus-read baseline row). The exit code lives in one new module with no imports, orcad-configuration-exit.ts. The launcher can import it without pulling anything else into its tiny bundle. orcad now uses the shared errorMessage. The dead doc links are removed, and the sentence each one supported is kept.

Path ledger (importers on origin/main @ 92e204fdac):

Path / symbol Importers before After
src/shared/issue-link-input.ts its test only deleted (+test)
renderer/.../terminal-pane/shell-ready-marker-scan.ts its test only (duplicate of main/shell-ready-marker-scanner.ts) deleted (+test)
renderer/.../terminal-pane/terminal-drop-runtime-owner.ts its test only deleted (+test, focus-read baseline row)
main/ssh/ssh-remote-cli-launcher.ts its test only (relay-era; orcad has its own launcher) deleted (+test, computer-e2e.yml filter and test list)
main/ssh/ssh-session-command-audit.ts its test only deleted (+test, ssh-windows-hosts.yml filter)
main/ssh/remote-install-coexistence.ts its test only deleted (+test)
main/ssh/ssh-previous-relay-census-test-double.ts none deleted
isFlattenedNodePtyLoaderMessage none deleted
ORCAD_EXIT_OK none deleted
3 daemon protocol constants (v33, v34, v36) none deleted (PROTOCOL_VERSION itself unchanged)
exit code 78 in launcher.ts, orcad-bundled-runtime.ts, orcad-native-preflight.ts, orcad-profile-preflight.ts, orcad-exit-code.ts 5 spellings one ORCAD_EXIT_CONFIGURATION
local errorMessage/errorText in orcad-daemon-supervision.ts, orcad-local-serve-selection.ts 2 copies shared/error-message

Net lines: production −543, tests −573, CI/config −4.

Why

The rule for this cleanup phase is to delete only what can be shown to be unreachable. Each symbol was checked with git grep -w over src config tests .github mobile packages scripts, and every hit is listed above. The same check ran separately over the 176 @ts-nocheck files, because a passing typecheck cannot see callers in those, and it found zero hits. The bundler builds that fail on a missing import (build:electron-vite, build:cli, build:orcad) all pass.

The exit code needed a module with no imports. orcad-exit-code.ts imports the server's error classes, so if the launcher imported that file, the server graph would leak into the launcher. orcad-launcher-isolation.integration.test.ts pins the launcher's input list, and it now lists the one new constant file.

These are left for their owning PRs: the larger SSH dead-export sweep (relay-only files that later PRs delete whole), ssh-host-relay-terminals-once-connected.ts (owned by the SSH terminal PR), and the ~200 other dangling docs/reference mentions outside orcad.

Linked Issue

N/A (maintainer cleanup; Phase 3.99 Wave 0, PR 0.7).

Visual Proof

N/A: no UI or behaviour change. orcad exits with code 78 in exactly the same cases as before.

Testing

  • pnpm tc, pnpm lint, pnpm run check:code-quality:changed, pnpm check:focus-read-ratchet (1142 reads, down 2)

  • pnpm build:electron-vite, pnpm build:cli, pnpm build:orcad

  • pnpm test on the orcad preflight, launch-contract, profile-preflight, serve-selection, daemon-supervision, loader-diagnosis, bundled-runtime and launcher-isolation suites, plus the ci-shard and focus-ratchet script tests

  • I manually tested these changes locally

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

AI Disclosure

Review

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

Security, cross-platform, SSH, mobile and wire: no runtime path changes. Protocol constants that were removed are unused names; the daemon protocol number is unchanged.

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)

Removes seven modules that only their own tests import, dead orcad exports
and protocol constants, spells orcad's configuration exit code once, reuses
the shared errorMessage helper, and drops links to the deleted
docs/reference folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 973afb52-5150-4688-9a1d-b4f901b131ea

📥 Commits

Reviewing files that changed from the base of the PR and between 2148111 and 06c2a78.


📒 Files selected for processing (36)
  • .github/workflows/computer-e2e.yml
  • .github/workflows/ssh-windows-hosts.yml
  • config/focus-setting-read-baseline.txt
  • config/scripts/build-orcad-prebuilds.mjs
  • config/scripts/ci-shard-timings.json
  • src/main/daemon/daemon-host-relocation.ts
  • src/main/daemon/daemon-protocol-version.ts
  • src/main/orcad/launcher.ts
  • src/main/orcad/native-host-abi.ts
  • src/main/orcad/node-pty-loader-diagnosis.ts
  • src/main/orcad/node-pty-prebuilt-slot.ts
  • src/main/orcad/node-pty-precondition.ts
  • src/main/orcad/orcad-bundled-runtime.ts
  • src/main/orcad/orcad-configuration-exit.ts
  • src/main/orcad/orcad-daemon-supervision.ts
  • src/main/orcad/orcad-exit-code.ts
  • src/main/orcad/orcad-launch-contract.test.ts
  • src/main/orcad/orcad-launcher-isolation.integration.test.ts
  • src/main/orcad/orcad-local-serve-selection.ts
  • src/main/orcad/orcad-native-preflight.test.ts
  • src/main/orcad/orcad-native-preflight.ts
  • src/main/orcad/orcad-profile-preflight.ts
  • src/main/ssh/remote-install-coexistence.test.ts
  • src/main/ssh/remote-install-coexistence.ts
  • src/main/ssh/ssh-previous-relay-census-test-double.ts
  • src/main/ssh/ssh-remote-cli-launcher.test.ts
  • src/main/ssh/ssh-remote-cli-launcher.ts
  • src/main/ssh/ssh-session-command-audit.test.ts
  • src/main/ssh/ssh-session-command-audit.ts
  • src/renderer/src/components/terminal-pane/shell-ready-marker-scan.test.ts
  • src/renderer/src/components/terminal-pane/shell-ready-marker-scan.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-runtime-owner.test.ts
  • src/renderer/src/components/terminal-pane/terminal-drop-runtime-owner.ts
  • src/shared/issue-link-input.test.ts
  • src/shared/issue-link-input.ts
  • tests/e2e/orcad-serve-mode-switch.spec.ts

  • 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 5651141 into main Oct 11, 2026
67 of 68 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