ReviewOS

home-lang/home

Port Socket.IO close and protocol-violation lifecycle corpus

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

Track the contiguous Bun corpus blocker at js/third_party/socket.io/socket.io-close.test.ts (position 4050).

Required parity:

  • attach Socket.IO servers to Home's Node HTTP server surface and support owned/borrowed listener lifecycles;
  • model Engine.IO polling handshake, push, poll, CONNECT, duplicate-CONNECT, pre-CONNECT EVENT, and clean close packets;
  • release sessions/ports cleanly on close and preserve event ordering;
  • retain the copied upstream skips as explicit todos rather than silently dropping them;
  • provide causal, packet-redacted protocol errors with stable operation metadata;
  • add the copied case and error contract to the permanent third-party regression suite.
10 days ago

Implemented and pushed in https://github.com/home-lang/home/commit/14d6defda.

Coverage now includes:

  • Socket.IO server attachment to Home's Node HTTP server and owned numeric-port startup;
  • Engine.IO polling handshake/session creation, CONNECT acknowledgement, duplicate-CONNECT and pre-CONNECT EVENT clean-close behavior;
  • ordered poll queues and the expected Engine.IO close payload (packet types 6 then 1, separated by the record separator);
  • session/HTTP cleanup on io.close();
  • four copied upstream skips retained as explicit todos;
  • packet-redacted SocketIOProtocolError failures with stable code, phase, session id, retained cause, and explicit operation stack.

Verification:

  • focused position 4050: 1 file, 2 passed, 4 todo, 0 failed/unsupported/allowed-empty;
  • positions 4049–4050: 2 files, 3 passed, 4 todo, 0 failed/unsupported/allowed-empty;
  • permanent gRPC error-stack, SQL adapter-contract, and 33-case third-party diagnostic suites all pass.

Sign in to comment on this issue.