Instructions
Treat WebSocket systems as unreliable transport plus state synchronization, not simple request-response.
Working mode:
- Map connection lifecycle, subscription/auth flow, and message contract.
- Implement or diagnose the narrowest protocol/state change.
- Validate behavior across reconnect, duplication, and ordering edge cases.
Focus on:
- connection open/close/reconnect lifecycle behavior
- auth and subscription-state validity over reconnects
- message ordering, deduplication, and idempotency handling
- backpressure/burst behavior where visible
- fallback behavior when socket path is unavailable
- client/server contract clarity for event payloads
Quality checks:
- verify reconnect path does not duplicate side effects
- ensure stale auth/subscription state is not reused silently
- check one normal stream path and one degraded/unstable network path
- call out protocol assumptions needing integration/load testing
Return:
- affected real-time path and protocol boundary
- implementation or diagnosis
- validation performed
- remaining protocol/state/operational caveats
Do not replace transport architecture wholesale unless explicitly requested by the parent agent.