feat: define realtime and error contracts

This commit is contained in:
2026-10-25 04:18:32 +01:00
parent 90335ce1bd
commit d555bc0727
6 changed files with 54 additions and 2 deletions
+9 -1
View File
@@ -1,4 +1,12 @@
# Contract Testing
Fixtures cover HTTP responses, authenticated WebSocket events, errors, permissions, version negotiation, reconnects, and server-owned state transitions. Fixtures are deterministic, synthetic, and secret-free.
Fixtures cover HTTP responses, authenticated WebSocket events, errors, permissions,
version negotiation, reconnects, and server-owned state transitions. Fixtures are
deterministic, synthetic, and secret-free. Every new contract must include at
least one valid fixture and a negative case where validation rules are important.
The current realtime envelope is deliberately transport-neutral: the server may
deliver it over an authenticated WebSocket or a future compatible transport, but
the event identity and payload rules remain the same. `event_id` is the stable
deduplication key for at-least-once delivery.