Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache-prefix: windows-foundation
turbo-cache: "false"
turbo-cache: "true"
turbo-cache-max-size-mb: "256"

- name: Install foundation dependencies
Expand All @@ -55,7 +55,11 @@ jobs:
run: bash .github/actions/setup-workspace/install-dependencies.sh --ignore-scripts --filter bb --filter "@bb/process-utils..." --filter "@bb/host-workspace..." --filter "@bb/host-watcher..." --filter "@bb/agent-runtime..." --filter "@bb/provider-bridge-protocol..." --filter "@bb/provider-bridge-acp..." --filter "@bb/host-daemon-contract..." --filter "@bb/config..." --filter "@bb/db..." --filter "bb-plugin-provider-acp..." --filter "bb-plugin-provider-codex..." --filter "bb-plugin-provider-claude-code..." --filter "bb-plugin-echo-provider..." --filter "@bb/app..."

- name: Typecheck and test foundation packages
run: pnpm exec turbo run lint typecheck test --filter=@bb/process-utils --filter=@bb/host-workspace --filter=@bb/host-watcher --filter=@bb/agent-runtime --filter=@bb/provider-bridge-protocol --filter=@bb/provider-bridge-acp --filter=@bb/host-daemon-contract --filter=@bb/config --filter=@bb/db --force --continue --concurrency=2 --output-logs=full
shell: bash
run: pnpm exec turbo run lint typecheck test --filter=@bb/process-utils --filter=@bb/host-workspace --filter=@bb/host-watcher --filter=@bb/agent-runtime --filter=@bb/provider-bridge-protocol --filter=@bb/provider-bridge-acp --filter=@bb/host-daemon-contract --filter=@bb/config --filter=@bb/db --cache-dir="${TURBO_CACHE_DIR:-.turbo/cache}" --continue --concurrency=2 --output-logs=new-only --summarize

- name: Bound saved Turbo cache
run: node scripts/prune-turbo-cache.mjs --dir .turbo/cache --max-size-mb 256 --keep-run-summaries .turbo/runs

windows-app-smoke:
name: Windows app smoke (Node 22.x)
Expand Down Expand Up @@ -249,7 +253,13 @@ jobs:
shell: bash
env:
CACHE_RESTORE_OUTCOME: ${{ steps.cache.outcome }}
run: bash .github/actions/setup-workspace/install-dependencies.sh --ignore-scripts
APP_SHARD: ${{ startsWith(matrix.shard, 'app-') }}
run: |
filters=()
if [[ "$APP_SHARD" == "true" ]]; then
filters=(--filter bb --filter '@bb/app...' --filter '@bb/db...')
fi
bash .github/actions/setup-workspace/install-dependencies.sh --ignore-scripts "${filters[@]}"

- name: Setup Bun
if: ${{ matrix.shard == 'plugins-1' }}
Expand Down
28 changes: 22 additions & 6 deletions docs/ci-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ pnpm can restore the most recent store for the same OS and architecture when a
lockfile changes. The frozen install still resolves the exact lockfile contents
and verifies store integrity. Turbo caches are pruned after restoration and
before successful CI jobs save them. Windows skips the pnpm store archive and
restores Turbo outputs for the smokes and the Windows test shards, capped at
restores Turbo outputs for foundation checks, smokes, and test shards, capped at
256 MB per job to bound transfer and storage costs. The Windows test shards
also drop every entry their own Turbo run summary does not name before saving
(`prune-turbo-cache.mjs --keep-run-summaries`). Windows installs retain
`--ignore-scripts`; foundation tests still run with `--force`. macOS smoke jobs
`--ignore-scripts`; foundation checks reuse Windows-only cached results. macOS smoke jobs
still omit Turbo caching.

PR runs cancel superseded work. Main concurrency groups include the commit SHA,
Expand Down Expand Up @@ -250,10 +250,10 @@ Approaches measured and not adopted:
host suites failed 3 of 8 at two. The host daemon suite also failed 3 of 18
runs on eight vCPUs with nothing beside it, where Vitest runs twice as many
of its files at once.
- Installing without `@bb/mobile` and `@bb/desktop` took 22–27s against
38–40s. It was left out because it saves 14s and makes the Windows install
differ from every other job. Installing only `@bb/app`'s dependencies took
17s but `ensure-native-modules` could not find `better-sqlite3`.
- The October 5 install experiment excluded `@bb/mobile` and `@bb/desktop`
and took 22–27s against 38–40s. Installing only `@bb/app` dependencies took
17s but `ensure-native-modules` could not find `better-sqlite3`. The October 6
scoped install below includes `@bb/db` to retain that native prerequisite.
- Running the tarball smoke and desktop packaging at the same time. The tarball
smoke prunes and packs `packages/bb-app/dist` while packaging copies it.

Expand Down Expand Up @@ -291,3 +291,19 @@ entries. Run from the repository root at the default branch's current commit.
The script finishes paginating and validating inventory and PR states before
issuing any deletion. API requests time out after ten seconds; the maintenance
job has a five-minute budget and is independent of PR checks.

## October 6 scoped Windows installs

The four Windows app shards install the root tools, `@bb/app` and its transitive
dependencies, plus `@bb/db` and its dependencies for `ensure-native-modules`.
They retain the same test commands, sharding, and frozen lockfile. Other test
shards still install the full workspace.

In [benchmark run 37539104123](https://github.com/get-bb/bb/actions/runs/37539104123),
two scoped installs took 36s and 44s; two full installs took 66s and 72s on the
same four-vCPU Windows runner class. Each then ran the same uncached app shard.
This measures dependency setup, not an end-to-end two-minute CI guarantee.

Foundation lint, typecheck, and tests now reuse Windows-only Turbo results,
matching the other Windows jobs. Their saved cache is limited to 256 MB and
entries used by the current run.
8 changes: 4 additions & 4 deletions docs/windows-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ The job runs complete test suites and typechecks for nine packages:
Every other test suite runs in the `Windows tests` jobs described under
[Full test suite](#full-test-suite).

Turbo runs with `--force`, so a cached result from another OS cannot stand in for
Windows execution, and `--concurrency=2` limits contention between process-heavy
suites. Packages use shared Vitest workers with isolation for tests that mutate
Turbo reuses results from Windows-only cache keys; Linux and macOS entries
cannot satisfy these checks. `--concurrency=2` limits contention between
process-heavy suites. Packages use shared Vitest workers with isolation for tests that mutate
global state.

The native Windows coverage exercises:
Expand Down Expand Up @@ -52,7 +52,7 @@ Install and run the same slice from the repository root in PowerShell:
```powershell
npm install --global pnpm@9.15.0 --ignore-scripts
pnpm install --frozen-lockfile --ignore-scripts --filter bb --filter "@bb/process-utils..." --filter "@bb/host-workspace..." --filter "@bb/host-watcher..." --filter "@bb/agent-runtime..." --filter "@bb/provider-bridge-protocol..." --filter "@bb/provider-bridge-acp..." --filter "@bb/host-daemon-contract..." --filter "@bb/config..." --filter "@bb/db..." --filter "bb-plugin-provider-acp..." --filter "bb-plugin-provider-codex..." --filter "bb-plugin-echo-provider..." --filter "@bb/app..."
pnpm exec turbo run lint typecheck test --filter=@bb/process-utils --filter=@bb/host-workspace --filter=@bb/host-watcher --filter=@bb/agent-runtime --filter=@bb/provider-bridge-protocol --filter=@bb/provider-bridge-acp --filter=@bb/host-daemon-contract --filter=@bb/config --filter=@bb/db --force --continue --concurrency=2 --output-logs=full
pnpm exec turbo run lint typecheck test --filter=@bb/process-utils --filter=@bb/host-workspace --filter=@bb/host-watcher --filter=@bb/agent-runtime --filter=@bb/provider-bridge-protocol --filter=@bb/provider-bridge-acp --filter=@bb/host-daemon-contract --filter=@bb/config --filter=@bb/db --continue --concurrency=2 --output-logs=new-only --summarize
```

The filtered install includes root tooling, package dependencies, and the real
Expand Down
Loading