Skip to content

Overlap Linux packaging and tarball smoke checks - #6256

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-critical-path-20261024
Oct 25, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/ci-critical-path-20261024

Conversation

@ymichael

@ymichael ymichael commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Linux packaging was the last job in the latest full CI run (2m47s). It serialized the bb-app tarball smoke and AppImage build even after their shared prerequisites were ready. The smoke also serialized independent installs and runtime checks. Simply overlapping the packaging tasks was unsafe because the tarball regression fixture temporarily inserted and pruned files in the source package that Electron reads.

What changed

Run the Linux tarball smoke and AppImage build in one Turbo graph with shared prerequisites and a four-task concurrency limit. Independent branches finish even when a sibling fails; failed prerequisites still block their dependents. The existing AppImage mount lifecycle check follows packaging.

On Linux, copy the package into a private temporary fixture before inserting the stale CLI chunk and invoking real npm packing. Keep root dependencies out of the fixture while retaining nested vendored files. This leaves the build output immutable for concurrent Electron packaging. Also overlap the independent npx/SDK installs and full-stack/daemon-join checks, waiting for both operations and their process cleanup before removing temporary files. Preserve the installed-repack barrier.

No product runtime changes, added jobs or shards, skipped checks, or cache/invalidation changes. macOS scheduling is unchanged; Windows retains its existing parallel installs.

How you verified

  • Turbo bb-app tests/typecheck: 216 tests across 23 files passed. Formatting, script syntax, actionlint and diff checks passed. Dry-run confirms the shared build graph and two intended packaging tasks.

  • Paired same-runner benchmark, alternating order on four identical four-vCPU Linux runners:

    Order Sequential baseline Concurrent candidate Saved
    Baseline first, 1 53.84s 33.76s 20.08s
    Baseline first, 2 58.05s 33.24s 24.81s
    Candidate first, 1 46.78s 28.19s 18.59s
    Candidate first, 2 44.79s 28.06s 16.73s

    Mean packaging-stage time: 50.87 to 30.81 seconds, saving 20.05 seconds (39%). These measurements include real tarball smoke and AppImage packaging, with shared builds/Electron tool downloads prepared beforehand, fresh npm caches for each variant, and release outputs cleared between variants. They measure the affected tail of the critical-path job, not a 39% whole-CI improvement.

  • Initial cold-build benchmark: all four baseline/candidate jobs passed, including real AppImage mount lifecycle checks. Full command means were 96.21 versus 92.84 seconds, with substantial variation in unchanged prerequisite build times; the paired benchmark above isolates the scheduling change.

  • Independent smoke overlap experiment: smoke means 33.3 to 27.5 seconds, with every real install and runtime check retained.

  • Independent staging audit: direct and staged tarballs are byte-identical, including all 2,609 entries, contents, modes and links; source snapshots across 2,980 entries are unchanged. Disabling prepack pruning makes both versions fail the same stale-chunk assertion.

  • Independent real-process failure injection: npx, SDK, full-stack and daemon-join failures each wait for successful sibling completion, preserve the intended failure and remove all owned processes and temporary directories. Both Promise.all negative controls detect premature cleanup. The Linux scheduling/staging branches were activated temporarily on macOS for these isolated audits; the CI benchmark exercises actual Linux.

  • Final-head CI is green at 249bc428210df5c86304295436418c4ddf63aa87, including Linux/macOS packaging, Windows smoke checks, all selected tests, lint and typecheck.

AGENT GENERATED

@ymichael
ymichael marked this pull request as ready for review October 25, 2026 03:10
@ymichael
ymichael merged commit 8ee6cb6 into main Oct 25, 2026
52 checks passed
@ymichael
ymichael deleted the bb/ci-critical-path-20261024 branch October 25, 2026 03:13
ymichael added a commit that referenced this pull request Nov 4, 2026
## Human comments

## What was wrong

The macOS bb-app tarball smoke serialized two pairs of independent
checks: npx installation versus SDK installation/consumer compilation,
and full-stack startup versus daemon enrollment. Linux already overlaps
both pairs, and Windows already overlaps the install pair. In the latest
main run, the macOS smoke owner took 32.5 seconds inside a 71-second
step that also built prerequisites.

## What changed

Enable the existing parallel branches on macOS. Both branches retain
`Promise.allSettled`, wait for both operations and their process
cleanup, propagate failures, and preserve the installed-repack barrier.
The full-stack and daemon checks retain separate data directories and
reserved ports. All installations, package checks, assertions, and
runtime checks remain.

Only two platform conditions in the private smoke script change. No
product runtime code, shipped declarations, runner size, shard count,
timeout, or cache/invalidation changes. Linux and Windows scheduling is
unchanged.

## How you verified

- [Two-runner ABBA/BAAB
comparison](https://github.com/get-bb/bb/actions/runs/41771486199) on
ordinary six-CPU macOS runners, with shared build prerequisites prepared
and a fresh npm cache for every trial. All eight full real tarball
smokes passed, including installation, consumer compilation,
provider/worker checks, server startup, and daemon enrollment.

| Order | Trial1 | Trial2 | Trial3 | Trial4 |
| --- | --- | --- | --- | --- |
| Baseline/candidate/candidate/baseline |28.73s|24.57s|23.90s|29.92s|
| Candidate/baseline/baseline/candidate |26.40s|32.75s|30.12s|24.89s|

Mean smoke-owner wall time fell 30.38→24.94 seconds, saving 5.44 seconds
(17.9%). These are owner-phase savings, not a 17.9% whole-job or
whole-CI improvement; prerequisite builds were outside the measurement.

- `pnpm exec turbo run test typecheck --filter=bb-app`: 224 tests across
23 files passed; all 6 Turbo tasks passed. Formatting and diff checks
passed.
- Independent review found no blocking lifecycle, isolation, or cleanup
issues. This activates the same existing all-settled ownership branches
whose failure/cleanup behavior was independently exercised on macOS
while validating #6256; no test/check was removed or consolidated here.

> AGENT GENERATED
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