fix(bb-app): reuse installed tarball in package smoke - #2410
Merged
ymichael merged 2 commits intoAug 25, 2026
Merged
Conversation
ymichael
deleted the
bb/ci-flake-fix-bb-app-full-stack-health-startup-st-thr_7szy7w6tcx
branch
August 25, 2026 17:33
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 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 beforebb-appstarted its server child, producing the observed live-child signature from main push run 32810192666: only the bb banner andStarting 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 emittedStarting serverat 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 --helpinvocation 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.binentries 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_VERSIONchange is involved.How you verified
bb/Starting servertimeout three times fornpx --package <tarball> bb-app; direct execution of the same installed tarball passed each reversed-order run in 1.724–1.856s.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.mjsandgit diff --checkpassed.