ReviewOS

home-lang/home

Native installer: verify decompression limits across platforms

#528
Open chris opened this 9 days ago ·
9 days ago

Current checkpoint — 90ced0ed6

The full unchanged bun-install-streaming-extract.test.ts now passes 6 tests / 0 failures / 180 assertions, up from the published parent's 5 pass / 1 fail / 178 assertions, matching the pinned Bun release. The original 2.25 GiB payload and five-minute test deadline were preserved. Buffered extraction now applies the pin's 2 GiB output limit, reports the original per-package decompression failure, and releases the decoder on every exit. Streaming, buffered, threshold, integrity-rejection and damaged-header cases all pass.

The zlib reader now clamps produced bytes to the remaining budget rather than treating allocation capacity as output. Unit cases check exact and small limits with fresh and over-allocated buffers. The final oversized tarball case completes in 12.19 seconds. The unrestricted HTTP contract remains separately correct in #527; this limit is applied at the installer boundary. #526 covers EOF notification and fragmented tar-format initialization.

Native build 17/17; runtime units 1,824 pass / 19 skips / 0 failures (19/19 steps); runtime regressions 56/56, including 25 native files. All 46 measured upstream test sources match the exact Bun pin. No assertion, workload, deadline, skip or TODO was weakened. Full logs and failed controls remain in the evidence records.

Evidence: zig-out/eof-extract-{parent,release-control,final4}.json, eof-unit4.log, eof-source-integrity4.json, eof-build4-binary.json, and eof-implementation-pin.json.

Published on codex/runtime-port as Chris Breuer without coauthors, not merged to main. Verification uses the shared Darwin checkout; unrelated compiler changes are excluded. Linux/Windows behavior and branch integration remain unverified; this issue stays open for those checks. Skips/TODOs and full source ownership are not completed parity. The full port and 100% logical Bun-suite compatibility under #66 remain incomplete.

Original reproduction (before this checkpoint)

Follow-up to #66, #518, #526 and #527. The complete unchanged cli/install/bun-install-streaming-extract.test.ts at source pin 4982b91e3702094330f3be3883354c52b8c01323 exposes a pre-existing missing decompressed-tarball limit.

Published Home 9b3a5c1ad2d7e7d32d93ccb9464b2f3f82db03f3 produces 5 pass / 1 fail / 178 assertions. The failing test buffered extract rejects a registry tarball whose decompressed size exceeds the limit serves a roughly 2.35 MB compressed tarball with a 2.25 GiB payload. Home expands and installs it instead of returning the expected per-package decompression error. Pinned Bun release 1.4.0-canary.1+4982b91e3 passes 6/6 / 180 assertions.

Port the actual pinned buffered-extraction cap: src/install/extract_tarball.rs defines MAX_DECOMPRESSED_TARBALL_SIZE = 2 * 1024 * 1024 * 1024 and sets the decompressor's maximum output size. Retain the original 2.25 GiB workload and expected error, and preserve streaming extraction, integrity checks, malformed archives and caller-specific HTTP response semantics. Do not substitute the unrelated Home-only 1 GiB HTTP-response limit tracked in #527.

Evidence: zig-out/eof-extract-{parent,release-control}.json and eof-extract-source-integrity.json. Both complete runs finished under 22 seconds; the suite's original 300,000 ms per-test setting was unchanged. The later wrapper permits 900 seconds for future whole-file runs. No upstream assertions or fixtures changed. Darwin only; #66 remains incomplete.

9 days ago

Current checkpoint — 90ced0ed6

The full unchanged bun-install-streaming-extract.test.ts now passes 6 tests / 0 failures / 180 assertions, up from the published parent's 5 pass / 1 fail / 178 assertions, matching the pinned Bun release. The original 2.25 GiB payload and five-minute test deadline were preserved. Buffered extraction now applies the pin's 2 GiB output limit, reports the original per-package decompression failure, and releases the decoder on every exit. Streaming, buffered, threshold, integrity-rejection and damaged-header cases all pass.

The zlib reader now clamps produced bytes to the remaining budget rather than treating allocation capacity as output. Unit cases check exact and small limits with fresh and over-allocated buffers. The final oversized tarball case completes in 12.19 seconds. The unrestricted HTTP contract remains separately correct in #527; this limit is applied at the installer boundary. #526 covers EOF notification and fragmented tar-format initialization.

Native build 17/17; runtime units 1,824 pass / 19 skips / 0 failures (19/19 steps); runtime regressions 56/56, including 25 native files. All 46 measured upstream test sources match the exact Bun pin. No assertion, workload, deadline, skip or TODO was weakened. Full logs and failed controls remain in the evidence records.

Evidence: zig-out/eof-extract-{parent,release-control,final4}.json, eof-unit4.log, eof-source-integrity4.json, eof-build4-binary.json, and eof-implementation-pin.json.

Published on codex/runtime-port as Chris Breuer without coauthors, not merged to main. Verification uses the shared Darwin checkout; unrelated compiler changes are excluded. Linux/Windows behavior and branch integration remain unverified; this issue stays open for those checks. Skips/TODOs and full source ownership are not completed parity. The full port and 100% logical Bun-suite compatibility under #66 remain incomplete.

Sign in to comment on this issue.