test: reduce browser journey fixture and shard setup - #302
Closed
kalvinnchau wants to merge 1 commit into
Closed
kalvinnchau wants to merge 1 commit into
kalvinnchau wants to merge 1 commit into
Conversation
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Contributor
Author
|
Self-review of |
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.
Goal
Reduce repeated browser-journey setup without reducing coverage, assertions, engine support, or measurement isolation.
Changes
sourcePluginsoption for messages' stateless media middleware. Browser contexts, storage and fixture identities remain test-local.@native-fixturetag restore the Rust caches/buildfixture-bridge. Empty/failed discovery fails closed; cache misses still build. No shard number is hard-coded.No application code, retries, timeouts, worker/shard counts, measurement selection, or existing assertions changed. Most of the large textual diff is dedenting test bodies after removing their per-test server
try/finallywrappers. An AST comparison verified all 264 agent-control and 224 messagesexpectcall nodes are unchanged.Local before/after evidence
Environment: Apple Silicon macOS, pinned Node 24.18.0 / Playwright 1.63.0, two workers. One sample per engine, not a statistical or hosted-CI speedup claim. Dependencies/browser engines were already installed. Suite wall time includes browser/fixture setup; individual Vite setup time was not instrumented separately.
Command (each engine separately):
Before: clean
64be4c2a. After: the same base with this PR's fixture changes. The branch subsequently incorporated48c9a11d; the affected files plus its profile journeys were rerun successfully.The slowest case remained the shared-thread UI journey: Chromium 16.52s → 16.68s, WebKit 18.98s → 17.16s. This change removes repeated setup rather than shortening that journey's assertions.
Hosted baseline: successful main run 36179555533,
4012979b, Ubuntu 24.04 x64: slowest WebKit shard 11m50s total / 10m21s functional command; shared setup 50s, Rust cache 5s, native build 28s. All six shards previously built the fixture (20–28s each). Different source snapshots and cold/new cache keys prevent treating a single PR run as a controlled speedup comparison. Hosted evidence is recorded below.Regression coverage and validation
bin/node --test tests/integration/browser-ci.test.mjs tests/integration/vite-fixture.test.mjs: 11 passed. Executes the actual discovery shell for all six shards, verifies complete nonduplicated selection, native setup ownership, exact engine-install arguments, invalid input rejection, cache guards and the required gate.startsbecomes 2 instead of 1); restoring worker scope passes. The controls also passed three repetitions in both engines.--repeat-each=2: 88 passed, zero retries/skips. An initial static-control-only optimizer cleanup error was fixed by avoiding unrelated dependency discovery in that HTML-only control; product fixture optimization is unchanged.06ce001f.git diff --checkpassed. Existing organization hooks and repository hooks both ran; pre-push correctly selected no source-unit/design inputs for this tooling/test-only change.Hosted result at
06ce001fCI run 36187164665 passed, including the required aggregate, JavaScript, Rust/tool integration and both browser lanes. DCO, Semgrep and zizmor also passed. Browser artifacts identify the checked PR merge tree as
5d1a9fb9.Nearest passing baseline: 36185070394,
64be4c2a, the same Ubuntu 24.04 x64 / Playwright 1.63.0 environment. This is an observational comparison, not a controlled benchmark: the PR merge tree includes later main changes, fixture ownership changes file grouping, runner speed varies, and cache warmth differs.Summed test execution: Chromium 2165.50s → 1997.03s; WebKit 2592.40s → 2646.06s. Measurements: 170.85s → 169.35s command wall, 159.62s → 158.88s summed execution.
Changed-file execution sums: agent-control Chromium 134.4s → 75.1s, WebKit 90.9s → 90.9s; messages Chromium 116.6s → 80.9s, WebKit 65.5s → 84.8s. The remaining slowest WebKit files are nested-replies (226.3s) and message-navigation (157.9s). The slowest job remains about 11 minutes: this run does not establish a whole-suite speedup. Repeated, same-snapshot warm-cache comparisons remain deferred rather than claiming the local reductions transfer directly to CI.
Remaining checks / human verification
Draft until those checks and human confirmation are complete.