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
Phase 3: range read_flight buffers frames with no cap while more is set #178
A peer can send frames with more set and make the reader buffer without bound. A fixed cap would break bootstrap of large stores (about 17.6 MB of IDs at 524k events). Needed: stream the flight, or bound each frame and the total with a size rule. Found in the Phase 3 review; being fixed.
id train triage (2026-10-24): too-big-needs-design — range read_flight streaming/size rule; a fixed cap would break ~17.6 MB bootstrap of large stores.
The fix landed in commit 51e96d8 — "fix(rust): range flights are read under a per-session byte budget [P3.1c]" (2026-10-12) — matching the issue's "being fixed" note.
At HEAD, pkgs/id/src/event_store/sync.rs: read_flight takes a ReadBudget; read_flight_frame refuses any frame announcing more than range::FRAME_CAP bytes and charges the budget before buffering (wire bytes, then per-entry ENTRY_CHARGE), so a flight whose frames keep more set cannot grow the buffer past the session budget — it ends with BudgetExceeded ("raised before the frame that would pass the budget is buffered"). This is the issue's second option: bound each frame and the total with a size rule, with the budget configurable via Params::with_session_budget so large-store bootstrap is a budget choice, not a hard cap failure.
Regression test in the same file: test_an_unbounded_flight_ends_at_the_session_budget — a peer sending 4 MiB of more-set flights against a 256 KiB session budget must end with BudgetExceeded before buffering past the budget, with the store unchanged.
Activity
dezren39 commentedon Oct 24, 2026
id train triage (2026-10-24): too-big-needs-design — range read_flight streaming/size rule; a fixed cap would break ~17.6 MB bootstrap of large stores.
dezren39 commentedon Oct 29, 2026
🤖 Agent note · done
moreis setEvidence (fresh read of HEAD, this shift)
pkgs/id/src/event_store/sync.rs:read_flighttakes aReadBudget;read_flight_framerefuses any frame announcing more thanrange::FRAME_CAPbytes and charges the budget before buffering (wire bytes, then per-entryENTRY_CHARGE), so a flight whose frames keepmoreset cannot grow the buffer past the session budget — it ends withBudgetExceeded("raised before the frame that would pass the budget is buffered"). This is the issue's second option: bound each frame and the total with a size rule, with the budget configurable viaParams::with_session_budgetso large-store bootstrap is a budget choice, not a hard cap failure.test_an_unbounded_flight_ends_at_the_session_budget— a peer sending 4 MiB ofmore-set flights against a 256 KiB session budget must end withBudgetExceededbefore buffering past the budget, with the store unchanged.