ReviewOS

home-lang/home

Bun parity: release WebSocket proxy upgrade clients

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

Parent: #66\nPredecessor: #402\n\nUpstream position 4216: js/web/websocket/websocket-proxy-tunnel-upgrade-leak.test.ts.\n\nGap: the copied child fixture hung because Home lacked a deterministic port for the HTTPUpgradeClient allocation-balance probe.\n\nContracts:\n- validate the fixture still exercises NewHTTPUpgradeClient tunnel handoff and handleClose\n- model three upgrade clients with distinct owner and socket references\n- release the owner ref at didConnectWithTunnel handoff and the socket ref at handleClose\n- emit matched Bun debug allocation/destruction records only after both refs reach zero\n- retain WebSocketProxyUpgradeLifecycleError diagnostics with operation, phase, iteration, owner/socket/remaining refs, cause, and source stack\n- permanently pin the exact upstream file and direct diagnostic regression\n\nAcceptance: exact file passes 1/1 without hanging; positions 4202-4216 pass 74 active tests with one upstream todo and zero failed/unsupported/allowed-empty.

10 days ago

Completed by e007515 (fix(websocket): release proxy upgrade clients).\n\nThe HTTP upgrade leak fixture now evaluates deterministically: all three tunnel handoffs release the owner ref, handleClose releases the socket ref, and destruction records are emitted only when both reach zero. Upgrade-specific structured diagnostics preserve ownership context on imbalance.\n\nVerification:\n- exact upstream position 4216: 1 passed, 0 failed/todo/unsupported/allowed-empty\n- contiguous positions 4202-4216: 15 files, 74 passed, 1 upstream todo, all other non-pass buckets zero\n- permanent exact-file and upgrade lifecycle-error regressions: passed\n- zig fmt --check and git diff --check: passed\n\nContinues #402 and advances #66.

Sign in to comment on this issue.