ReviewOS

home-lang/home

Native fetch: verify request-compression platform parity and integration

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

Published request-compression checkpoint

2c5df8cce is pushed on codex/runtime-port as Chris Breuer without coauthors; not merged to main. The native request-compression path is implemented and verified on Darwin. This issue remains open for platform verification and integration; it no longer represents the missing implementation below.

  • Complete unchanged compression file: 32/32 / 78 assertions, versus published parent 4 pass / 28 fail / 2 errors / 35. HTTP/2 client: 60/60 / 197; HTTP/3 client: 52/52 / 241, both matching their complete pinned Bun controls.
  • Boolean/string/object parsing, levels, gzip/zlib-wrapped deflate/Brotli/zstd, HTTP-thread shared/spilled buffers, compressed framing, and original-body replay are ported. Explicit encoding, empty/streaming bodies and signed S3 destinations opt out; this does not establish S3 parity.
  • Large file bodies bypass sendfile when compression is requested. Owned opened/duplicated read descriptors close after reading; the caller's descriptor stays open. The pre-fix candidate fails the new descriptor-growth regression; the final Home and pinned Bun controls pass.
  • Native coverage spans all three transports, 307/308 replay, concurrent incompressible bodies, cancellation/GC/recovery and split CONNECT TLS uploads. It passes normally, during VM destruction/exception checks, and in the complete regression run. #535 records the accompanying CONNECT repairs.

Build 17/17; units 1,827 pass / 19 skip / 0 fail, 19/19 steps; regressions 60/60, including 29 native files; full body-stream 9,086/9,086 / 135,984 assertions. All five EOF/fetch files and both abort files pass with original workloads/deadlines. Skips/TODOs are not completed parity. The failed disk-space unit attempt and intermediate failures are retained; a full successful rebuild/rerun follows them.

48 test/harness/fixture sources and 11 consulted implementations match pin 4982b91e3702094330f3be3883354c52b8c01323. Evidence: docs/docs/NATIVE_RUNTIME_BINDINGS.md, zig-out/compress-publication.json, compress-matrix-{parent4,final5,release4}.json, compress-native5.json, compress-native-{destruction5,control5}.json, compress-fd-parent4.json, compress-unit3.json, compress-regression2s.json, and compress-integrity5.json.

Unresolved HTTP/3 initial-upload stalls reproduce in both Home and pinned Bun (#539); successful replays do not close that issue. TLS context/CA/version work remains #532. Other platforms, integration, full source ownership and whole-suite parity under #66 remain incomplete.

Historical missing-implementation evidence

Published transport checkpoint

29c196835 is pushed on codex/runtime-port (not merged to main). This issue remains open: its specific missing behavior is not repaired by the TLS ABI/duplex checkpoint. Final native/control results are recorded in #530 and #66; 72 measured test/harness sources match the pin.

Parent: #66. Related transport investigation: #530.

The native fetch compress option is not ported. The complete unchanged js/web/fetch/fetch-compress.test.ts is 4 pass / 28 fail / 2 errors / 35 assertions both on published fb161314a503fe20c7308d6a735dc9b023b489c6 and the HTTP/3 repair candidate. Pinned Bun passes 32/32 / 78 assertions. This is a completed failing run, not an outer timeout.

After restoring TLS ABI layout, the HTTP/3 client file reaches 50 pass / 2 fail / 235 assertions; both remaining failures are gzip request compression (small and large buffers). HTTP/2 reaches 58 pass / 2 fail / 2 errors / 185 assertions, with the original five-second compression cases timing out. Pinned Bun passes 52/52 / 241 and 60/60 / 197, respectively. No case, payload, deadline or assertion was changed.

Port the pinned fetch option parsing, validation, body ownership and compression-before-framing contract across HTTP/1, HTTP/2 and HTTP/3. Cover gzip/deflate/Brotli/zstd, levels, empty and streaming bodies, explicit Content-Encoding, large incompressible spill buffers, sendfile eligibility, and 307 replay from original bytes. Keep compressed storage alive across asynchronous HTTP/2 and HTTP/3 writes; do not point transport cursors at shared scratch buffers. The pinned Rust h3_client/encode.rs calls compress_body_for_send(false) and uses the compressed body length; Home lacks that path.

Evidence: zig-out/h3-related-{parent1,candidate2,release1}.json, body-h3-h3-candidate2.json, body-h3-release1.json, full stdout/stderr, and h3-source-integrity1.json. All 71 measured test sources and six consulted implementation sources match pin 4982b91e3702094330f3be3883354c52b8c01323. Shared Darwin checkout only. Full native source ownership and 100% logical Bun-suite parity remain incomplete.

9 days ago

Published 2c5df8cce on codex/runtime-port as Chris Breuer, with no coauthors; not merged to main.

The full request-compression file now passes 32/32 / 78 assertions; HTTP/2 and HTTP/3 client files pass 60/60 and 52/52. The native regression exercises all encodings/transports, levels, shared/spilled ownership, redirects, file descriptors, abort/GC and split CONNECT uploads. Parent and pre-descriptor-fix controls fail the respective regressions; final Home and adapted pinned Bun controls pass. Full verification and preserved unsuccessful attempts are recorded in the updated body and native runtime documentation. Platform/integration work remains open; #539 and #532 track separate unresolved behavior.

Sign in to comment on this issue.