ReviewOS

home-lang/home

NativePromiseContext: verify abandoned promise cleanup across platforms

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

Scope

Track cross-platform parity for GC-triggered cleanup of native promise contexts after an aborted Bun.serve request leaves a Promise<response> permanently pending.

The macOS production path was restored in c4ebc94 by reconnecting NativePromiseContext deferred derefs to the real JSC VM task queue. The exact untouched pinned-Bun corpus test now passes natively in Home.

Acceptance criteria

  • js/bun/http/serve-pending-promise-abort-leak.test.ts passes byte-identically on supported Linux targets
  • The same exact corpus file passes byte-identically on supported Windows targets
  • After 100 aborted requests whose response promises never settle, server.pendingRequests returns to zero
  • No corpus rewriting, skips, test delegation, or compatibility shims
  • When lol-html is enabled in production builds, verify the same deferred-owner path releases HTMLRewriter.BufferOutputSink / Body.ValueBufferer owners correctly

Current macOS evidence

  • Home: 6 passed, 0 failed, 0 unsupported, 0 TODO; 20 assertions
  • Pinned Bun 4982b91e3702094330f3be3883354c52b8c01323: 6 passed, 0 failed; 20 assertions
  • Full stable home_rt gate: 1,816 passed, 19 skipped, 0 failed
  • Test SHA-256: 97c18750a1ddbe418299b745c5907adb5b49deccfa71667d1ced134a22dc2463
  • Spawned fixture SHA-256: 93d7b4909d9d84c67b63ebfbbece566892103f885cbda621a04f05668208bc20
  • 413 fixture SHA-256: fbc351943bec46a3ea2f74bfcb0cf67b2d2850308a175ec8bae8b28f44039432

Parent parity tracker: #66 Native suppression ledger: #202

Sign in to comment on this issue.