Skip to content

fix(bb-app): reuse installed tarball in package smoke - #2410

Merged
ymichael merged 2 commits into
mainfrom
bb/ci-flake-fix-bb-app-full-stack-health-startup-st-thr_7szy7w6tcx
Aug 25, 2026
Merged

fix(bb-app): reuse installed tarball in package smoke#2410
ymichael merged 2 commits into
mainfrom
bb/ci-flake-fix-bb-app-full-stack-health-startup-st-thr_7szy7w6tcx

Conversation

@ymichael

@ymichael ymichael commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

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: 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

@ymichael
ymichael merged commit 5d787d9 into main Aug 25, 2026
15 checks passed
@ymichael
ymichael deleted the bb/ci-flake-fix-bb-app-full-stack-health-startup-st-thr_7szy7w6tcx branch August 25, 2026 17:33
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