Skip to content

feat: add native WebSocket gateways#127

Merged
ItayTheDar merged 4 commits into
mainfrom
feat/websocket-gateways
May 10, 2026
Merged

feat: add native WebSocket gateways#127
ItayTheDar merged 4 commits into
mainfrom
feat/websocket-gateways

Conversation

@ItayTheDar
Copy link
Copy Markdown
Contributor

Summary

  • Ships PR [codex] add native WebSocket gateways #126 (originally merged into auspicious-dart instead of main) to production
  • Adds nest/websockets/ module: gateway, server, decorators, context
  • CLI support for generate gateway, plus docs (docs/websockets.md)
  • Test coverage under tests/test_websockets/ and tests/test_cli/test_generate_gateway.py

This is the websocket commit (4661ca9) cherry-picked cleanly onto main. The other commits on auspicious-dart are the DI-engine rewrite that already landed via PR #125.

Original PR: #126

Test plan

  • CI passes (websocket + CLI test suites)
  • pynest generate gateway scaffolding works end-to-end
  • Existing route resolver behavior unchanged for non-websocket routes

ItayTheDar and others added 4 commits May 10, 2026 18:21
…socket app

Loads the scaffolded chat_gateway.py via importlib, wires it into a Module,
boots a uvicorn server, and verifies the generated `ping` handler returns
`pong` over a real websocket connection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a `pynest generate gateway -n chat -p src` step to the CLI test
workflow and asserts the generated file exists with the expected
@WebSocketGateway decorator across all app-type variants.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a Blank-only step that loads the scaffolded chat_gateway.py, boots
it via PyNestFactory + uvicorn, opens a websocket to /chat and asserts
the {event:ping} → {event:pong} round-trip. Gated to the Blank matrix
variant since DB-backed apps would fail to boot without their database.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ItayTheDar ItayTheDar merged commit edf2ee3 into main May 10, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant