ReviewOS

home-lang/home

Port Fastify WebSocket integration contracts

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

Context

The sequential Bun corpus frontier is js/third_party/@fastify/websocket/fastity-test-websocket.test.js at position 3951/4708, following completed PGlite work in #210. This contributes to #66.

Current gap

The module is classified as unsupported module syntax because fastify and @fastify/websocket imports are not yet represented in Home's third-party module layer. The test exercises real integration behavior beyond import resolution.

Acceptance criteria

  • Default imports for fastify and @fastify/websocket prepare and resolve.
  • Plugin and nested route registration preserve Fastify ordering/lifecycle.
  • listen({ port: 0, host }) returns a usable WebSocket address.
  • Client-to-server and server-to-client message delivery match the connection event API.
  • close() deterministically releases the listener and pending resources.
  • The copied test passes and is pinned in the permanent third-party gate.
10 days ago

Completed on main in edbb54b0a91817de21de190865fc6b89848d05b7 (feat(third-party): port Fastify WebSocket contracts).

js/third_party/@fastify/websocket/fastity-test-websocket.test.js is green at 1 passed, 0 failed, 0 TODO, 0 unsupported.

The adapter reuses Home's existing Bun.serve/WebSocket transport for Fastify plugin and nested route registration, ephemeral listen addresses, client-to-server EventEmitter-style messages, server replies, HTTP fallback routes, and deterministic close. The exact result is pinned in the permanent third-party gate, which passes in full.

The sequential frontier advances through 3951/4708. NAPI-RS Canvas/Jimp raster work is tracked next in #212.

Sign in to comment on this issue.