noCV
LIVE-103 · Establish the room contract

Authorize room subscription before replaying its history

Practice briefBugIntermediate

A client changes the room ID in its subscribe message and receives a few private timeline entries before the gateway rejects membership. Move authority checks ahead of all history and live delivery.

Focused work estimate
2h + prerequisites
Priority in the scenario
High
Engineering practice
Authorization · Tenant isolation · WebSocket security

Estimated field mix

  • Security60%
  • Real-time systems40%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

The fictional Harbor operations team coordinates synthetic incidents in a shared room. Engineers post status notes and claim response tasks while connections come and go. Scope is one application gateway, a durable room event store, and fixture clients; alert paging and external chat delivery are excluded.

Setup prerequisites

  • Room membership and command contracts
  • Synthetic incident events and a controllable transport harness

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Subscription derives tenant and user from the authenticated session.
  • Current room membership is checked before replay queries and live listener registration.
  • Denied subscriptions leave no active listener or partially delivered room data.

Implementation constraints

  • Enforce room scope in repository methods as well as at the transport boundary.

Verification to include

  • Subscribe as an authorized synthetic member and inspect permitted replay.
  • Request a room in another organization and revoke membership before listener installation; deliver zero room events in both cases.

Deliverables

  • Authorized subscription boundary and cross-room denial tests

Rollout and recovery

Require this before private-room pilots; disable subscriptions if membership authority is unavailable.

Value of the work

For the engineer: Practice event identity, ordering, replay, authorization, and bounded backpressure in one understandable system.

For the team: Inspect how an engineer keeps collaborative state trustworthy during failures without relying on optimistic success messages.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.