Skip to content

Reuse integration fixtures and use four Linux test workers - #6245

Merged
ymichael merged 2 commits into
mainfrom
bb/ci-execution-speedups-20261024
Oct 24, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/ci-execution-speedups-20261024

Conversation

@ymichael

@ymichael ymichael commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Every integration harness reran database migrations and rebuilt the same scripted-echo provider artifact. The Linux integration job also used only two Vitest workers on its four-vCPU runner. Together these repeated setup costs and limited concurrency lengthened a job that was among the remaining CI bottlenecks.

What changed

  • Build one SQLite template with the real migrations, copy a fresh database for every harness, and initialize its personal project separately. Global setup returns the template cleanup callback.
  • Reuse the immutable scripted-echo build promise per worker. Each harness still creates a fresh registry, server, daemon, provider processes, and sessions.
  • Use four workers in the existing Linux integration job. Keep the Windows worker count unchanged because the measured four-worker variant was slower.

These are test-support and CI changes. No production code, assertions, test selection, cache invalidation rules, shard counts, or timeouts change.

How you verified

Controlled benchmark: baseline, fixture reuse, and fixture reuse with four workers; two replicas on each four-vCPU Linux/Windows runner type, Node 22, empty Turbo caches. All 12 jobs passed the same 77 tests across 28 files.

Integration test task Baseline, two runs Fixture reuse Fixture reuse + four workers
Linux 46.53s / 39.16s 34.40s / 33.11s 27.13s / 24.77s
Windows 65.66s / 42.54s 42.92s / 41.64s 54.23s / 68.06s

Linux mean test-task time falls from 42.8s to 26.0s, about 39%. The complete Linux command, including upstream tasks, falls from 40.5–48.1s to 26.0–28.4s. Windows timings are noisier, so these runs do not establish a precise percentage gain; its current worker count is retained. These are integration-job measurements, not whole-pipeline percentages.

Local full integration runs with three workers passed 77/77 in 39.39s baseline, 36.36s with database reuse, and 34.28s with database plus provider fixture reuse. Turbo lint/typecheck, formatting, diff checks, and actionlint passed (excluding existing custom Blacksmith runner labels). Real-provider suite setup/discovery passed; all 11 live-provider cases were deliberately filtered out, so no live-provider execution is claimed.

Independent review found no issues: the database helper preserves connection defaults and real schema, existing database tests cover template-copy isolation, direct server initDb coverage remains, and no tests/assertions were removed. The first final-head CI attempt passed every check except Linux server shard 2, which hit queued_message_claim_lost in the unchanged keeps queued choices separate until dispatch and preserves the next row test. Its server worker count and executed provider-registration path are unchanged. All 39 cases passed against the baseline helper in 11 focused runs; the separate CI reliability thread then reproduced the production race deterministically on the baseline by pausing the older send while a competing drain claims the newer row. That fix is tracked in #6247. Only the failed shard was rerun on the unchanged head. Final-head CI is green on 46241a7b06c7572dee5530707e0243e804a9918d; the passing retry does not fix the queue race. The benchmark workflow lives on a separate branch and is excluded from this PR.

AGENT GENERATED

@ymichael
ymichael merged commit 7f3414a into main Oct 24, 2026
97 of 98 checks passed
@ymichael
ymichael deleted the bb/ci-execution-speedups-20261024 branch October 24, 2026 22:35
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