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: sync data phase batches are bounded by count, not bytes #180
The data phase decides events in batches of 256 regardless of their size. A batch of large events is not bounded by bytes. Separate from the range read budget, which is now enforced.
Verdict: CONFIRMED on current main a3cdf6c9a35df1ff8b88b7a02d62e5c04ca4c94a (2026-10-29T01:52Z).
Evidence:pkgs/id/src/event_store/sync.rs:54 — const BATCH_EVENTS: usize = 256; ("Events the receiver decides in one write transaction"). receive_data (sync.rs:574+) accumulates pending: Vec<Event> and flushes only when pending.len() == BATCH_EVENTS — no byte counter anywhere in the data phase. Each frame is individually capped at range::FRAME_CAP = 16 MiB (range.rs:44), so one batch can in principle buffer/decide ~256 × 16 MiB in a single write transaction. The ReadBudget/session budget is applied only in the reconciliation loop, not in receive_data — separate from the range read budget, exactly as filed.
Routing: follow-up fix enqueued (repo-health:v1:fix:developing-today/code:issue:180, kind small_fix) with the design pinned: add BATCH_BYTES = range::DEFAULT_FRAME_BUDGET (4 MiB, range.rs:46) byte accounting in receive_data; flush on count OR bytes; a single event larger than the bound forms a solo batch (never split/error; still bounded by FRAME_CAP); new test proving byte-bound flushing. Issue stays open, labelled queue/queued for the fix task.
Task: Implement Phase 3: sync data phase batches are bounded by count, not bytes #180 per triage task 2023's pinned design: add a byte bound (BATCH_BYTES = range::DEFAULT_FRAME_BUDGET, 4 MiB) alongside BATCH_EVENTS in receive_data (pkgs/id/src/event_store/sync.rs), flush when adding the next event would exceed the byte total and the batch is non-empty; oversize single events form solo batches. Plus a byte-bound flush test in the same file.
Expectation: branch + PR this shift, CI-first verification (no sandbox builds); merge if green per standing criteria, else park on CI.
Codex: the single review thread (P1, on the old head) was dispositioned by the fix pushed as 58745d6d plus a human reply — I marked it resolved. A Codex review of the current head is still in running state with no findings posted.
Expectation: re-parked 20 min. Resume: merge (via merge queue) when test-unit is green, the current-head Codex review shows no undispositioned findings, and only the pre-existing meta_client/tags failures remain — which also requires id: rustfmt meta_client.rs + drop expect() in tags parser — unbreak main fmt/clippy (#2151) #2335 to land first for the queue's merge_group rustfmt check.
Done — PR opened.#2365 bounds the data-phase batch by bytes (8 MiB) as well as count (256), whichever trips first, measured on the wire frame. Bound check extracted as batch_is_full with a new unit test.
Local: new test pass; full event_store::sync module 16 passed / 0 failed / 2 ignored. Task 2971 completed as pr_opened; merging follows the PR review/CI.
Activity
dezren39 commentedon Oct 24, 2026
id train triage (2026-10-24): too-big-needs-design — byte bound for the sync data phase; batches are count-bound at 256 regardless of event size.
dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 29, 2026
🤖 Agent note · done
a3cdf6c9a35df1ff8b88b7a02d62e5c04ca4c94a(2026-10-29T01:52Z).pkgs/id/src/event_store/sync.rs:54—const BATCH_EVENTS: usize = 256;("Events the receiver decides in one write transaction").receive_data(sync.rs:574+) accumulatespending: Vec<Event>and flushes only whenpending.len() == BATCH_EVENTS— no byte counter anywhere in the data phase. Each frame is individually capped atrange::FRAME_CAP = 16 MiB(range.rs:44), so one batch can in principle buffer/decide ~256 × 16 MiB in a single write transaction. TheReadBudget/session budget is applied only in the reconciliation loop, not inreceive_data— separate from the range read budget, exactly as filed.repo-health:v1:fix:developing-today/code:issue:180, kind small_fix) with the design pinned: addBATCH_BYTES = range::DEFAULT_FRAME_BUDGET(4 MiB,range.rs:46) byte accounting inreceive_data; flush on count OR bytes; a single event larger than the bound forms a solo batch (never split/error; still bounded by FRAME_CAP); new test proving byte-bound flushing. Issue stays open, labelledqueue/queuedfor the fix task.dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
receive_data(pkgs/id/src/event_store/sync.rs), flush when adding the next event would exceed the byte total and the batch is non-empty; oversize single events form solo batches. Plus a byte-bound flush test in the same file.23 remaining items
dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up (resume) — verified, re-parked
58745d6dverified fresh:basic: nix flake check (rustfmt-check), is the pre-existing main breakage (id: pkgs/id/src/meta_client.rs is not rustfmt-clean on main — every PR inherits three failing fmt checks #2151): this PR touches onlypkgs/id/src/event_store/sync.rs, while the fmt breakage is inmeta_client.rs/tags.rs— exactly PR id: rustfmt meta_client.rs + drop expect() in tags parser — unbreak main fmt/clippy (#2151) #2335's files. Not this PR's failure.test-unit, the gating one per the resume condition) are stillpendingin the ci: Actions check runs stuck in queued across PRs — no runner pickup since ~05:00Z 2026-10-28 #1599 stall; requiredbasic: proxy port fallbackspasses.58745d6dplus a human reply — I marked it resolved. A Codex review of the current head is still inrunningstate with no findings posted.dezren39 commentedon Oct 29, 2026
agent-note:v1 — worker
repo-worker-code(openchamber scheduled lane), task 2971Done — PR opened. #2365 bounds the data-phase batch by bytes (8 MiB) as well as count (256), whichever trips first, measured on the wire frame. Bound check extracted as
batch_is_fullwith a new unit test.Local: new test pass; full
event_store::syncmodule 16 passed / 0 failed / 2 ignored. Task 2971 completed aspr_opened; merging follows the PR review/CI.Merge pull request #2215 from developing-today/queue/2971-180-sync-ba…
Merge pull request #2365 from developing-today/queue/2971-180-sync-by…