Skip to content

Avoid repeated tarball extraction in npm consumer smoke checks - #6260

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-windows-package-costs
Oct 26, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/ci-windows-package-costs

Conversation

@ymichael

@ymichael ymichael commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The package smoke test passed an unnamed local tarball to both npx and npm install. npm/pacote repeatedly extracted the entire application archive merely to discover its manifest before doing the real installation. On Windows this dominated the consumer-install portion of packaging CI, despite cached package downloads.

What changed

The npx check now installs the real packed bb-app through a private loopback registry fixture. The fixture reads metadata from the tarball, serves the unchanged archive with its SHA-512 integrity, and redirects other package requests to the public npm registry. Each invocation uses a random dist-tag: changing only the registry port would allow npx to reuse a previous installed tree for the same version. The server closes after success or failure.

The separate SDK check still performs a fresh local-tarball installation, now with an explicit bb-app@file:... specification so npm can skip name discovery. Native install scripts, dependency resolution, TypeScript consumer compilation, installed-package repacking, provider/worker checks, full-stack startup, and daemon enrollment remain enabled. The npx check changes from local-file resolution to registry resolution and real executable dispatch, matching the advertised entry path; local-file installation remains covered by the SDK check.

Only the smoke-test script changes. No application/runtime code, published package contents, dependencies, cache keys, invalidation rules, runner sizes, or shard counts change.

How you verified

  • Windows paired benchmark: two runners, ABBA/BAAB order, four baseline and four candidate full-smoke executions, all passed. Mean 47.66→38.26s: 9.40s / 19.7% faster, including the slower first candidate. Baseline-first samples: 46.99/54.40s baseline versus 36.65/35.95s candidate; candidate-first samples: 44.92/44.32s baseline versus 44.95/35.47s candidate.
  • macOS paired benchmark: same ABBA/BAAB methodology, all eight executions passed. Mean 28.98→25.18s: 3.80s / 13.1% faster. These are complete tarball-smoke task timings after common build prerequisites, not whole-workflow percentages.
  • Independent freshness/failure proof with real npm/npx: three different tarballs at the same package version and one isolated npx cache. Old valid package succeeds, new broken executable fails with intended exit 37, third valid package succeeds; each produces a distinct installed tree. Repeated using a separate packing cache and confirmed each archive was fetched over HTTP. The registry socket closes after every call, including failure. This was one-off verification, not an added permanent helper test.
  • Local pnpm exec turbo run smoke:tarball --filter=bb-app --concurrency=4 passed. pnpm exec turbo run lint typecheck test --filter=bb-app passed; formatting and diff checks passed.
  • Final-head CI passed on ea5316b328e23f46fda35b9373012947ef6bf2fe, including Linux/macOS package smoke, Linux AppImage lifecycle, Windows app and desktop smoke, and all selected package tests. Windows coverage includes archive paths with drive letters.

AGENT GENERATED

@ymichael
ymichael marked this pull request as ready for review October 25, 2026 05:31
@ymichael
ymichael merged commit 3540a69 into main Oct 26, 2026
27 checks passed
@ymichael
ymichael deleted the bb/ci-windows-package-costs branch October 26, 2026 03:45
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