Repository navigation
fix(ci): e2e near 2 minutes via shared web build, consolidated browser boots, sharded jobs - #1098
Merged
TheGreatAxios merged 12 commits intoOct 9, 2026
Conversation
TheGreatAxios
marked this pull request as draft
October 9, 2026 02:48
…-1 assertions The web-build freshness fingerprint previously hashed HEAD plus worktree status only, so a BASE_URL env flip produced a different dist under an identical tree and isWebBuildFresh still reported true. Add a regression test asserting freshness is false when the effective build config flips under an unchanged tree, plus a guard that a non-serializable config is rejected loudly. Restoring the evaluation-journal assertion in zero-to-one (dropped when reply.test.ts folded in): the worker reply must prove the scripted inference provider was dialed. Also wait for the 'Start this workbench' button's enabled state before clicking in zero-to-one, matching runFirstRunFlow, to close the navigate-to-/w/ flake window.
…e in CI webBuildFingerprint now hashes the build's effective configuration (via a new buildConfig argument) alongside HEAD and worktree status, so a BASE_URL env flip invalidates the marker and rebuilds the web bundle instead of serving a stale dist. webBuildConfig() in the browser harness passes the env the vite build reads; the freshness check, marker write, and compose all share it. Wire e2e/lib/web-build.test.ts into the CI e2e-hub job: it lives in e2e/lib, which no browser/mcp shard glob and no workspace package test root would otherwise run, so its fingerprint unit suite was dead in CI and in the local gate.
The production dist never bakes an env: apps/web/vite.config.ts reads BASE_URL only for the dev-server proxy, and apps/web/src has no process.env / import.meta.env references. But e2e/lib/hub.ts sets process.env.BASE_URL to each hub's port at boot and never restores it; with every browser file in one 'bun test' process, a leaked BASE_URL must not flip the fingerprint or the shared-build freshness gate would rebuild apps/web per suite. Guard exactly that, capturing the fingerprint after the marker exists so both sides of the comparison see the same tree.
webBuildConfig() stamped process.env.BASE_URL into the freshness fingerprint, but that was doubly wrong: the production dist is env-independent (BASE_URL only configures the dev-server proxy), and the hub boot leaks the env (hub.ts:80) so subsequent browser suites in a CI shard would hash a different BASE_URL than the stored marker and rebuild apps/web each time — defeating the shared-build freshness gate. Remove the build-config component entirely; the fingerprint is HEAD + worktree status again, exactly as before this change.
TheGreatAxios
marked this pull request as ready for review
October 9, 2026 05:13
TheGreatAxios
deleted the
cl-9850-fixci-e2e-near-2-minutes-via-shared-web-build-consolidated
branch
October 9, 2026 05:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts the ~8-minute e2e run three ways. Fewer, higher-quality suites: reply folds into zero-to-one's single flow (naming, Custom field count, rename finale; second signup deleted) and setup plus composer-layout fold into first-run.test.ts on one shared boot (seed-nothing test first; setup's helper copies deleted). 11 browser files to 8 with every unique assertion preserved.
Layers: (1) apps/web builds once per e2e process via a dist fingerprint (e2e/lib/web-build.ts, unit-tested); (2) the consolidation above, which also pulls boots back inside the documented per-process budget; (3) CI splits into a 3-shard browser matrix (round-robin, new files auto-join) plus a Chrome-less hub job.
Local gates green: typecheck, lint (0 errors), fmt, focused unit tests. Honest estimate is ~3.5 min wall clock, not 2 — the floor is deploy physics plus per-job overhead. True 2 min needs cutting a deploy cycle.
Linear: CL-9850.