The in-browser pixel-render fixture test was green locally but flaky in CI: the real pdf.js worker could not fetch /pdfjs-wasm/ in the CI Chromium container, so the CCITT canvas stayed blank (0 sampled pixels) and failed the suite — green locally, red in CI, root cause not locally reproducible. A flaky gate is worse than none. This bug is a build/serve parity failure, so guard it deterministically where it actually breaks: a postbuild assertion that jbig2.wasm and openjpeg.wasm shipped into build/client/pdfjs-wasm/ (non-empty). It runs after `npm run build` — including the Docker build stage — and fails the build loudly if a future pdfjs bump makes the static-copy glob match nothing. Combined with the getDocument(wasmUrl) unit guard and the negative-path render test, the regression is covered without CI flake. Addresses re-review: Tobias (no automated parity check), Sara (pixel test not pinned). Render-decode correctness verified manually via `node build` serving /pdfjs-wasm/jbig2.wasm as application/wasm. Refs #708 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
frontend/scripts/
One-off developer utilities. Each script is local-only and never invoked from CI. Re-run intentionally when needed; commit any generated artefacts as a separate, atomic commit.
| Script | Purpose |
|---|---|
capture-network-fixture.mjs |
Capture the canonical GET /api/network response into src/lib/person/genealogy/__fixtures__/stammbaum.json. Used by buildLayout.test.ts. Re-capture when the production family graph grows a new structural case (new edge type, new marriage configuration). |
Usage
cd frontend
node scripts/capture-network-fixture.mjs
Defaults to BACKEND_URL=http://localhost:8080 and the dev admin credentials.
Override via env vars (BACKEND_URL, CAPTURE_EMAIL, CAPTURE_PASSWORD).
The script exits non-zero if the captured fixture would be vacuous (fewer than
100 nodes, fewer than 5 generations, or zero SPOUSE_OF edges).