Skip to content

Resolve #2752: Correct WebSocket room injection and backpressure docs#2764

Merged
ayden94 merged 1 commit into
mainfrom
issue-2752-correct-websocket-room-injection-backpressure-docs
Jul 14, 2026
Merged

Resolve #2752: Correct WebSocket room injection and backpressure docs#2764
ayden94 merged 1 commit into
mainfrom
issue-2752-correct-websocket-room-injection-backpressure-docs

Conversation

@ayden94

@ayden94 ayden94 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Linked context: #2752[audit][area:protocol-adapters] Correct WebSocket room injection and backpressure documentation (priority:p2).

WebSocket room examples injected the type-only WebSocketRoomService contract without a runtime DI token, so the documented pattern failed DI. Cross-runtime room broadcast documentation also promised backpressure behavior that only the Node.js-backed adapter implements.

Changes

  • book/intermediate/ch13-websockets.md / .ko.md (Section 13.5): inject WebSocketGatewayLifecycleService via @Inject(...) and type the constructor parameter as WebSocketRoomService; limit backpressure claims to the Node.js-backed adapter and state that fetch-style runtimes do not apply a backpressure policy to room broadcasts. Summary bullet updated to mention the injection token.
  • packages/websockets/README.md / .ko.md (Rooms section): same injection token and backpressure runtime limit corrections.
  • docs/getting-started/migrate-from-nestjs.md / .ko.md: state the injection token and backpressure runtime limit in the WebSocket migration bullet.
  • docs/CONTEXT.md / .ko.md, docs/reference/package-surface.md / .ko.md: mirror the injection token and backpressure runtime limit in discoverability summaries.
  • tooling/governance/verify-platform-consistency-governance.mjs: extend the contract companion comment to cover the new WebSocket room injection token and backpressure runtime limit discoverability.
  • tooling/governance/websocket-room-injection-backpressure-discoverability.test.ts: regression test asserting the injection token and backpressure runtime limit stay documented across governed English and Korean docs.

Testing

  • pnpm docs:sync-check — passed (42 en/ko page pairs, 10 navigation metadata pairs).
  • pnpm verify:platform-consistency-governance — passed.
  • pnpm exec vitest run tooling/governance/websocket-room-injection-backpressure-discoverability.test.ts — 2 tests passed.
  • pnpm exec vitest run tooling/governance/verify-platform-consistency-governance.test.ts — 102 tests passed.
  • pnpm exec vitest run packages/websockets/src/public-surface.test.ts — 6 tests passed.

Release impact

  • This PR has no consumer-visible release impact.

Docs-only change. No public @fluojs/* package behavior, API surface, package contents, or release metadata changed.

Public export documentation

  • Changed public exports include a source-level summary.
  • Changed exported functions document matching @param / @returns tags where applicable.
  • Source @example blocks and README scenario examples still play complementary roles.

해당 없음 — no public exports under packages/*/src changed.

Behavioral contract

  • No documented behavioral contracts were removed without migration notes.
  • New behavioral contracts are documented in the affected package README.
  • Intentional limitations are explicitly stated (not silently removed).
  • Runtime invariants are covered by regression tests.

The corrected room injection token and backpressure runtime limit are now documented as intentional limitations: fetch-style runtimes do not apply a backpressure policy to room broadcasts, and WebSocketRoomService is a type-only contract that must be injected via the lifecycle service token. The regression test in tooling/governance/websocket-room-injection-backpressure-discoverability.test.ts keeps these facts aligned across governed docs.

Platform consistency governance (SSOT)

  • SSOT English/Korean mirror structure remains synchronized for changed governance docs.
  • If platform contract docs changed, companion updates include discoverability/docs index, tooling or CI enforcement, and regression-test evidence.
  • Any package README alignment/conformance claims are backed by the applicable platform harness tests.

pnpm docs:sync-check and pnpm verify:platform-consistency-governance pass. The governance script comment block and the new regression test are the CI/tooling and regression-test companions for this contract-governing doc update.

Closes #2752

WebSocket room examples injected the type-only WebSocketRoomService contract
without a runtime DI token, so the documented pattern failed DI. Cross-runtime
room broadcast documentation also promised backpressure behavior that only the
Node.js-backed adapter implements.

- book/intermediate/ch13-websockets(.ko).md: inject WebSocketGatewayLifecycleService
  via @Inject(...) and type the parameter as WebSocketRoomService; limit
  backpressure claims to the Node.js-backed adapter.
- packages/websockets/README(.ko).md: same injection token and backpressure
  runtime limit corrections in the Rooms section.
- docs/getting-started/migrate-from-nestjs(.ko).md: state the injection token
  and backpressure runtime limit in the WebSocket migration bullet.
- docs/CONTEXT(.ko).md, docs/reference/package-surface(.ko).md: mirror the
  injection token and backpressure runtime limit in discoverability summaries.
- tooling/governance/verify-platform-consistency-governance.mjs: extend the
  contract companion comment to cover the new WebSocket room injection token
  and backpressure runtime limit discoverability.
- tooling/governance/websocket-room-injection-backpressure-discoverability.test.ts:
  regression test asserting the injection token and backpressure runtime limit
  stay documented across governed English and Korean docs.
@ayden94
ayden94 merged commit a6576d2 into main Jul 14, 2026
10 checks passed
@ayden94
ayden94 deleted the issue-2752-correct-websocket-room-injection-backpressure-docs branch July 14, 2026 01:33
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.

[audit][area:protocol-adapters] Correct WebSocket room injection and backpressure documentation (priority:p2)

1 participant