diff --git a/crates/core/tests/pdf/LEDGER.tsv b/crates/core/tests/pdf/LEDGER.tsv index 13636d11..201b5992 100644 --- a/crates/core/tests/pdf/LEDGER.tsv +++ b/crates/core/tests/pdf/LEDGER.tsv @@ -1,57 +1,57 @@ ts_file case_title disposition target oracle note -apps/app/tests/unit/archive.envelopes.test.ts archive envelope of v2full > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/archive.envelopes.test.ts archive envelope of demo > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/archive.envelopes.test.ts archive envelope of v2unresolved > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 +apps/app/tests/unit/archive.envelopes.test.ts archive envelope of v2full > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/archive.envelopes.test.ts archive envelope of demo > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/archive.envelopes.test.ts archive envelope of v2unresolved > matches the frozen envelope and the N-1 reader accepts it kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 apps/app/tests/unit/migration.leaves.test.ts the 612 legacy leaves in the application > resolves every migrated leaf to a leaf node of the bundled sheet kept vitest (same case) - - apps/app/tests/unit/migration.leaves.test.ts the 612 legacy leaves in the application > keeps every finding, resolved or not, through an archive PDF export and import kept vitest (same case) - - -apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > a new report kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the editor reducers (zones, sides, vertebrae, findings) kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the restore of a v2 draft left by the previous version kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the import of an archive (draft and archive mirror) kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports > the attachment of report-v3.demo.json reads back through the N-1 reader kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 -apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports > the attachment of report-v2.full.json reads back through the N-1 reader kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8 +apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > a new report kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the editor reducers (zones, sides, vertebrae, findings) kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the restore of a v2 draft left by the previous version kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/n-1.reader.test.ts drafts written through the core > after the import of an archive (draft and archive mirror) kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports > the attachment of report-v3.demo.json reads back through the N-1 reader kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 +apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports > the attachment of report-v2.full.json reads back through the N-1 reader kept vitest (same case) - reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8 apps/app/tests/unit/pdf.browserRasterizer.test.ts browserRasterizer > returns PNG bytes for a valid SVG, sized by the engine kept vitest (same case) - - apps/app/tests/unit/pdf.browserRasterizer.test.ts browserRasterizer > falls back to toDataURL when toBlob returns null kept vitest (same case) - - -apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > T2 catalog changed: the envelope re-exports the archived sheet, not the revised one ported cargo pdf_serialize::restoration_round_trip_loses_nothing - export_from_envelope -apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > scenario 3 branding changed: the envelope re-exports the archived branding and never fetches ported cargo pdf_serialize::restoration_round_trip_loses_nothing - export_from_envelope -apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 replaced vitest (same case); cargo pdf_png::every_o6_decode_matches_pdf_lib O6 pdf-lib embedPng check of the golden rasters +apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > T2 catalog changed: the envelope re-exports the archived sheet, not the revised one ported cargo pdf_serialize::restoration_round_trip_loses_nothing - suite deleted at R4.8: the re-export from the envelope alone is cargo export_from_envelope (no sheet, no branding in its signature), byte-equal on 13 runs +apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > scenario 3 branding changed: the envelope re-exports the archived branding and never fetches ported cargo pdf_serialize::restoration_round_trip_loses_nothing - suite deleted at R4.8: the re-export from the envelope alone is cargo export_from_envelope (no sheet, no branding in its signature), byte-equal on 13 runs +apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 replaced vitest (same case); cargo pdf_png::every_o6_decode_matches_pdf_lib O6 the golden rasters as the core writes them (XObject sizes read from the file since R4.8) apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the demo report covers the sheet features the goldens must freeze kept vitest (same case) - inputs of the kept views cases apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the v2unresolved report really carries unresolved findings kept vitest (same case) - inputs of the kept views cases -apps/app/tests/unit/pdf.goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens -apps/app/tests/unit/pdf.goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens +apps/app/tests/unit/pdf.goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) apps/app/tests/unit/pdf.goldens.test.ts goldens of v2full > highlighted views: same facts but titles and data attributes kept vitest (same case) - app path -apps/app/tests/unit/pdf.goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens -apps/app/tests/unit/pdf.goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens +apps/app/tests/unit/pdf.goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) apps/app/tests/unit/pdf.goldens.test.ts goldens of demo > highlighted views: same facts but titles and data attributes kept vitest (same case) - app path -apps/app/tests/unit/pdf.goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens -apps/app/tests/unit/pdf.goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens +apps/app/tests/unit/pdf.goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales; app-path bytes = native digest replaced vitest (same case, read from the file); cargo pdf_layout::step6_text_and_image_goldens_derive_from_the_log, pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1 Step 6 text, images and links goldens; read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) apps/app/tests/unit/pdf.goldens.test.ts goldens of v2unresolved > highlighted views: same facts but titles and data attributes kept vitest (same case) - app path apps/app/tests/unit/pdf.goldens.test.ts report-v3.bare.pdf > is the demo report exported bare by Step 5 and imports with no archive kept vitest (same case) - bare v3 import -apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > no_attachment for a PDF without the attachment replaced vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > attachment_stripped for a stamped archive whose attachment was removed replaced vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > invalid_pdf for an oversized file, before parsing it replaced vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.import.test.ts importAttachment on the core (L1) > refuses an attachment with a lone surrogate as lone_surrogate, never rewritten replaced vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.import.test.ts importAttachment on the core (L1) > imports normal text with pairs and literal backslashes unchanged replaced vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > produces one page per observation plus the conclusion, labels from the sheet replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > attaches the envelope and roundtrips in both locales replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > highlights the observation zones of a view and omits the other markers replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > prints the empty marker for a zoneless observation and keeps its findings replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > prints an unknown annotation id and an unknown finding zone raw replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > draws the EN dictionary, annotation names and finding snapshots replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > draws free findings, comments, the conclusion page and the header on every page replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > sets the PDF metadata and the archive keyword replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > embeds the four bundled logos without any network request replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > attaches osteo-report.json as a Flate EmbeddedFile, AFRelationship Data, "Faunosteo report archive v1" replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts a raster the browser cannot draw > is a view_raster_failed warning; the export continues without that image replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts attachment rejection > reports no_attachment for a foreign JSON attachment (no version) replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts attachment rejection > reports no_attachment for a v3 report failing validation replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > migrates the full v2 report: ids, views, paths, severities, unresolved findings replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > keeps a v2 finding whose node was removed and a zone whose id is unknown, both flagged replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > migrates the minimal v2 report replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > refuses unknown versions and unrelated PDFs with typed errors replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8 - pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader -apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > builds byte-stable scenario PDFs (MAKE_R4_ORACLES writes) deleted - O10 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > records every invocation (written under MAKE_R4_ORACLES) deleted - O10 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > covers the 11 scenarios and marks every A.3 class at least once deleted - O10 generator; oracle files kept (R4.8) +apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > no_attachment for a PDF without the attachment replaced cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker) - suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker) +apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > attachment_stripped for a stamped archive whose attachment was removed replaced cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker) - suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker) +apps/app/tests/unit/pdf.import.test.ts importReportFromPdf error kinds > invalid_pdf for an oversized file, before parsing it replaced cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker) - suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker) +apps/app/tests/unit/pdf.import.test.ts importAttachment on the core (L1) > refuses an attachment with a lone surrogate as lone_surrogate, never rewritten replaced cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker) - suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker) +apps/app/tests/unit/pdf.import.test.ts importAttachment on the core (L1) > imports normal text with pairs and literal backslashes unchanged replaced cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker) - suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker) +apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > produces one page per observation plus the conclusion, labels from the sheet replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > attaches the envelope and roundtrips in both locales replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts export on a full v3 report (FR) > highlights the observation zones of a view and omits the other markers replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > prints the empty marker for a zoneless observation and keeps its findings replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > prints an unknown annotation id and an unknown finding zone raw replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > draws the EN dictionary, annotation names and finding snapshots replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > draws free findings, comments, the conclusion page and the header on every page replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > sets the PDF metadata and the archive keyword replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > embeds the four bundled logos without any network request replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts PDF content on a two-observation report > attaches osteo-report.json as a Flate EmbeddedFile, AFRelationship Data, "Faunosteo report archive v1" replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts a raster the browser cannot draw > is a view_raster_failed warning; the export continues without that image replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts attachment rejection > reports no_attachment for a foreign JSON attachment (no version) replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts attachment rejection > reports no_attachment for a v3 report failing validation replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > migrates the full v2 report: ids, views, paths, severities, unresolved findings replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > keeps a v2 finding whose node was removed and a zone whose id is unknown, both flagged replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > migrates the minimal v2 report replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/pdf.roundtrip.test.ts import of the frozen v2 archive PDFs > refuses unknown versions and unrelated PDFs with typed errors replaced vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing - read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts) +apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > builds byte-stable scenario PDFs (MAKE_R4_ORACLES writes) deleted - O10 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > records every invocation (written under MAKE_R4_ORACLES) deleted - O10 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.compare-oracles.test.ts R4 O10 report:compare outputs of the TS CLI > covers the 11 scenarios and marks every A.3 class at least once deleted - O10 generator deleted at R4.8; oracle files kept apps/app/tests/unit/r4.synthetic-reports.test.ts the draft sheet the reports are built on > has two views, main first, and the demo has zones on both kept vitest (same case) O13 runs on the core only apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report L > matches the committed file kept vitest (same case) O13 runs on the core only apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report L > comes back byte for byte through the draft restore (draft.restore) kept vitest (same case) O13 runs on the core only @@ -61,27 +61,27 @@ apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report CAP > matches apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report CAP > comes back byte for byte through the draft restore (draft.restore) kept vitest (same case) O13 runs on the core only apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report CAP > rasterises two views per observation kept vitest (same case) O13 runs on the core only apps/app/tests/unit/r4.synthetic-reports.test.ts synthetic report CAP > stays within the export caps kept vitest (same case) O13 runs on the core only -apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > has unique case ids deleted - O8 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > builds byte-identical PDFs (written under MAKE_R4_ORACLES) deleted - O8 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > records the R3 outcome of every committed PDF deleted - O8 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > imports both controls with their archive state deleted - O8 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts O2 real raster: v2full first observation, fr, logos, resvg > freezes the PDF, every PNG returned and the call manifest deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts O2 store path: demo, next appointment set, practitioner edited > freezes the PDF and the store report; attachment order is D-R11 deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF demo.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF v2full.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator; oracle files kept (R4.8) -apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF v2unresolved.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator; oracle files kept (R4.8) +apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > has unique case ids deleted - O8 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > builds byte-identical PDFs (written under MAKE_R4_ORACLES) deleted - O8 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > records the R3 outcome of every committed PDF deleted - O8 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.tolerance-oracles.test.ts R4 O8 tolerance corpus on the R3 import path > imports both controls with their archive state deleted - O8 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2full > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of demo > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > nologos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > nologos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > logos > fr: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts writer oracles of v2unresolved > logos > en: O1 draw log, O2 PDF, rounded = step6 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts O2 real raster: v2full first observation, fr, logos, resvg > freezes the PDF, every PNG returned and the call manifest deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts O2 store path: demo, next appointment set, practitioner edited > freezes the PDF and the store report; attachment order is D-R11 deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF demo.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF v2full.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept +apps/app/tests/unit/r4.writer-oracles.test.ts O3 pre-R2 envelope PDF v2unresolved.fr.nologos > carries the frozen bytes, read back as is deleted - O1/O2/O3 generator deleted at R4.8; oracle files kept apps/app/tests/unit/routes.EditorRoute.export.test.tsx EditorRoute export > calls exportReportToPdf with the store report, the loaded index and the FR locale kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/routes.EditorRoute.export.test.tsx EditorRoute export > passes the active locale (EN) kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/routes.EditorRoute.export.test.tsx EditorRoute export > downloads bilan--.pdf through a blob URL it revokes after a delay kept vitest (same case) - mocks rewritten at R4.3 / R4.6 @@ -132,17 +132,17 @@ apps/app/tests/unit/routes.coreStopped.test.tsx the stopped text on the Home imp apps/app/tests/unit/routes.coreStopped.test.tsx the stopped text on the Home import line and the New report alert > New report: the alert says the stopped text kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/routes.coreStopped.test.tsx the stopped text on the Home import line and the New report alert > New report: the unsaved stopped text when storage is full kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/routes.coreStopped.test.tsx the stopped text on the Home import line and the New report alert > New report: keeps the sheet alert while the engine is not stopped kept vitest (same case) - mocks rewritten at R4.3 / R4.6 -apps/app/tests/unit/scripts.compare.test.ts compareReport on the frozen v2 archive PDF > shows every legacy zone and finding next to its canonical target ported cargo pdf_compare::frozen_v2_archive_pdf_shows_every_legacy_item_next_to_its_target O10 - -apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > names a removed finding, a finding unknown to the catalog and an unknown zone ported cargo pdf_compare::unresolved_items_name_a_removed_an_unknown_finding_and_an_unknown_zone O10 - -apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > reads a v3 report as is and flags what the sheet cannot place ported cargo pdf_compare::v3_report_read_as_is_flags_what_the_sheet_cannot_place O10 - -apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > prints the archive line of an envelope: snapshot kept, or rejected with its reason ported cargo pdf_compare::envelope_archive_line_says_snapshot_kept_or_rejected_with_its_reason O10 - -apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > warns when a v3 report was written on another sheet document ported cargo pdf_compare::v3_report_written_on_another_sheet_document_warns O10 - -apps/app/tests/unit/scripts.compare.test.ts diff and arguments > diffs the v3 content of a migrated v2 report and its v3 re-reading ported cargo pdf_compare::diff_of_a_migrated_v2_report_and_its_v3_re_reading O10 - -apps/app/tests/unit/scripts.compare.test.ts diff and arguments > compares placeholders by default and real texts with --full ported cargo pdf_compare::diff_compares_placeholders_by_default_and_real_texts_with_full O10 - -apps/app/tests/unit/scripts.compare.test.ts diff and arguments > parses files and options, refuses unknown ones ported cargo pdf_compare::arguments_parsed_and_unknown_options_refused O10 - -apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > escapes control characters in every untrusted string ported cargo pdf_compare::control_characters_escaped_in_every_untrusted_string O10 - -apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > does not throw on prototype-chain names used as legacy ids ported cargo pdf_compare::prototype_chain_names_as_legacy_ids_do_not_throw O10 - -apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > hides names and free texts by default, shows them with --full ported cargo pdf_compare::names_and_free_texts_hidden_by_default_shown_with_full O10 - +apps/app/tests/unit/scripts.compare.test.ts compareReport on the frozen v2 archive PDF > shows every legacy zone and finding next to its canonical target ported cargo pdf_compare::frozen_v2_archive_pdf_shows_every_legacy_item_next_to_its_target O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > names a removed finding, a finding unknown to the catalog and an unknown zone ported cargo pdf_compare::unresolved_items_name_a_removed_an_unknown_finding_and_an_unknown_zone O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > reads a v3 report as is and flags what the sheet cannot place ported cargo pdf_compare::v3_report_read_as_is_flags_what_the_sheet_cannot_place O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > prints the archive line of an envelope: snapshot kept, or rejected with its reason ported cargo pdf_compare::envelope_archive_line_says_snapshot_kept_or_rejected_with_its_reason O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts compareReport on unresolved items > warns when a v3 report was written on another sheet document ported cargo pdf_compare::v3_report_written_on_another_sheet_document_warns O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts diff and arguments > diffs the v3 content of a migrated v2 report and its v3 re-reading ported cargo pdf_compare::diff_of_a_migrated_v2_report_and_its_v3_re_reading O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts diff and arguments > compares placeholders by default and real texts with --full ported cargo pdf_compare::diff_compares_placeholders_by_default_and_real_texts_with_full O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts diff and arguments > parses files and options, refuses unknown ones ported cargo pdf_compare::arguments_parsed_and_unknown_options_refused O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > escapes control characters in every untrusted string ported cargo pdf_compare::control_characters_escaped_in_every_untrusted_string O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > does not throw on prototype-chain names used as legacy ids ported cargo pdf_compare::prototype_chain_names_as_legacy_ids_do_not_throw O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) +apps/app/tests/unit/scripts.compare.test.ts terminal safety and privacy > hides names and free texts by default, shows them with --full ported cargo pdf_compare::names_and_free_texts_hidden_by_default_shown_with_full O10 TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary) apps/app/tests/unit/state.coreFailures.test.tsx store actions on a failing core > change nothing and answer { ok: false } kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/state.coreFailures.test.tsx store actions on a failing core > answer { ok: true } on the live core kept vitest (same case) - mocks rewritten at R4.3 / R4.6 apps/app/tests/unit/state.coreFailures.test.tsx callers stop on a failed core call > the new-report page stays put when the core cannot load kept vitest (same case) - mocks rewritten at R4.3 / R4.6 @@ -154,97 +154,97 @@ packages/core-wasm/tests/n-1.scanner.test.ts the frozen scanner reads the archiv packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > stamp written as UTF-16BE hex (the export): attachment_stripped kept vitest (same case) O11 - packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > stamp written as literal: attachment_stripped kept vitest (same case) O11 - packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > the same file without the stamp: no_attachment kept vitest (same case) O11 - -packages/pdf/tests/goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts golden inputs > the v2unresolved report carries the unresolved findings of the freeze ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2full > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of demo > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/goldens.test.ts goldens of v2unresolved > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 - -packages/pdf/tests/inflate.test.ts inflateFlate > round-trips a payload spanning several slices ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > feeds the inflater in 16 KiB slices, each awaited ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > an output exactly at the limit passes, one byte more is null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > empty input: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > truncated stream: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > trailing junk: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > corrupt body: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > not deflate at all: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/inflate.test.ts inflateFlate > a 64 MiB bomb past the default cap is cancelled in well under a second ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 - -packages/pdf/tests/r3.highlight-oracles.test.ts R3 highlight oracles (TypeScript freeze) > matches the frozen highlighted trees deleted - R3 highlight generator; oracle files kept (R4.8) -packages/pdf/tests/r3.sanitiser-oracles.test.ts R3 sanitiser oracles (TypeScript freeze) > keeps every legitimate SVG untouched deleted - R3 sanitiser generator; oracle files kept (R4.8) -packages/pdf/tests/r3.sanitiser-oracles.test.ts R3 sanitiser oracles (TypeScript freeze) > matches the frozen verdicts deleted - R3 sanitiser generator; oracle files kept (R4.8) -packages/pdf/tests/r4.dates-oracles.test.ts R4 date oracles (TypeScript freeze) > matches the frozen formatDate outputs deleted - O5 generator; oracle files kept (R4.8) -packages/pdf/tests/r4.inflate-oracles.test.ts R4 inflate oracles O9 (TypeScript freeze, Node) > matches the frozen inputs and Node verdicts deleted - O9 generator; oracle files kept (R4.8) -packages/pdf/tests/r4.png-oracles.test.ts R4 PNG oracles (TypeScript freeze) > matches the frozen gate verdicts and decodes deleted - O6 generator; oracle files kept (R4.8) -packages/pdf/tests/r4.reader-oracles.test.ts R4 reader oracles O7 (TypeScript freeze) > matches the frozen inputs and reader outcomes deleted - O7 generator; oracle files kept (R4.8) -packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen AFM metrics and WinAnsi table deleted - O4 generator; oracle files kept (R4.8) -packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen text and number rules deleted - O4 generator; oracle files kept (R4.8) -packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > main (haloed) and head views: 1200 px wide, highlight present, sane coverage ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 - -packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > a rasterizer that throws: page without image, one view_raster_failed warning ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 - -packages/pdf/tests/read.test.ts T4 roundtrip > reads back the exported envelope whole ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.full.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.minimal.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > keeps the 29 unresolved findings of the 612-leaf report through export and import ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > reads report-v3.bare.pdf as a bare v3 with no archive ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T6 versions > envelope v2 wrapper: report kept, snapshot rejected as unsupported_envelope ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T6 versions > envelope v1 with a report v4: incompatible_version 4 ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts T6 versions > bare report version 7: incompatible_version 7 ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts attachment presence and selection > a stamped PDF without attachment: attachment_stripped ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts attachment presence and selection > a stamped PDF saved with object streams (pre-BLK-009 layout): the stamp is invisible, no_attachment ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts attachment presence and selection > a foreign PDF: no_attachment ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts attachment presence and selection > the Filespec named osteo-report.json wins over an earlier EmbeddedFile ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/read.test.ts attachment presence and selection > refuses an oversized file or one without a %PDF- header as invalid_pdf ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/reexport.test.ts re-export from the envelope alone > reproduces text, images, views and the envelope minus exportedAt ported cargo pdf_serialize::restoration_round_trip_loses_nothing O2 - -packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > finds the one Flate stream, named through its visible Filespec ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the length is the declared /Length and the data ends on endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the export keeps the Filespec, its name and the stamp in clear, no object stream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > readAttachmentBytes returns the inflated envelope bytes ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v2.full.pdf → origin v2 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v2.minimal.pdf → origin v2 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v3.bare.pdf → origin bare_v3 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > a stamped PDF with object streams hides its stamp: no_attachment (documented) ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts selection between several embedded files > a decoy EmbeddedFile first, the named Faunosteo one second: the name wins ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts selection between several embedded files > an unnamed decoy without a version is skipped for the versioned JSON after it ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts selection between several embedded files > a foreign PDF, with or without attachments: no_attachment ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts crafted stream layouts > /Length as an indirect reference: read up to endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts crafted stream layouts > a wrong direct /Length that does not land on endstream: measured instead ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts crafted stream layouts > CRLF after stream, /Type/EmbeddedFile unspaced, a leading /Params dict ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts crafted stream layouts > a Filespec with a hex /F name and an /EF listing /UF too names its stream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts crafted stream layouts > decodePdfString: literal with escapes, hex ASCII, hex UTF-16BE with BOM ported cargo pdf_scan::decode_pdf_string_rows_match O7 - -packages/pdf/tests/scan.test.ts the keyword stamp > hex (pdf-lib) and literal /Keywords strings are both read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > empty: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > random bytes: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > the type alone: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > dict without stream: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > stream without endstream: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > only the /EmbeddedFiles name tree key: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > unterminated dictionary: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > hex /Keywords without a closing bracket: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts garbage never throws > caps the candidates at 32 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > 64 MiB ObjStm bomb beside the attachment: report in ms, bomb never inflated ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > EmbeddedFile bomb past 16 MiB: inflation cancelled, no_attachment, no hang ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > both bombs before an unnamed real attachment: bomb skipped, report read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 candidates without any endstream on a 20 MiB file: no candidate, well under a second ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 nested EmbeddedFile dicts (descending offsets) without endstream on a 20 MiB file: no candidate, no finder reset ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > several indirect /Length streams in a row: each measured to its own endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > a measured stream running past the cap window is not a candidate, the next one is ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 raw candidates of 1 MiB of "[": no_attachment under a second, JSON.parse never called ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > a 16 KB Flate candidate opening 8 million "[" deep: skipped unparsed, no_attachment fast ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > 2000 "[" inside a string with escaped quotes and backslashes: not rejected, parsed once ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > the real envelope passes the pre-scan and is parsed once ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > one 16 MiB budget shared by every candidate > one 10 MiB garbage object before the attachment: 6 MiB left, the report is read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > one 16 MiB budget shared by every candidate > two 10 MiB garbage objects before the attachment: budget exhausted, no_attachment ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > 5 assets → schema ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a 3 MiB asset → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > finding depth 9 → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > 1,025 annotations → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a view chain cycle → integrity ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a dangling svg_asset_id → integrity ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - -packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > another sheet (sheet_mismatch) → sheet_mismatch ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 - +packages/pdf/tests/goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts golden inputs > the v2unresolved report carries the unresolved findings of the freeze ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2full > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of demo > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/goldens.test.ts goldens of v2unresolved > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > round-trips a payload spanning several slices ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > feeds the inflater in 16 KiB slices, each awaited ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > an output exactly at the limit passes, one byte more is null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > empty input: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > truncated stream: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > trailing junk: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > corrupt body: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > not deflate at all: null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/inflate.test.ts inflateFlate > a 64 MiB bomb past the default cap is cancelled in well under a second ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/r3.highlight-oracles.test.ts R3 highlight oracles (TypeScript freeze) > matches the frozen highlighted trees deleted - R3 highlight generator deleted at R4.8; oracle files kept +packages/pdf/tests/r3.sanitiser-oracles.test.ts R3 sanitiser oracles (TypeScript freeze) > keeps every legitimate SVG untouched deleted - R3 sanitiser generator deleted at R4.8; oracle files kept +packages/pdf/tests/r3.sanitiser-oracles.test.ts R3 sanitiser oracles (TypeScript freeze) > matches the frozen verdicts deleted - R3 sanitiser generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.dates-oracles.test.ts R4 date oracles (TypeScript freeze) > matches the frozen formatDate outputs deleted - O5 generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.inflate-oracles.test.ts R4 inflate oracles O9 (TypeScript freeze, Node) > matches the frozen inputs and Node verdicts deleted - O9 generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.png-oracles.test.ts R4 PNG oracles (TypeScript freeze) > matches the frozen gate verdicts and decodes deleted - O6 generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.reader-oracles.test.ts R4 reader oracles O7 (TypeScript freeze) > matches the frozen inputs and reader outcomes deleted - O7 generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen AFM metrics and WinAnsi table deleted - O4 generator deleted at R4.8; oracle files kept +packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen text and number rules deleted - O4 generator deleted at R4.8; oracle files kept +packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > main (haloed) and head views: 1200 px wide, highlight present, sane coverage ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > a rasterizer that throws: page without image, one view_raster_failed warning ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T4 roundtrip > reads back the exported envelope whole ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.full.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.minimal.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > keeps the 29 unresolved findings of the 612-leaf report through export and import ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > reads report-v3.bare.pdf as a bare v3 with no archive ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T6 versions > envelope v2 wrapper: report kept, snapshot rejected as unsupported_envelope ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T6 versions > envelope v1 with a report v4: incompatible_version 4 ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts T6 versions > bare report version 7: incompatible_version 7 ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts attachment presence and selection > a stamped PDF without attachment: attachment_stripped ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts attachment presence and selection > a stamped PDF saved with object streams (pre-BLK-009 layout): the stamp is invisible, no_attachment ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts attachment presence and selection > a foreign PDF: no_attachment ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts attachment presence and selection > the Filespec named osteo-report.json wins over an earlier EmbeddedFile ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/read.test.ts attachment presence and selection > refuses an oversized file or one without a %PDF- header as invalid_pdf ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/reexport.test.ts re-export from the envelope alone > reproduces text, images, views and the envelope minus exportedAt ported cargo pdf_serialize::restoration_round_trip_loses_nothing O2 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > finds the one Flate stream, named through its visible Filespec ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the length is the declared /Length and the data ends on endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the export keeps the Filespec, its name and the stamp in clear, no object stream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > readAttachmentBytes returns the inflated envelope bytes ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v2.full.pdf → origin v2 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v2.minimal.pdf → origin v2 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > report-v3.bare.pdf → origin bare_v3 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts compatibility: frozen fixtures written with object streams > a stamped PDF with object streams hides its stamp: no_attachment (documented) ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts selection between several embedded files > a decoy EmbeddedFile first, the named Faunosteo one second: the name wins ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts selection between several embedded files > an unnamed decoy without a version is skipped for the versioned JSON after it ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts selection between several embedded files > a foreign PDF, with or without attachments: no_attachment ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts crafted stream layouts > /Length as an indirect reference: read up to endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts crafted stream layouts > a wrong direct /Length that does not land on endstream: measured instead ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts crafted stream layouts > CRLF after stream, /Type/EmbeddedFile unspaced, a leading /Params dict ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts crafted stream layouts > a Filespec with a hex /F name and an /EF listing /UF too names its stream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts crafted stream layouts > decodePdfString: literal with escapes, hex ASCII, hex UTF-16BE with BOM ported cargo pdf_scan::decode_pdf_string_rows_match O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts the keyword stamp > hex (pdf-lib) and literal /Keywords strings are both read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > empty: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > random bytes: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > the type alone: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > dict without stream: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > stream without endstream: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > only the /EmbeddedFiles name tree key: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > unterminated dictionary: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > hex /Keywords without a closing bracket: no candidate, no stamp, no_attachment or invalid_pdf ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts garbage never throws > caps the candidates at 32 ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > 64 MiB ObjStm bomb beside the attachment: report in ms, bomb never inflated ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > EmbeddedFile bomb past 16 MiB: inflation cancelled, no_attachment, no hang ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts object-stream bomb (BLK-009) > both bombs before an unnamed real attachment: bomb skipped, report read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 candidates without any endstream on a 20 MiB file: no candidate, well under a second ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 nested EmbeddedFile dicts (descending offsets) without endstream on a 20 MiB file: no candidate, no finder reset ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > several indirect /Length streams in a row: each measured to its own endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > a measured stream running past the cap window is not a candidate, the next one is ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > 32 raw candidates of 1 MiB of "[": no_attachment under a second, JSON.parse never called ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > a 16 KB Flate candidate opening 8 million "[" deep: skipped unparsed, no_attachment fast ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > 2000 "[" inside a string with escaped quotes and backslashes: not rejected, parsed once ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > bracket-depth pre-scan before JSON.parse (audit finding 3) > the real envelope passes the pre-scan and is parsed once ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > one 16 MiB budget shared by every candidate > one 10 MiB garbage object before the attachment: 6 MiB left, the report is read ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/scan.test.ts candidate cost bounds (audit M2) > one 16 MiB budget shared by every candidate > two 10 MiB garbage objects before the attachment: budget exhausted, no_attachment ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > 5 assets → schema ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a 3 MiB asset → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > finding depth 9 → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > 1,025 annotations → caps ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a view chain cycle → integrity ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > a dangling svg_asset_id → integrity ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts import: the report survives a rejected snapshot > another sheet (sheet_mismatch) → sheet_mismatch ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 engine suite deleted at R4.8 with packages/pdf packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > 1,025 annotations → snapshot_too_large ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > a 3 MiB asset → snapshot_too_large ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > 5 assets → snapshot_invalid ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file @@ -258,45 +258,45 @@ packages/pdf/tests/security.test.ts hostile SVG assets > a non-finite or empty v packages/pdf/tests/security.test.ts hostile SVG assets > and 257 are refused: the export fails as snapshot_invalid ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4) packages/pdf/tests/security.test.ts hostile SVG assets > a huge root viewBox is clamped to a 1200×2400 raster ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4) packages/pdf/tests/security.test.ts hostile SVG assets > horse.svg and paws-in-harmony.svg pass with nothing removed and an identical serialisation ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4) -packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > report ids named __proto__ print raw and pollute nothing ported cargo pdf_layout::o1_draw_logs_match_the_typescript_at_full_precision O1 - -packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > inflates a normal payload and returns null for a 24 MB bomb ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7 - +packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > report ids named __proto__ print raw and pollute nothing ported cargo pdf_layout::o1_draw_logs_match_the_typescript_at_full_precision O1 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > inflates a normal payload and returns null for a 24 MB bomb ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7 engine suite deleted at R4.8 with packages/pdf packages/pdf/tests/security.test.ts branding URL injection (HIGH) > writes /URI as the hex of the ASCII bytes, no UTF-16 BOM, and reloads to the URL ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a URL with a code point above 0x7e or below 0x21 throws branding_invalid at the sink ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink packages/pdf/tests/security.test.ts branding URL injection (HIGH) > the link sink alone keeps the whole URL inside the /URI string ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink packages/pdf/tests/security.test.ts branding URL injection (HIGH) > exportFromEnvelope refuses the URL before drawing anything: branding_invalid ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a credit URL with a parenthesis and a broken label set are refused the same way ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8193 × 1 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 8193 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 4097 × 4096 (over 4096²) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 12000 × 12000 (144 Mpx) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 0 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8192 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the raw-size budget: 16 MiB of scanlines at most, whatever the pixel count ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 255 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > colour type 5 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > interlace 1 (Adam7) → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > filter method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > compression method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 4 for RGBA → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 16 for a palette → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > every colour type and depth the spec allows passes with a matching IDAT ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an IDAT stream that is truncated, empty, not zlib or off by one raw byte → idat ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the IDAT stream may span several chunks ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a wrong signature or a truncated header is refused; the real logos pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the chunk walk refuses a second IHDR, an APNG acTL and a length past the buffer ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a chunk UPNG reads with nextZero, or any type outside the allowlist, is refused ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the list must end on an empty IEND that closes the buffer; ancillary chunks pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an oversized header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a doubled-IHDR header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a tEXt-without-NUL header logo (UPNG would spin) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a truncated-IDAT header logo (UPNG inflateRaw would read past the buffer) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a 1 × 0 header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - -packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the real logos reach embedPng when the gate passes them ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 - +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8193 × 1 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 8193 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 4097 × 4096 (over 4096²) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 12000 × 12000 (144 Mpx) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 0 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8192 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the raw-size budget: 16 MiB of scanlines at most, whatever the pixel count ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 255 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > colour type 5 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > interlace 1 (Adam7) → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > filter method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > compression method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 4 for RGBA → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 16 for a palette → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > every colour type and depth the spec allows passes with a matching IDAT ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an IDAT stream that is truncated, empty, not zlib or off by one raw byte → idat ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the IDAT stream may span several chunks ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a wrong signature or a truncated header is refused; the real logos pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the chunk walk refuses a second IHDR, an APNG acTL and a length past the buffer ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a chunk UPNG reads with nextZero, or any type outside the allowlist, is refused ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the list must end on an empty IEND that closes the buffer; ancillary chunks pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an oversized header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a doubled-IHDR header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a tEXt-without-NUL header logo (UPNG would spin) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a truncated-IDAT header logo (UPNG inflateRaw would read past the buffer) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a 1 × 0 header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the real logos reach embedPng when the gate passes them ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 engine suite deleted at R4.8 with packages/pdf packages/pdf/tests/size.test.ts demo envelope size > nologos: stored attachment under 250,000 bytes ported cargo pdf_serialize::external_tools_accept_the_files_and_render_them_like_the_r3_build O2 E2 budget packages/pdf/tests/size.test.ts demo envelope size > logos: stored attachment under 250,000 bytes ported cargo pdf_serialize::external_tools_accept_the_files_and_render_them_like_the_r3_build O2 E2 budget -packages/pdf/tests/text.test.ts safeText > keeps the WinAnsi glyphs the pages use ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 - -packages/pdf/tests/text.test.ts safeText > replaces unencodable glyphs by ? and strips control characters ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 - -packages/pdf/tests/text.test.ts safeText > wrapLines splits on any whitespace first, then makes each word safe ported cargo pdf_text::wrap_lines_reproduces_every_case O4 - +packages/pdf/tests/text.test.ts safeText > keeps the WinAnsi glyphs the pages use ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/text.test.ts safeText > replaces unencodable glyphs by ? and strips control characters ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 engine suite deleted at R4.8 with packages/pdf +packages/pdf/tests/text.test.ts safeText > wrapLines splits on any whitespace first, then makes each word safe ported cargo pdf_text::wrap_lines_reproduces_every_case O4 engine suite deleted at R4.8 with packages/pdf packages/pdf/tests/text.test.ts export with hostile text > a report with ⚠ in a comment exports; the glyph prints as ? ported cargo pdf_layout::o1_draw_logs_match_the_typescript_at_full_precision O4 the layout draws the safe text -packages/pdf/tests/text.test.ts formatDate > formats an ISO date per locale and returns anything else unchanged ported cargo pdf_text::format_date_reproduces_the_intl_grid_and_the_others O6 - +packages/pdf/tests/text.test.ts formatDate > formats an ISO date per locale and returns anything else unchanged ported cargo pdf_text::format_date_reproduces_the_intl_grid_and_the_others O6 engine suite deleted at R4.8 with packages/pdf diff --git a/scripts/browser/README.md b/scripts/browser/README.md index aaf73390..96566e65 100644 --- a/scripts/browser/README.md +++ b/scripts/browser/README.md @@ -184,7 +184,7 @@ length and digest) to a temporary `.pdf`, removed after its run. Reads `crates/core/tests/oracles/r4/inflate.json` and its inputs under `apps/app/tests/fixtures/pdf/r4/inflate/` (each checked against the recorded length and sha256), runs in each engine, on the application's Home page, a -copy of `inflateFlate` from `packages/pdf/src/attachment/inflate.ts` +copy of `inflateFlate` from the R3 engine (now the frozen N-1 copy `packages/core-wasm/tests/n-1/scanner/attachment/inflate.ts`) (`DecompressionStream('deflate')`, 16 KiB awaited slices, concurrent drain, null past the row's limit or on any error), and writes `inflate.browsers.json`: per row, Node's verdict copied from `inflate.json` diff --git a/scripts/browser/inflate-verdicts.mjs b/scripts/browser/inflate-verdicts.mjs index 6d4e3617..fcadc0b3 100644 --- a/scripts/browser/inflate-verdicts.mjs +++ b/scripts/browser/inflate-verdicts.mjs @@ -1,6 +1,7 @@ // O9 browser verdicts (R4.1e, plan §B.1.2 "Inflation", §B.5.1): runs, in -// each engine, the algorithm of packages/pdf/src/attachment/inflate.ts -// `inflateFlate` (copied into the page below) on every row of +// each engine, the algorithm of the R3 engine's `inflateFlate` (the frozen +// copy packages/core-wasm/tests/n-1/scanner/attachment/inflate.ts; copied +// into the page below) on every row of // crates/core/tests/oracles/r4/inflate.json, with the row's limit, on the // input bytes of apps/app/tests/fixtures/pdf/r4/inflate/. Writes // crates/core/tests/oracles/r4/inflate.browsers.json (per row: Node's diff --git a/scripts/browser/lib/inputs.mjs b/scripts/browser/lib/inputs.mjs index c242c0f6..50c50f83 100644 --- a/scripts/browser/lib/inputs.mjs +++ b/scripts/browser/lib/inputs.mjs @@ -4,8 +4,9 @@ import { dirname, join, resolve } from 'node:path' /** * Fixture files, and the R4 oracle inputs committed as generator - * descriptions (`.gen.json`, generator `concat/1`, written by - * packages/pdf/tests/helpers/r4-reader-io.ts for inputs over 2 MiB). + * descriptions (`.gen.json`, generator `concat/1`, written at the + * R4.1 freeze by the engine's generator helper, deleted at R4.8, for inputs + * over 2 MiB; `crates/core/tests/common/r4.rs` expands them). */ export const sha256 = (bytes) => diff --git a/scripts/r4-ledger.mjs b/scripts/r4-ledger.mjs index 7fb50812..d12cd2cd 100644 --- a/scripts/r4-ledger.mjs +++ b/scripts/r4-ledger.mjs @@ -1,21 +1,22 @@ // R4 test ledger (plan 2026-10-17 §B.6): one row per TypeScript test case -// of the PDF path at the freeze, with its planned disposition. Runs vitest -// with its JSON reporter (report files in os.tmpdir()) on every packages/pdf -// suite, the application's PDF, route and store suites and its r4.* -// generators, and the core-wasm N-1 scanner test; writes -// crates/core/tests/pdf/LEDGER.tsv (files sorted, cases in declaration -// order) and prints the rows per file and disposition. Fails, writing -// nothing, when a run fails, a requested file is missing from its report, a -// case matches no rule, a rule matches no case, or the rows do not reconcile -// with vitest's totals. "(pending)" targets are filled when the case is -// ported. +// of the PDF path at the freeze (R4.1), with its disposition. The frozen +// case list is the committed ledger itself (ts_file, case_title: 301 rows; +// the engine suites and the deleted app suites no longer run, R4.8); the +// dispositions, targets and notes are re-derived from the rules below and +// checked: every `cargo` target names a test `cargo test -- --list` knows, +// every `vitest (same case…)` target names a case the live vitest report of +// that file holds (the surviving suites run with the JSON reporter, report +// files in os.tmpdir()). Writes crates/core/tests/pdf/LEDGER.tsv (files +// sorted, cases in frozen order) and prints the rows per file and +// disposition. Fails, writing nothing, when a run fails, a frozen case +// matches no rule, a rule matches no case, a target is missing, or the row +// count is not the freeze's. // Usage: node scripts/r4-ledger.mjs (core module built: pnpm wasm:build) import { spawnSync } from 'node:child_process' import { existsSync, mkdirSync, mkdtempSync, - readdirSync, readFileSync, rmdirSync, unlinkSync, @@ -36,21 +37,12 @@ const COLUMNS = [ 'note', ] const DISPOSITIONS = ['ported', 'replaced', 'kept', 'deleted'] +/** The rows of the freeze (R4.1: 140 engine cases + 155 app cases + 6 N-1 scanner cases). */ +const FROZEN_ROWS = 301 const PDF = 'packages/pdf/tests/' const APP = 'apps/app/tests/unit/' const N1_SCANNER = 'packages/core-wasm/tests/n-1.scanner.test.ts' -const APP_PDF_SUITES = [ - 'pdf.goldens.test.ts', - 'pdf.roundtrip.test.ts', - 'pdf.import.test.ts', - 'archive.envelopes.test.ts', - 'n-1.reader.test.ts', - 'pdf.export.app.test.ts', - 'migration.leaves.test.ts', - 'pdf.browserRasterizer.test.ts', - 'scripts.compare.test.ts', -] /** Suites mocking `@/pdf/*`: rewritten when the import (R4.3) and the * export (R4.6) switch. */ const APP_MOCKING_SUITES = [ @@ -96,18 +88,25 @@ const RASTER_CHECK = 'vitest (same case); cargo pdf_png::every_o6_decode_matches_pdf_lib' const SAME = 'vitest (same case)' const NONE = '-' -const GENERATOR = 'generator; oracle files kept (R4.8)' -const N1_SWITCH = 'reader switched to the frozen O11 scanner at R4.8' -const PDF_LIB_LEAVES = - 'pdf-lib leaves the app; read-back moves to cargo/lopdf or the wasm reader' -/** R4.6: the export side of these cases runs on the core; the reader is the kept TS one - * until R4.8, the kinds and round trips are cargo's. */ -const IMPORT_R46 = - 'vitest (same case, export on the core); cargo pdf_import (kinds), pdf_serialize::restoration_round_trip_loses_nothing' -/** R4.6: the roundtrip suite reads the Rust export's content streams and metadata through - * pdf-lib (kept in the tests until R4.8); the read-back is cargo's from R4.8. */ -const ROUNDTRIP_R46 = - 'vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing from R4.8' +const GENERATOR = 'generator deleted at R4.8; oracle files kept' +const ENGINE_GONE = 'engine suite deleted at R4.8 with packages/pdf' +const N1_SWITCH = + 'reader = the frozen O11 scanner (@faunosteo/core-wasm/n-1) since R4.8' +const PDF_LIB_LEFT = + 'read back by tests/helpers/pdfFile.ts since R4.8 (no pdf-lib); import by the module reader (tests/helpers/pdfImport.ts)' +/** R4.8: the TS import path left the application with its suite; the kinds are cargo's + * and the worker suites'. */ +const IMPORT_R48 = + 'cargo pdf_import::o8_import_matches_the_r3_path_outside_the_declared_differences, pdf_import::the_facade_envelope_carries_the_closed_kinds; vitest core.importWorker.test.ts (the kinds through the worker)' +const IMPORT_SUITE_GONE = + 'suite deleted at R4.8: importReportFromPdf left apps/app/src (the app imports through the worker)' +const REEXPORT_GONE = + 'suite deleted at R4.8: the re-export from the envelope alone is cargo export_from_envelope (no sheet, no branding in its signature), byte-equal on 13 runs' +const COMPARE_GONE = + 'TS CLI and suite deleted at R4.8 (pnpm report:compare runs the binary)' +/** The roundtrip suite reads the Rust export's content streams and metadata from the file. */ +const ROUNDTRIP = + 'vitest (same case, read from the file); cargo pdf_serialize::restoration_round_trip_loses_nothing' /** R4.7: the `scripts.compare.test.ts` case → the cargo test replaying its O10 rows. */ const COMPARE_CASES = { @@ -261,7 +260,11 @@ const RULES = [ { file: GOLDENS, title: 'golden inputs > the 2×1 PNG decodes', - ...replaced(RASTER_CHECK, 'O6', 'pdf-lib embedPng check of the golden rasters'), + ...replaced( + RASTER_CHECK, + 'O6', + 'the golden rasters as the core writes them (XObject sizes read from the file since R4.8)', + ), }, { file: GOLDENS, @@ -271,7 +274,11 @@ const RULES = [ { file: GOLDENS, title: /^goldens of [^>]+ > [^>]+ > text, images and links per locale/, - ...replaced(CARGO_GOLDENS, 'O1', 'Step 6 text, images and links goldens'), + ...replaced( + CARGO_GOLDENS, + 'O1', + `Step 6 text, images and links goldens; ${PDF_LIB_LEFT}`, + ), }, { file: GOLDENS, @@ -285,17 +292,17 @@ const RULES = [ }, { file: `${APP}pdf.import.test.ts`, - ...replaced(IMPORT_R46, NONE, PDF_LIB_LEAVES), + ...replaced(IMPORT_R48, NONE, IMPORT_SUITE_GONE), }, { file: `${APP}pdf.roundtrip.test.ts`, - ...replaced(ROUNDTRIP_R46, NONE, PDF_LIB_LEAVES), + ...replaced(ROUNDTRIP, NONE, PDF_LIB_LEFT), }, { file: `${APP}archive.envelopes.test.ts`, ...kept(NONE, N1_SWITCH) }, { file: `${APP}n-1.reader.test.ts`, ...kept(NONE, N1_SWITCH) }, { file: `${APP}pdf.export.app.test.ts`, - ...ported(ROUND_TRIP, NONE, 'export_from_envelope'), + ...ported(ROUND_TRIP, NONE, REEXPORT_GONE), }, { file: `${APP}migration.leaves.test.ts`, ...kept(NONE) }, { file: `${APP}pdf.browserRasterizer.test.ts`, ...kept(NONE) }, @@ -303,7 +310,7 @@ const RULES = [ ...Object.entries(COMPARE_CASES).map(([title, test]) => ({ file: `${APP}scripts.compare.test.ts`, title, - ...ported(`cargo pdf_compare::${test}`, 'O10'), + ...ported(`cargo pdf_compare::${test}`, 'O10', COMPARE_GONE), })), ...APP_MOCKING_SUITES.map((name) => ({ file: `${APP}${name}`, @@ -312,26 +319,34 @@ const RULES = [ { file: N1_SCANNER, ...kept('O11') }, ] -function testFiles(dir, keep) { - return readdirSync(join(ROOT, dir)) - .filter(keep) - .sort() - .map((name) => `${dir}${name}`) +/** The frozen cases: the committed ledger's (ts_file, case_title), in file order. */ +function frozenCases() { + const [header, ...lines] = readFileSync(OUT, 'utf8').trimEnd().split('\n') + const columns = header.split('\t') + const at = (name) => columns.indexOf(name) + const cases = lines.map((line) => { + const fields = line.split('\t') + return { file: fields[at('ts_file')], title: fields[at('case_title')] } + }) + if (cases.length !== FROZEN_ROWS) { + throw new Error( + `${relative(ROOT, OUT)}: ${cases.length} rows, ${FROZEN_ROWS} frozen`, + ) + } + return cases } -function suites() { - const appGenerators = testFiles(APP, (n) => /^r4\..+\.test\.tsx?$/.test(n)) - const appNamed = [...APP_PDF_SUITES, ...APP_MOCKING_SUITES].map( - (n) => `${APP}${n}`, +/** The frozen files that still exist, grouped by the package that runs them. */ +function liveSuites(cases) { + const files = [...new Set(cases.map((c) => c.file))].filter((file) => + existsSync(join(ROOT, file)), ) - return [ - { - pkg: 'packages/pdf', - files: testFiles(PDF, (n) => n.endsWith('.test.ts')), - }, - { pkg: 'apps/app', files: [...appNamed, ...appGenerators] }, - { pkg: 'packages/core-wasm', files: [N1_SCANNER] }, - ] + const pkgOf = (file) => file.split('/tests/')[0] + const pkgs = [...new Set(files.map(pkgOf))] + return pkgs.map((pkg) => ({ + pkg, + files: files.filter((f) => pkgOf(f) === pkg), + })) } /** vitest's JSON report of `files`, run from the package as test:run. */ @@ -359,6 +374,27 @@ function runVitest({ pkg, files }, reportDir, errors) { return parsed } +/** file → the titles of its live cases (every one must pass). */ +function liveCases(suites, reportDir, errors, totals) { + const live = new Map() + for (const suite of suites) { + const report = runVitest(suite, reportDir, errors) + if (!report) continue + totals.push([suite.pkg, report.numTotalTests]) + for (const result of report.testResults) { + const file = relative(ROOT, result.name) + if (result.status !== 'passed') errors.push(`${file}: ${result.status}`) + const titles = result.assertionResults.map((a) => + [...a.ancestorTitles, a.title].join(' > '), + ) + live.set(file, new Set(titles)) + } + for (const file of suite.files) + if (!live.has(file)) errors.push(`missing from the report: ${file}`) + } + return live +} + function matches(rule, file, title) { if (rule.file !== file) return false if (rule.title === undefined) return true @@ -367,8 +403,7 @@ function matches(rule, file, title) { : title.startsWith(rule.title) } -function rowOf(file, assertion, used, errors) { - const title = [...assertion.ancestorTitles, assertion.title].join(' > ') +function rowOf({ file, title }, used, errors) { const at = RULES.findIndex((rule) => matches(rule, file, title)) if (at < 0) { errors.push(`no disposition: ${file} > ${title}`) @@ -376,68 +411,52 @@ function rowOf(file, assertion, used, errors) { } used.add(at) const { disposition, target, oracle, note } = RULES[at] - const status = - assertion.status === 'passed' - ? '' - : ` (status at freeze: ${assertion.status})` + const gone = file.startsWith(PDF) && note === NONE ? ENGINE_GONE : note return { ts_file: file, case_title: title, disposition, target, oracle, - note: note + status, + note: gone, } } -/** The rows of one package's report, checked to hold the requested files. */ -function suiteRows(suite, report, context) { - const { errors, used } = context - const results = report.testResults.map((result) => ({ - ...result, - file: relative(ROOT, result.name), - })) - const found = results.map((r) => r.file) - for (const file of suite.files) - if (!found.includes(file)) errors.push(`missing: ${file}`) - for (const file of found) - if (!suite.files.includes(file)) errors.push(`unrequested: ${file}`) - for (const r of results) - if (r.status !== 'passed') errors.push(`${r.file}: ${r.status}`) - const rows = results.flatMap((r) => - r.assertionResults.map((a) => rowOf(r.file, a, used, errors)), - ) - if (rows.length !== report.numTotalTests) { - const total = report.numTotalTests - errors.push(`${suite.pkg}: ${rows.length} rows, ${total} vitest cases`) - } - return rows.filter((row) => row !== null) +/** A `vitest (same case…)` target names a live case of the same file. */ +function missingVitestTargets(rows, live) { + return rows + .filter((row) => row.target.startsWith('vitest (same case')) + .filter((row) => !live.get(row.ts_file)?.has(row.case_title)) + .map((row) => `${row.ts_file} > ${row.case_title}`) } function collect() { - const context = { errors: [], used: new Set(), totals: [] } + const errors = [] + const used = new Set() + const totals = [] + const cases = frozenCases() const reportDir = mkdtempSync(join(tmpdir(), 'faunosteo-r4-ledger-')) + let live try { - const rows = suites().flatMap((suite) => { - const report = runVitest(suite, reportDir, context.errors) - if (!report) return [] - context.totals.push([suite.pkg, report.numTotalTests]) - return suiteRows(suite, report, context) - }) - RULES.forEach((rule, at) => { - if (!context.used.has(at)) - context.errors.push( - `rule matches no case: ${rule.file} ${rule.title ?? ''}`, - ) - }) - // Stable sort: files in path order, cases in declaration order. - rows.sort((a, b) => - a.ts_file === b.ts_file ? 0 : a.ts_file < b.ts_file ? -1 : 1, - ) - return { rows, ...context } + live = liveCases(liveSuites(cases), reportDir, errors, totals) } finally { rmdirSync(reportDir) } + const rows = cases + .map((c) => rowOf(c, used, errors)) + .filter((row) => row !== null) + RULES.forEach((rule, at) => { + if (!used.has(at)) + errors.push(`rule matches no case: ${rule.file} ${rule.title ?? ''}`) + }) + for (const name of missingVitestTargets(rows, live)) { + errors.push(`vitest target missing from the live report: ${name}`) + } + // Stable sort: files in path order, cases in frozen order. + rows.sort((a, b) => + a.ts_file === b.ts_file ? 0 : a.ts_file < b.ts_file ? -1 : 1, + ) + return { rows, errors, totals } } function tsvField(value) { @@ -484,7 +503,9 @@ function printSummary(rows, totals) { console.log(countLine('total', rows)) const vitest = totals.map(([pkg, n]) => `${pkg} ${n}`).join(', ') const sum = totals.reduce((n, [, count]) => n + count, 0) - console.log(`vitest cases: ${vitest} = ${sum}; ledger rows: ${rows.length}`) + console.log( + `live vitest cases of the frozen files: ${vitest} = ${sum}; ledger rows: ${rows.length} (frozen ${FROZEN_ROWS})`, + ) console.log(`written: ${relative(ROOT, OUT)}`) } @@ -521,14 +542,15 @@ function cargoTests(file) { return names } -/** Census (plan §B.6): every `cargo` target of a ported row names an existing test. */ +/** Census (plan §B.6): every `cargo file::test` of every target names an existing test. */ function missingCargoTargets(rows) { const wanted = new Set() for (const row of rows) { - if (row.disposition !== 'ported' || !row.target.startsWith('cargo ')) - continue - for (const name of row.target.slice('cargo '.length).split(', ')) - wanted.add(name) + for (const part of row.target.split('; ')) { + if (!part.startsWith('cargo ')) continue + for (const name of part.slice('cargo '.length).split(', ')) + if (name.includes('::')) wanted.add(name) + } } const listed = new Map() const missing = [] @@ -543,7 +565,10 @@ function missingCargoTargets(rows) { function main() { const { rows, errors, totals } = collect() for (const name of missingCargoTargets(rows)) { - errors.push(`ported target missing from cargo test --list: ${name}`) + errors.push(`cargo target missing from cargo test --list: ${name}`) + } + if (rows.length !== FROZEN_ROWS) { + errors.push(`${rows.length} rows, ${FROZEN_ROWS} frozen`) } if (errors.length) { for (const error of errors) console.error(`r4-ledger: ${error}`)