Skip to content

Fix CI bootstrap downloads and ACP test cleanup - #5783

Merged
ymichael merged 7 commits into
mainfrom
bb/ci-performance-analysis-thr_pcquw2fv9b
Oct 19, 2026
Merged

ymichael merged 7 commits into
mainfrom
bb/ci-performance-analysis-thr_pcquw2fv9b

Conversation

@ymichael

@ymichael ymichael commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

CI bootstrap downloads could stall or fail before checks started. pnpm always downloaded its executable even when verified bytes were available, and Bun setup could spend over ten minutes downloading. ACP bridge tests could time out while session creation and polling continued, allowing late responses and live child processes to interfere with the next test. Git/Turbo selection fixtures also used a five-second default despite launching multiple processes.

Observed examples: pnpm bootstrap failure, slow Bun setup, and ACP timeout cascade.

What changed

  • Reuse checksum-verified pnpm executables and Bun release archives, keyed by platform/version/checksums. Missing or corrupt caches trigger bounded downloads; invalid or partial downloads are never installed. Bun setup has a four-minute limit and handles Windows checksum paths correctly.
  • Abort ACP test polling with the test signal, track starts/resumes/forks before they complete, and drain requests and stop sessions before resetting shared test state. Give the multiprocess model-selection case 20 seconds and Git/Turbo selection fixtures 30 seconds.
  • Document the bootstrap behavior. This PR makes no claim of reduced total CI time.

How you verified

  • Installer tests exercise cache reuse, corrupt-cache replacement, invalid downloads, partial-download cleanup, and archive paths containing backslashes.
  • Earlier forced-timeout verification produced exactly the intentional ACP timeout; the next two model-switch cases passed without cleanup errors. The temporary fault was removed afterward.
  • Earlier native CI verified the corrected Bun setup on Linux and Windows; the eight executed setup steps in this run passed in 1–5 seconds. That run did not pass overall and is not an end-to-end speed claim.
  • On the narrowed change merged with current main, pnpm exec turbo run test lint typecheck --filter=@bb/scripts --filter=@bb/provider-bridge-acp-next --output-logs=new-only passed (256 scripts tests; 499 ACP tests passed, four skipped).
  • Actionlint passed with custom runner-label warnings ignored and ShellCheck disabled; shell syntax and git diff --check passed.
  • PR CI on daeccdadb9: the first attempt passed 35 active jobs and failed five (three pnpm download timeouts, one dependency-install timeout, and an unchanged host-workspace assertion). Only those five were retried on the same commit. All five passed on attempt 2 of the same CI run. Final PR status: 45 successful checks, three intentionally skipped, none pending or failed; GitHub reports the PR clean to merge.

AGENT GENERATED

@ymichael ymichael changed the title Improve CI bootstrap reliability, Windows test cleanup, and performance reporting Fix CI bootstrap downloads and ACP test cleanup Oct 19, 2026
@ymichael
ymichael merged commit 3b09127 into main Oct 19, 2026
84 of 89 checks passed
@ymichael
ymichael deleted the bb/ci-performance-analysis-thr_pcquw2fv9b branch October 19, 2026 23:38
ymichael added a commit that referenced this pull request Oct 20, 2026
## What was wrong

`origin/main` CI was red for about 10 consecutive pushes (6dc2e2d
through 0eac33e). Almost every failure was in bootstrap, before any
test ran: runners got very slow downloads from GitHub releases (`curl:
(28)` after about 1.6 MB of the 67 MB pnpm binary), nodejs.org
(`better-sqlite3` node-gyp headers `ETIMEDOUT`), and the npm registry
(`pnpm install` stalled on its last package until the 5-minute step
timeout). This hit both Linux and Windows runners, and the jobs that
failed changed from run to run. It has since cleared: [the run on
6701f6b](https://github.com/get-bb/bb/actions/runs/39344853306)
passed every job without any change. #5783 already hardened those
downloads, so this PR does not touch them again.

The one failure in our own code was [a Windows `packages-other` test
timeout](https://github.com/get-bb/bb/actions/runs/39343034529/job/118369137986):
`acp bridge > keeps CLI reasoning on the resolved model variant instead
of ACP config` timed out at 6166 ms against Vitest's default 5000 ms.
The test launches the fake ACP agent several times in a row (CLI model
list, then thread start, then turn). On Windows runners it took 1262 ms
and 2659 ms in other runs, so it was flaking on load, not a code
regression. Its sibling `uses modelCli only for model selection when
reasoningCli owns effort` has the same shape and already sets `20_000`.

## What changed

Both tests in `packages/provider-bridge-acp/src/bridge/bridge.test.ts`
(moved from `provider-bridge-acp-next` by #5775) that call
`sendModelList` and then `startThread` without an explicit timeout now
use the same `20_000` budget as their sibling:
- `keeps CLI reasoning on the resolved model variant instead of ACP
config`
- `warns and launches the family id when a reasoning variant is missing`

## Verification

`pnpm exec turbo run test --filter=@bb/provider-bridge-acp`: 25 files,
505 passed, 4 skipped.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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