Skip to content

fix(bundler): keep compiled renderer service live - #3690

Merged
kwakayama merged 1 commit into
mainfrom
fix/preview-esbuild-service-lifecycle
Aug 14, 2026
Merged

fix(bundler): keep compiled renderer service live#3690
kwakayama merged 1 commit into
mainfrom
fix/preview-esbuild-service-lifecycle

Conversation

@kwakayama

@kwakayama kwakayama commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes compiled renderer startup when the Node-compatible ChildProcess reports exitCode and signalCode as undefined before exit. The esbuild adapter previously treated that live service as externally owned, permanently rejecting TSX transforms and returning preview HTTP 500s.

Root cause

Staging renderer logs from strict E2E run #31756302514 show project TSX transforms failing with [ext-bundler-esbuild] Cannot own an esbuild service started outside the module-wide adapter. The production Deno-compiled runtime exposes unset exit fields during service startup; the adapter accepted only null.

Validation

  • Added a regression test for Node-compatible unset exit fields.
  • deno test --no-check --allow-all extensions/ext-bundler-esbuild/src/esbuild-bundler.test.ts — 6 tests / 19 steps passed.
  • deno fmt --check and git diff --check passed.

Validation gap

The local compiled-binary test and repository typecheck are blocked before test execution by the local Deno 2.9.4 runtime lacking the repository-required node:util/types brand checks; CI runs in the supported environment and is the release gate.

Summary by CodeRabbit

  • Bug Fixes

    • Improved detection of active esbuild processes across runtimes that report missing exit or signal information.
    • Prevented active bundler services from being incorrectly treated as stopped.
  • Tests

    • Added coverage for identifying a running child process with undefined exit details.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c5432fe-caab-4385-a4b5-edb57f687156

📥 Commits

Reviewing files that changed from the base of the PR and between 0361d07 and 75efc0a.

📒 Files selected for processing (2)
  • extensions/ext-bundler-esbuild/src/esbuild-bundler.test.ts
  • extensions/ext-bundler-esbuild/src/esbuild-bundler.ts

📝 Walkthrough

Walkthrough

The esbuild bundler adds an exported process-liveness helper. The helper treats undefined and null lifecycle fields as active states. A test verifies the behavior for a process with no exit or signal code.

Changes

Esbuild service liveness

Layer / File(s) Summary
Liveness helper implementation
extensions/ext-bundler-esbuild/src/esbuild-bundler.ts
Adds isLiveEsbuildServiceProcess and uses it for internal service liveness checks.
Lifecycle validation
extensions/ext-bundler-esbuild/src/esbuild-bundler.test.ts
Adds a test for a live process with undefined exit and signal codes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 75efc

The change narrowly keeps the compiled renderer service live when exit fields are unset and adds regression coverage; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: kojiwakayama

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: keeping the compiled renderer's esbuild service live.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/preview-esbuild-service-lifecycle

Comment @coderabbitai help to get the list of available commands.

@kwakayama
kwakayama added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit eeaf452 Aug 14, 2026
33 checks passed
@kwakayama
kwakayama deleted the fix/preview-esbuild-service-lifecycle branch August 14, 2026 01:26
@kwakayama kwakayama mentioned this pull request Aug 14, 2026
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