ReviewOS

home-lang/home

Bun parity: finish FormData multipart serialization matrix

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

Focused checkpoint under #66, following #375.

Upstream corpus frontier: js/web/html/FormData-multipart-serialization.test.ts (position 4168).

Scope:

  • preserve the upstream test unchanged
  • port multipart boundary, disposition, filename, MIME, byte, and escaping serialization semantics
  • keep FormData/Blob/File ownership and request body behavior consistent
  • retain actionable serialization operation/phase/cause metadata with composed stacks
  • add permanent regression coverage and validate the contiguous tail plus full build

Parent: #66 Predecessor: #375

10 days ago

Completed in 9dd7d9e (feat(formdata): port byte-exact multipart serialization) and pushed to main.

Validation:

  • upstream js/web/html/FormData-multipart-serialization.test.ts remains byte-for-byte unchanged
  • exact position 4168 on macOS: 3 passed / 0 failed / 1 platform todo / 0 unsupported / 0 allowed-empty
  • multipart serialization is byte-first, preserving arbitrary binary values without UTF-8 replacement
  • boundary shape, CRLF layout, quote/CR/LF escaping, anonymous filename="", filename overrides, and terminal boundary match Bun
  • binary parts receive application/octet-stream; bare textual MIME types gain charset=utf-8
  • anonymous Blob parsing restores Bun’s File-with-undefined-name and empty-type semantics
  • Response and Request carry byte bodies; Response.formData() parses bytes directly
  • missing Bun.file parts throw ENOENT wrapped as ERR_FORM_DATA_SERIALIZE with operation/phase/cause/composed stack
  • permanent all-256-byte and error-contract regressions pass
  • adjacent unchanged FormData.test.ts: 129 passed / 0 failed
  • positions 4170 and 4171 pass 12/12
  • full zig build --cache-dir /private/tmp/home-zig-abi-cache passes

The contiguous frontier is now position 4172, js/web/intl/intl.test.ts. Parent: #66. Predecessor: #375.

Sign in to comment on this issue.