Skip to content

test: compile every segment before the unit run - #128

Merged
finom merged 1 commit into
mainfrom
fix-deno-flake
Oct 21, 2026
Merged

finom merged 1 commit into
mainfrom
fix-deno-flake

Conversation

@finom

@finom finom commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The runtimes (deno) job failed once on #127 (run 39535160824): vovk dev requests every segment's schema ~5 s after start, all at once, while the tests are already running. Two first compilations overlapped and Next.js's loadManifest parsed a half-written manifest (SyntaxError: Unexpected end of JSON input), so /api/client2/_schema_ and the test's client2 request answered 500.

scripts/wait-for-test-app.mjs now waits for the app, then requests each segment's _schema_ one at a time (segments read from test/.vovk-schema) before test:unit starts. Used by unit, unit:bun, unit:deno and test-only.

Checked locally: Node 348/348, Deno 2.9.6 348/348 ×3; the log shows the 7 segments compiling in order before the first test and the watcher's own schema requests then answering in ~3 ms. The race itself didn't reproduce locally (fast machine), so the proof is the CI stack trace.

next dev --webpack can answer 500 when two first compilations overlap (loadManifest reads a half-written manifest); the Deno job hit it once.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
realtime-kanban Ready Ready Preview Oct 21, 2026 3:15am UTC
vovk-examples Ready Ready Preview Oct 21, 2026 3:15am UTC
vovk-hello-world Ready Ready Preview Oct 21, 2026 3:15am UTC
vovk-multitenant-example Ready Ready Preview Oct 21, 2026 3:15am UTC

Request Review

This branch was successfully deployed

4 active deployments
Preview – vovk-examples — d31d7776 Deployed Oct 21, 2026 by vercel[bot]
Preview – vovk-multitenant-example — d31d7776 Deployed Oct 21, 2026 by vercel[bot]
Preview – vovk-hello-world — d31d7776 Deployed Oct 21, 2026 by vercel[bot]
Preview – realtime-kanban — d31d7776 Deployed Oct 21, 2026 by vercel[bot]
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