ReviewOS

home-lang/home

Bun parity: lower file-attribute imports for compressed fetch

#366
Closed chris opened this 10 days ago ·
10 days ago

Port js/web/fetch/fetch.brotli.test.ts from the copied Bun corpus.

Required behavior:

  • lower default static imports using with { type: file } to stable corpus-relative asset paths
  • load the real Brotli and Gzip fixture bytes through Bun.file
  • auto-decompress Brotli and Gzip fetch response bodies to identical text
  • preserve Content-Encoding metadata when decompress is false
  • retain structured file-read and response-decompression error causes and composed stacks
  • add a permanent focused regression and advance corpus position 4148 with zero failures or unsupported tests

Tracked under #66.

10 days ago

Completed in 0fb9c20 and pushed directly to main.

Implemented:

  • reusable lowering for default static imports with with { type: file }
  • stable corpus-relative asset path resolution with query stripping
  • real Brotli and Gzip fixture loading through Bun.file
  • automatic Brotli/Gzip response decoding with identical decoded text
  • Content-Encoding preservation for decompress: false
  • permanent focused regression retaining structured file-read and fetch.response.decompress failures

Validation:

  • indexed Bun corpus position 4148: 1 passed, 0 failed, 0 todo, 0 unsupported
  • focused compressed fetch file-import regression: passed
  • zig build --cache-dir /private/tmp/home-zig-abi-cache: passed

Sign in to comment on this issue.