Skip to content

fix(verify): wait for dev servers to compile before running browser specs - #263

Merged
Bccorb merged 1 commit into
mainfrom
fix/verify-dev-warmup
Oct 9, 2026
Merged

Bccorb merged 1 commit into
mainfrom
fix/verify-dev-warmup

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Why

The svelte-dev layer failed on run 37880143781 (PR #261, attempt 1): only the first spec, react/emailOtpLogin.spec.ts, timed out after 10s waiting for the /login heading (verify/harness/lib/reactFlows.ts:57). The other six passed, and attempt 2 passed all 13 layers. #261 touches nothing under verify/, so this is a startup race, not a regression.

A Vite dev server answers / and /health before it has compiled anything, so the first navigation paid for the cold transform of the whole client graph. For SvelteKit that is about 90 modules, because its client runtime under @sveltejs/kit/src/runtime is served as source, not prebundled. No dependency is discovered late: the container logs show the scanner finding every import (@seamless-auth/svelte included) and no re-optimization or reload, so optimizeDeps.include would not change anything.

A second issue made the compose healthchecks irrelevant: seamless verify started each browser service with up -d and never waited on them. The only gate was the harness's /health probe. That is also why the production nginx healthchecks could fail on every run without anyone noticing.

What

  • verify/vue-app and verify/svelte-app warm their client modules at startup (server.warmup.clientFiles). SvelteKit's kit client entry is named explicitly, because warmup globs skip node_modules.
  • The vue-dev and svelte-dev healthchecks wait for a compiled module and then the prebundled SDK, in order, the way angular-dev waits for /main.js. Fetching the entry first avoids a misleading "file does not exist" error that Vite 7 logs when a prebundled file is requested before the dependency scan has registered it.
  • seamless verify now runs up -d --wait for each browser pass after the build. A service that never becomes healthy fails only its own layer and dumps its recent logs. The run continues (new unit test).
  • The react, angular, vue, and svelte nginx healthchecks probe 127.0.0.1. busybox wget resolves localhost to ::1, and nginx listens on IPv4 only, so these had never passed. --wait would otherwise fail every production layer.

Verification

All runs below start from fresh containers, after a --no-cache image build.

Layer Container CPU Before (first spec) After (first spec)
svelte-dev unthrottled passes 0.7 to 0.9s, 3 of 3 pass
svelte-dev 0.1 fails at 10.1s (2 of 2, same error as CI) 5.3 to 6.6s, 2 of 2 pass
vue-dev unthrottled passes 0.6 to 0.7s, 3 of 3 pass
vue-dev 0.1 passes, but 11 to 13s 1.0s, 2 of 2 pass

None of the container logs from these runs contains a dependency re-optimization, a reload, or a missing-file error after the first page load. The startup cost now lands before the healthcheck passes, which --wait absorbs.

A full seamless verify --dev against seamless-templates main passed 13 of 13 layers. npm run build and npm run coverage pass (1246 tests).

…pecs

The svelte-dev layer failed its first spec on run 37880143781 while the
other six passed: the first navigation to /login timed out after 10s.
A Vite dev server answers / and /health before it has compiled anything,
so the first page load paid for the cold transform of the whole client
graph (about 90 modules for SvelteKit, whose client runtime is served as
source). Reproduced locally with the container held to 0.1 CPU.

- vue-app and svelte-app warm their client modules at startup through
  server.warmup.clientFiles.
- The vue-dev and svelte-dev healthchecks wait for a compiled module and
  then the prebundled SDK, as angular-dev waits for its compiled bundle.
- seamless verify now brings each browser service up with --wait. Before,
  nothing waited on the compose healthchecks; the harness only probed
  /health. A service that never gets healthy fails its own layer, with its
  logs, and the run continues.
- The nginx services' healthchecks probe 127.0.0.1. busybox wget resolves
  localhost to ::1 and nginx listens on IPv4 only, so they never passed,
  which went unnoticed while nothing waited on them.
@Bccorb
Bccorb merged commit 2a164f0 into main Oct 9, 2026
5 checks passed
@Bccorb
Bccorb deleted the fix/verify-dev-warmup branch October 9, 2026 14:40
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