You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 95a8255
Browse filesBrowse the repository at this point in the historyBrowse files
committed
test(relay): pin the timeout reason on a failed history REQ
Address review: the regression only drove an ordinary DB error, so a
mapper that labelled every failure `database error` still passed. Lock
the replica's `events` past its statement timeout first and assert the
REQ ends in exactly `CLOSED error: query timed out` with the
subscription retired, then run the existing 42P01 arm through the same
helper. Clients treat the two reasons differently (timeout terminal,
database error retryable), so the label is contract.
Also qualify the ARCHITECTURE.md EOSE sentence: history is capped at 500
per filter, so EOSE marks a successful bounded query, and the claim is
scoped to ordinary (non-search) REQs.
Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Luke Tornquist <[email protected]>
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,7 +378,7 @@ This prevents a race where a non-member receives live fan-out events from a priv
378
378
379
379
### Historical Query (EOSE)
380
380
381
-
After registering, the REQ handler queries Postgres for stored events matching the filters (up to 500 per filter, hard cap). These are sent as `["EVENT", sub_id, event]` frames before `["EOSE", sub_id]`. New events arriving after EOSE are delivered via the fan-out path. EOSE means every stored match was sent, so a failed history read never ends in EOSE: it retires the subscription with `["CLOSED", sub_id, "error: query timed out"]` for a statement timeout or `"error: database error"` for anything else.
381
+
After registering, the REQ handler queries Postgres for stored events matching the filters (up to 500 per filter, hard cap). These are sent as `["EVENT", sub_id, event]` frames before `["EOSE", sub_id]`. New events arriving after EOSE are delivered via the fan-out path. For an ordinary (non-search) REQ, EOSE marks a successful bounded history query, so a failed history read never ends in EOSE: it retires the subscription with `["CLOSED", sub_id, "error: query timed out"]` for a statement timeout or `"error: database error"` for anything else.
382
382
383
383
**Client consumption invariant.** A client rebuilding channel state must
384
384
open its live subscription before (or overlapping) the finite history
0 commit comments