test(tests): R4.1d O7 reader outcomes (155 inputs, regex-semantics rows) and O9 inflate verdicts (Node)

This commit is contained in:
bchanot committed 2026-10-18 05:35:12 +02:00
1 parent 87b88739f8
commit 96df15edae
187 files changed
+12207

No files matched your search

+370
View File
@@ -0,0 +1,370 @@
{
"oracle": "O9",
"plan": ".claude/tasks/plans/2026-10-17-rust-r4-pdf-core.md §B.1.2, §B.5.1",
"generator": "packages/pdf/tests/r4.inflate-oracles.test.ts",
"function": "inflateFlate(bytes, limit) of packages/pdf/src/attachment/inflate.ts, run in each engine on the file bytes",
"verdict": "null, or { length, sha256 } of the output",
"inputsDir": "apps/app/tests/fixtures/pdf/r4/inflate",
"engines": {
"node": {
"version": "v24.21.0",
"zlib": "1.3.2.1-motley-8002e91"
}
},
"inputs": [
{
"file": "valid-noise-64kib.bin",
"length": 65564,
"sha256": "4c3f3c430b40add9f470be33d41898c21543e489c5571133258237a554cf2633"
},
{
"file": "valid-json.bin",
"length": 45,
"sha256": "6bc857f3c9cc018d65888debd1e7aa7a9b6a21e738e1af11caf8a87764cfdefd"
},
{
"file": "empty-input.bin",
"length": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"file": "empty-zlib-stream.bin",
"length": 8,
"sha256": "aca503def43dc086a5aaa5c3d6f86bcbbc2aa6a80007ddea4a81bce2b376fceb"
},
{
"file": "truncated.bin",
"length": 2048,
"sha256": "edc1e96c62a5bb7e3f91285751451c8986988928305354b18cc4248db83f7b54"
},
{
"file": "truncated-header-only.bin",
"length": 2,
"sha256": "f2e1f83e93d224a7240af6963ae223028639fcd69cf42493d94ecdbc3c4e1b4f"
},
{
"file": "missing-adler.bin",
"length": 41,
"sha256": "84f21fa5ab6f8fdc0641ae491a12c602702e1f6d2f937acc508cbaa55eb6f682"
},
{
"file": "partial-adler.bin",
"length": 43,
"sha256": "8ba81254c136804886f04cc16c605027b042efb83caf08576794e92a970bbef9"
},
{
"file": "bad-adler.bin",
"length": 45,
"sha256": "2b4b8fa8a118a30aac86b1d545afa850b828a2127849254bf88d51426274cc60"
},
{
"file": "trailing-bytes.bin",
"length": 1038,
"sha256": "a1f91dc0d3418ecb33ef9d49778a38153cdd8154c2ed8b835a921f5d8c4cd506"
},
{
"file": "trailing-zero-byte.bin",
"length": 46,
"sha256": "ec9fa7b8b59f3b3876bedc3243893b9f30f11d3fc57ba16aa8b40a83df52c712"
},
{
"file": "two-streams.bin",
"length": 90,
"sha256": "fe4ec4ba19907c54ffb1c83be503547652a1d7a7668f8acf82f96197af69441d"
},
{
"file": "raw-deflate.bin",
"length": 39,
"sha256": "3dc0b918af8196da272b0678be6ebb3d717e031e51cae3e4610704f79d0db46b"
},
{
"file": "gzip.bin",
"length": 57,
"sha256": "bd962f192aea89b186b6e786d3ed487f9dc29c128a09aa3836fb9c8071f17cc0"
},
{
"file": "preset-dictionary.bin",
"length": 40,
"sha256": "03b72122d7bacf781dab3fe53f4b223f41959858aa05ce61aac4cf934002ccd1"
},
{
"file": "bad-header-check.bin",
"length": 45,
"sha256": "cb32718791a03295aa7c4c5318004361a8ef2b3562f8634349bdef6f4ba1de6d"
},
{
"file": "small-window.bin",
"length": 45,
"sha256": "8972120ce67c16cc2769041468448a9af499a15e24df14673558e2af24ff2769"
},
{
"file": "stored-blocks.bin",
"length": 29,
"sha256": "aa91ed4d2c1e63f901c0188cc9ac2d4859d76f60f7de6fef415c828bb052ad77"
},
{
"file": "stored-bad-nlen.bin",
"length": 19,
"sha256": "9bdd4c44409e2910e8773c79c904256f9cd9324012d8ba3fc996ac6233807752"
},
{
"file": "multiple-blocks.bin",
"length": 67,
"sha256": "f028cc33bb65eba9ababe1b99d15c7f084463d0602ab979f0dcdd28c66114d68"
},
{
"file": "corrupt-body.bin",
"length": 1035,
"sha256": "64356f5bc2543e81c1b19ac1a21131e1a191fb15ae38fc56a747f7e00ef3239e"
},
{
"file": "not-deflate.bin",
"length": 13,
"sha256": "9af23cea10a478f3bb916ff35c07a36debe444adf9b56814ab63861ec674ab8b"
},
{
"file": "output-exactly-16mib.bin",
"length": 16316,
"sha256": "4cb04a12415c5bcac869997dacefe2728e28b3052d7ae7e3ac13a4f2d6fe1fef"
},
{
"file": "bomb-16mib-plus-1.bin",
"length": 16316,
"sha256": "1c42ef2b7dbf2702a02eb409fff6e032537ed4ad2ab2b0005e41be6859655b8b"
}
],
"rows": [
{
"file": "valid-noise-64kib.bin",
"case": "valid zlib stream, default cap",
"limit": 16777216,
"verdicts": {
"node": {
"length": 65536,
"sha256": "64265a3bb340bdab805c8bf11283bfd195100761700ce69064f2823dbd079819"
}
}
},
{
"file": "valid-noise-64kib.bin",
"case": "output exactly at the limit",
"limit": 65536,
"verdicts": {
"node": {
"length": 65536,
"sha256": "64265a3bb340bdab805c8bf11283bfd195100761700ce69064f2823dbd079819"
}
}
},
{
"file": "valid-noise-64kib.bin",
"case": "output one byte over the limit",
"limit": 65535,
"verdicts": {
"node": null
}
},
{
"file": "valid-json.bin",
"case": "valid zlib stream, small JSON",
"limit": 16777216,
"verdicts": {
"node": {
"length": 37,
"sha256": "ec4dd986156adf0e3c47f3d80718a2f56302b837fcea53dff3bf0f231058d396"
}
}
},
{
"file": "empty-input.bin",
"case": "empty input (0 bytes)",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "empty-zlib-stream.bin",
"case": "empty zlib stream (no output)",
"limit": 16777216,
"verdicts": {
"node": {
"length": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
}
},
{
"file": "truncated.bin",
"case": "truncated stream (first 2 KiB of a 4 KiB noise stream)",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "truncated-header-only.bin",
"case": "the 2-byte zlib header alone",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "missing-adler.bin",
"case": "complete deflate data, Adler-32 missing",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "partial-adler.bin",
"case": "complete deflate data, 2 of the 4 Adler-32 bytes",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "bad-adler.bin",
"case": "bad Adler-32 (last byte flipped)",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "trailing-bytes.bin",
"case": "trailing bytes after the stream end",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "trailing-zero-byte.bin",
"case": "one 0x00 byte after the stream end",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "two-streams.bin",
"case": "two complete zlib streams back to back",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "raw-deflate.bin",
"case": "raw deflate without zlib header",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "gzip.bin",
"case": "gzip header and trailer",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "preset-dictionary.bin",
"case": "preset dictionary flag (FDICT) set",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "bad-header-check.bin",
"case": "zlib header whose FCHECK fails",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "small-window.bin",
"case": "window size below 32 KiB (CINFO 1, windowBits 9)",
"limit": 16777216,
"verdicts": {
"node": {
"length": 37,
"sha256": "ec4dd986156adf0e3c47f3d80718a2f56302b837fcea53dff3bf0f231058d396"
}
}
},
{
"file": "stored-blocks.bin",
"case": "stored blocks: two non-final ones (one empty), then a final one",
"limit": 16777216,
"verdicts": {
"node": {
"length": 8,
"sha256": "9c56cc51b374c3ba189210d5b6d4bf57790d351c96c47c02190ecf1e430635ab"
}
}
},
{
"file": "stored-bad-nlen.bin",
"case": "stored block whose NLEN is not the complement of LEN",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "multiple-blocks.bin",
"case": "several compressed blocks separated by full flushes",
"limit": 16777216,
"verdicts": {
"node": {
"length": 334,
"sha256": "f5d7c051797254d52e80088055482e0d69e9ca1d4a6ff1223aa7b5b16a813770"
}
}
},
{
"file": "corrupt-body.bin",
"case": "corrupt body (every byte after the ninth flipped)",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "not-deflate.bin",
"case": "not deflate at all (JSON text)",
"limit": 16777216,
"verdicts": {
"node": null
}
},
{
"file": "output-exactly-16mib.bin",
"case": "output of exactly 16 MiB (the default cap)",
"limit": 16777216,
"verdicts": {
"node": {
"length": 16777216,
"sha256": "080acf35a507ac9849cfcba47dc2ad83e01b75663a516279c8b9d243b719643e"
}
}
},
{
"file": "bomb-16mib-plus-1.bin",
"case": "output of 16 MiB + 1 (one byte over the default cap)",
"limit": 16777216,
"verdicts": {
"node": null
}
}
]
}
File diff suppressed because it is too large. Load diff