Linora

0303. HTTP op batches and clientIds through pooled writer-mode realtime connections

Status: Accepted (2026-11-27). Implements 0022 “one op pipeline”; protocol field ClientSubscribe.mode agreed with WP-B.

Context

POST .../ops must give exactly the WebSocket verdicts, so it has to run the realtime gateway’s own stages. POST .../client-ids must allocate from the same per-file blocks the realtime owners manage (files.next_client_id is realtime-owned, ADR 0021). The API is stateless and must not leak connections or block on a refused batch.

Decision

Alternatives

Consequences

HTTP and WS share every validation stage by construction (verified end to end against apps/realtime: identical verdicts for 7 rejection reasons). A burst of HTTP batches costs one connection per (credential, file) per replica. Each allocated clientId keeps its own connection for 10 s.