Test fixtures
Golden inputs frozen for the characterisation tests (plan Step 1). They describe the Report v2 document as the current application produces it.
| File | Content |
|---|---|
report-v2.full.json |
One report exercising every zone kind the editor can produce: plain hinge point, bilateral joint with both sides, spine zone with vertebrae, detail-popup zone, catalog findings (with and without vet referral and side), free text, severity, comment, conclusion, recommendations, dated next appointment. boneId values are the real data-anno-id of the legacy Horse.svg / Horse_head.svg now kept under supabase/seed/anatomical-sheets/equine/legacy-sources/; zoneId/path values exist in pathologies.json. |
report-v2.minimal.json |
Smallest valid v2 report (no observations). |
report-v2.full.pdf, report-v2.minimal.pdf |
The two reports exported by the v2 pipeline (commit 199e328, Step 5.0, rasteriser stubbed to a 1×1 PNG, no logos): the archive-like PDFs the v3 importer must read and migrate. Synthetic data only. |
Do not edit these files to make a test pass: they are the behavioural oracle for the Report v2 → v3 adapter and for PDF regression. Add a new fixture instead.
Step 6 freeze (Phase 0, 2026-10-11)
What the PDF pipeline produced right before the Step 6 refactor, recorded by
tests/unit/pdf.goldens.test.ts on the bundled draft sheet
(docs/development/STEP6_PDF_ARCHIVE_ANALYSIS.md §17).
| File | Content |
|---|---|
report-v3.demo.json |
Report v3 on the draft (ids from draft/document.json), 6 observations: main-view points, head-view points, spine zone with vertebrae, bilateral zone with both sides, a vet-referral leaf, a leaf whose label holds an en dash (U+2013), free-text findings, severities, comments, conclusion, recommendations, period next appointment; sheet = the draft ref at freeze time. |
report-v3.bare.pdf |
The demo report exported by the current code (rasteriser stubbed to a 1×1 PNG, no logos, FR): import fixture for the engine. |
goldens/step6/text.<report>.<locale>.<logos>.json |
Every drawText of the export, in drawing order: { page, text, x, y, size, font }, numbers rounded to 2 decimals. |
goldens/step6/images.<report>.<locale>.<logos>.json |
Every drawImage: { page, x, y, width, height }. Recorded per locale too: the footer centres the "powered by" block on the label width, so the ZenQuality logo shifts between FR and EN. |
goldens/step6/links.<report>.<locale>.<logos>.json |
Every /Annot /Link read back from the saved PDF: { page, rect, uri }. Per locale for the same footer reason. |
goldens/step6/views.<report>.json |
Per (observation, view) of the report, the highlighted SVG parsed: viewBox, halo filter present, highlighted elements, visible non-highlighted markers, remaining data-* attributes, <title> count. |
Reports: v2full (report-v2.full.json migrated), demo (report-v3.demo.json),
v2unresolved (legacy sphenoid and ssb leaves plus one frontal leaf, migrated;
zone-less, so its images and views goldens are empty). Logo modes: nologos
(every branding slot empty, 1×1 rasteriser) and logos (the four logo files bundled
under apps/app/src/assets/brand, rasteriser stubbed to a 2×1 PNG).
Never regenerate these files without a user decision; the Step 6 engine must
reproduce them. Generation, once: MAKE_GOLDEN=1 corepack pnpm vitest run tests/unit/pdf.goldens.test.ts from apps/app.
R4 freeze (2026-10-18)
What the TypeScript PDF engine and reader produced right before the Rust port,
frozen on branch feature/rust-r4-pdf-core (docs/development/RUST.md §10.1
lists every oracle with its commit). Generators run behind MAKE_R4_ORACLES=1;
without the flag the same tests assert equality with the committed files.
| Path | Content |
|---|---|
r4/reports/{L,CAP}.json |
Synthetic Report v3 on the draft: 60 observations / 120 views (L) and 500 / 1,000 (CAP), the export memory inputs of plan §B.4 (O13). |
goldens/r4/draw.*.json |
Every drawing call of the export (text, image, line, rectangle, link) at full precision, per page and in call order, for the 12 Step 6 report × locale × logo combinations (O1). |
pdf/r3/ |
The 12 PDFs the R3-era engine produced for those combinations, the store-path export with its report.json, and real/v2full-obs1.fr.logos.pdf with its two browser PNGs and manifest: the byte references of the writer port (O2). |
goldens/r4/pdf.*.sha256 |
Digests of the Rust writer's own output on the 14 O2 runs (not an oracle of the TypeScript: the proof that the wasm module and the application path write the native bytes). Frozen at R4.5; rewritten once at R4.6 when the writer became incremental (catalog and page tree written last, upper-case hex strings as pdf-lib), every O2 comparison and the poppler render unchanged. MAKE_R4_ORACLES=1 cargo test --test pdf_serialize r4_output_digests_are_frozen rewrites them, never to hide a difference with O2. |
pdf/step6/envelope.*.pdf |
Three envelope PDFs from before R2 (O3). |
pdf/r4/tolerance/ |
51 PDFs, valid and hostile, with today's import outcome and message in crates/core/tests/oracles/r4/tolerance.json (O8). |
pdf/r4/read/, pdf/r4/inflate/ |
155 reader inputs and 24 zlib framing inputs, the bytes behind read.json and inflate.json; a <slug>.gen.json describes a large input by concatenation (O7, O9). |
Synthetic data only, no real bilan. Never regenerate these files to make a test pass: a difference between the Rust port and an oracle is reported and decided (plan §A.3), or it is a bug in the port.