Skip to content

hotfix(head-lag): a full race book no longer eats pool trades; Codex edge errors end the subscription - #3257

Merged
Flotapponnier merged 1 commit into
mainfrom
hotfix/head-lag-book-full-main
Oct 23, 2026
Merged

Flotapponnier merged 1 commit into
mainfrom
hotfix/head-lag-book-full-main

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Cherry-pick of #3256 to main: the agg services on Railway build from main.

Off-pool voids were kept for raceRetention (10 min). On Solana OKX and
Birdeye produce ~4,800 of them a minute per region, ~52,000 held against
raceMaxOpen = 50,000: the book sat full, observe() dropped every new hash
including bench-pool trades, and races were scored only in bursts as old
voids expired. On 2026-10-23 ~70% of pool trades never raced, and a feed
whose arrival was dropped could lose a race to a slower one admitted after
a slot freed. Off-pool voids now leave after 30 s, and a drop on a full
book is counted (head_lag_races_voided_total{reason="book_full"}).

Codex edge nodes also end a subscription with a single "next" carrying
only errors (EDGE_ORIGIN_UNAVAILABLE, seen on iad.edge) and keep the
socket open. That now forces a reconnect instead of waiting 10 minutes
for the flow watchdog.

…ge error ends the subscription

Off-pool voids were kept for raceRetention (10 min). On Solana OKX and
Birdeye produce ~4,800 of them a minute per region, ~52,000 held against
raceMaxOpen = 50,000: the book sat full, observe() dropped every new hash
including bench-pool trades, and races were scored only in bursts as old
voids expired. On 2026-10-23 ~70% of pool trades never raced, and a feed
whose arrival was dropped could lose a race to a slower one admitted after
a slot freed. Off-pool voids now leave after 30 s, and a drop on a full
book is counted (head_lag_races_voided_total{reason="book_full"}).

Codex edge nodes also end a subscription with a single "next" carrying
only errors (EDGE_ORIGIN_UNAVAILABLE, seen on iad.edge) and keep the
socket open. That now forces a reconnect instead of waiting 10 minutes
for the flow watchdog.
@Flotapponnier
Flotapponnier merged commit 8323333 into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant