Skip to content

fix(controller): warm the WebView browser in beforeAll — the transport-seam flake - #346

Merged
EdwardIrby merged 1 commit into
mainfrom
fix/controller-webview-warmup
Sep 23, 2026
Merged

EdwardIrby merged 1 commit into
mainfrom
fix/controller-webview-warmup

Conversation

@EdwardIrby

Copy link
Copy Markdown
Member

Context

  • The controller: injectable transport seam > constructs and accepts the injected transport spec flaked on main (run 35867400677, first attempt): the first Bun.WebView in a test process pays cold headless-Chrome startup, and on a cold CI runner that exceeded the test's 20s budget.

Summary

  • Warm the chrome backend once in beforeAll (60s hook budget) with a throwaway view so every spec runs against a warm browser. Applied to both WebView harnesses (controller.spec.ts, transport-seam.spec.ts); the controller harness notes document the warm-up.

Changed Files

  • src/controller/tests/controller.spec.ts — beforeAll warm-up + harness-notes bullet.
  • src/controller/tests/transport-seam.spec.ts — beforeAll warm-up.

Known Failures / Drift

  • None. bun run check clean; full suite 605 pass / 0 fail (bun 1.4.2). First WebView test dropped from ~795ms to ~138ms locally.

Review Notes / Residual Risks

  • Retry ({ retry: N }) was considered and rejected: it masks the cold start and taxes every cold run with a full-timeout burn. The warm-up pays the cost once.

…t-seam flake

The `constructs and accepts the injected transport` spec timed out at 20s on a
cold CI runner: the first Bun.WebView in a process pays cold headless-Chrome
startup, and the test-level 20s budget was too small to absorb it. Warm the
chrome backend with one throwaway view in beforeAll (60s hook budget) so the
specs run against a warm browser. Applied to both WebView harnesses
(controller.spec.ts and transport-seam.spec.ts); controller.spec's harness notes
document the warm-up.
@EdwardIrby
EdwardIrby merged commit b057501 into main Sep 23, 2026
6 checks passed
@EdwardIrby
EdwardIrby deleted the fix/controller-webview-warmup branch September 23, 2026 16:18
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