Skip to content

Skip redundant process-host compilation during dev rebuilds - #29317

Merged
OrcaWin merged 1 commit into
mainfrom
perf/skip-redundant-process-host-builds
Oct 16, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
perf/skip-redundant-process-host-builds

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14

ELI5

Editing main-process application code currently recompiles Orca's process-host package even when that package has not changed. Skip that extra compiler launch so the dev rebuild can finish sooner.

What Changed

Track whether a watched process-host input changed. Build the package at watch startup, then rebuild it only after its sources, package manifest, inherited compiler configuration, or source-directory signal change. Normalize watched paths for Windows. Keep failed builds eligible for retry and preserve the existing requirement that package output is ready before Electron reloads.

Why

The watcher already knows which inputs belong to the external package, so reusing those invalidation events avoids another cache or background process. Unrelated application edits no longer pay for package compilation. This is a small reduction in dev rebuild overhead; it does not change typechecking or compiler resource settings.

Linked Issue

Developer tooling maintenance; no existing issue.

Visual Proof

N/A — development build tooling only; no application UI or interaction changes.

Testing

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

Linux validation:

  • pnpm test config/scripts/process-host-dev-rebuild.test.ts config/scripts/process-host-build-dist.test.mjs --maxWorkers=2 using pinned Bun 1.4.3 and ORCA_BACKGROUND_LAUNCH=1: 18 tests passed.
  • The regression test records actual package-build invocations and verifies an unrelated app edit rebuilds the app without recompiling the package. Existing coverage exercises private source changes, new imports/directories, inherited configuration changes, failed-build recovery, and safe output publication.
  • pnpm tc:node, changed-code quality, changed-file formatting, and git diff --check passed.
  • Full lint, full test suite, and application builds are left to CI. No Electron windows were launched.

Review

Self-reviewed for correctness, performance, and security. Uses the existing process-host launcher and normalizes filesystem paths. Tested on Linux; macOS and Windows await CI. Application runtime behavior, SSH/remote execution, folder workspaces, mobile, agent integrations, and git providers have no new behavior or protocol changes. No UI or credential-handling changes.

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

Applies automatically to the existing dev watcher. No setup changes are required.

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 16, 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: 84e62817-7a45-4aa2-a888-52ebd7458538
📥 Commits

Reviewing files that changed from the base of the PR and between 16eaceb and eb95887.

📒 Files selected for processing: 2
  • config/build-plugins/process-host-dev-rebuild.ts
  • config/scripts/process-host-dev-rebuild.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

The development rebuild plugin tracks changes to package inputs and the watch signal. It skips compilation when the package is clean and clears the dirty state after successful compilation. A watch test checks that an application-only change updates the emitted bundle without triggering another package build.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to eb958

The dev rebuild skips package compilation for unrelated app edits while source-directory changes trigger a rebuild. No concrete merge-blocking risk is established; proceed with normal CI.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: avoiding redundant process-host compilation during development rebuilds.
Description check Passed The description is detailed, focused, and covers the change, rationale, testing, review, and checklist items. It does not provide an actual linked issue, despite the template requiring one, but the re…
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.
  • 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 bd56d8d into main Oct 16, 2026
35 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