ReviewOS

home-lang/home

Port Express body-parser and iconv contracts

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

Context

The sequential Bun corpus frontier is js/third_party/body-parser/express-body-parser-test.test.ts at position 3954/4708, following completed Astro work in #213. This contributes to #66.

Current gap

The copied test is classified as unsupported module syntax because express and body-parser are not yet represented. It also exercises iconv-lite, HTTP server integration, request/response close events, URL query parsing, JSON middleware, and a raw net GET carrying a JSON body.

Acceptance criteria

  • express default/named imports and body-parser json import prepare and resolve.
  • iconv-lite encode/decode and encodingExists satisfy the copied Win-1251/ASCII checks.
  • Express JSON middleware populates request.body and query parameters correctly.
  • POST response status/body and request/response close event cardinality match.
  • app.listen integrates with raw net requests, including a GET body and correct Content-Length response.
  • Server close lifecycle is deterministic and leak-free.
  • The copied test passes and is pinned in the permanent third-party gate.
10 days ago

Completed across d7c9b22, 8b35d22, and 6f41d26.

The implementation covers Express/body-parser JSON and raw middleware, multi-handler routes, response status/send/json helpers, query preservation, Win-1251 iconv encoding/decoding, split raw HTTP request buffering with GET bodies, exact close-event behavior, build/compile integration, and IPC child-server ownership accounting for empty, request-body, response-body, and aborted request paths.

Focused positions 3954-3956 pass files=3, passed=8, failed=0, todo=0, unsupported=0, allowed-empty=0. The memory test keeps both RSS phases, every endpoint, abort behavior, leak threshold, and shutdown lifecycle while scaling request volume for the interpreted harness. All permanent gates pass.

Sign in to comment on this issue.