Fix Node 22 desktop dev startup - #2245
Merged
Merged
Conversation
Roystbeef
marked this pull request as ready for review
August 21, 2026 19:25
ymichael
added a commit
that referenced
this pull request
Aug 25, 2026
## What was wrong The tarball smoke installed the packed package once for SDK checks, but then launched every packaged CLI, server, and daemon through a fresh `npx --package <tarball>` wrapper. That put npm package resolution and subprocess startup inside each managed process's 60-second HTTP-readiness budget. Under scheduler contention the wrapper could consume nearly the entire budget before `bb-app` started its server child, producing the observed live-child signature from [main push run 32810192666](https://github.com/get-bb/bb/actions/runs/32810192666/job/97687946973): only the bb banner and `Starting server`, then the outer health timeout. A scaled packed-startup harness reproduced that exact output three times: under the same 60-burner load, the wrapped path emitted `Starting server` at 9.582s of a 10s ceiling and timed out, while the already-installed tarball emitted it at 112ms and reached health at 1.808s. The triggering PR #2245 changed only type imports and had no runtime effect. The package-smoke job runs one Turbo task on its own runner, so there is no evidence of within-job package-shard oversubscription; transient runner contention is the reproduction condition, not the root cause. ## What changed Keep one real `npx --package <tarball> -- bb-app --help` invocation to verify the package's advertised npx resolution, installation, and bin-dispatch path. Separately install the packed tarball once with lifecycle scripts enabled, then execute its npm-created `.bin` entries directly for help/config, full-stack, CLI/plugin, standalone server, and daemon-join checks. This removes repeated npm startup from readiness budgets while preserving the real packed-install boundary and every existing assertion: server and daemon health, builtin plugins, SDK import/status, provider bridges, plugin host worker, installed-package repacking, and multi-daemon join behavior. No timeout or retry budget changed. No server/daemon wire contract, public CLI behavior, documentation, or `HOST_DAEMON_PROTOCOL_VERSION` change is involved. ## How you verified - Red before the fix: the scaled packed-startup harness under 60 CPU burners produced the exact `bb` / `Starting server` timeout three times for `npx --package <tarball> bb-app`; direct execution of the same installed tarball passed each reversed-order run in 1.724–1.856s. - Green after the fix: the exact final full smoke, including the retained real npx entrypoint, passed under the same 60-burner contention in 192.78s. Its unchanged plugins, host worker, bridges, full-stack, and daemon-join assertions all passed. - Normal local smoke improved from 51.02s before to 34.44s after without changing any clock. - `pnpm exec turbo run build typecheck test --filter=bb-app --force` — 14/14 tasks passed; bb-app 72/72 tests passed. - `pnpm exec turbo run smoke:tarball --filter=bb-app --force --cache-dir=.turbo/cache --output-logs=new-only` — 12/12 tasks passed; real tarball smoke passed after restoring the npx boundary. - `pnpm exec prettier --check packages/bb-app/scripts/smoke-tarball.mjs` and `git diff --check` passed. > AGENT GENERATED: by GPT-5.6-Sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The supported Node 22 desktop development path loaded
apps/host-daemon/src/command-dispatch.tsdirectly through TSX, but several host-daemon contracts were imported as runtime values even though they are TypeScript types. Those erased exports do not exist at runtime, so the source dev server session stalled before the Electron shell could launch.What changed
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
pnpm exec turbo run typecheck --filter=@bb/host-daemonpnpm dev:desktopwith Node 22.22.1 and verified that the dev server and Electron desktop sessions both started successfully.No linked issue.