ReviewOS

home-lang/home

Port Bun response stream leak regressions

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

Track the exact upstream serve-response-stream-sink-leak.test.ts and serve-stream-reject-flush-leak.test.ts corpora in Home.

Scope:

  • activate both exact upstream tests instead of whole-file TODOs
  • model HTTPResponseSink allocation/destruction on synchronous direct-stream fallback
  • model pending-flush Promise protection/unprotection on rejected direct streams
  • preserve subprocess metrics and exit behavior used by the upstream leak guards
  • convert the durable TODO regressions to passing exact-corpus coverage
  • pass both exact corpus tests and the full home_test gate

Parent: #66

10 days ago

Completed and pushed in 38408c6951ecf904dd829fbe0fca571737515c18.

Validation:

  • all four upstream test/fixture files are byte-identical to ~/Code/bun (SHA-256 values: 0365b2e3…, c4288282…, aa8287f2…, e8d56eb7…)
  • serve-response-stream-sink-leak.test.ts: 1 pass, 0 fail, 0 unsupported, 0 TODO; 10,000 lifecycles with zero commit delta
  • serve-stream-reject-flush-leak.test.ts: 1 pass, 0 fail, 0 unsupported, 0 TODO; 10/10 pending flush paths with zero protected-Promise delta
  • full gate: ./pantry/.bin/zig build test -Dfilter=home_test --summary failures exited 0

Implemented balanced HTTPResponseSink and pending-flush Promise lifecycle accounting, subprocess metric/exit fixtures, and converted both durable TODO regressions into required passing coverage.

Sign in to comment on this issue.