GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(sync): PR #1433 collect_batch lets refused arrivals grow a batch without bound — no total cap, grace restarts on every arrival · Issue #1537 · developing-today/code

id(sync): PR #1433 collect_batch lets refused arrivals grow a batch without bound — no total cap, grace restarts on every arrival #1537

New issue
Copy link
New issue
Copy link
Closed
#1698
Closed
id(sync): PR #1433 collect_batch lets refused arrivals grow a batch without bound — no total cap, grace restarts on every arrival#1537
#1698
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Finding

PR #1433's new collect_batch (pkgs/id/src/log_sync.rs) caps a batch only by its header count, but stores every arrival in the batch Vec and restarts the batch grace on every arrival — including Arrival::Refused. A peer that keeps sending refused arrivals inside the grace window can therefore keep one batch open indefinitely: the Vec grows without bound, no write transaction ever commits, and the refused tally is never recorded.

Filed by pr-diff-review-b (lane B) from reviewing PR #1433. Refs #241 (the PR's parent issue).

Evidence

  • PR: fix(id): coalesce LogSync ingest batches and restart batch grace on each arrival (#241) #1433 — OPEN, head 0c80543f842ecee1eab5da56ba910f1aed472877
  • PR head pkgs/id/src/log_sync.rs:454 — fn collect_batch(first: Arrival, arrivals: &mut mpsc::Receiver<Arrival>) -> Vec<Arrival>
  • PR head pkgs/id/src/log_sync.rs:461-468 — headers increments only for Arrival::Header(_); batch.push(arrival) runs for every arrival; the only break is if headers >= INGEST_BATCH { break; } (INGEST_BATCH = 256 headers)
  • PR head pkgs/id/src/log_sync.rs:470-476 — on every received arrival the grace is reset (grace_end = None), so the 5 ms BATCH_GRACE (:73) is an idle timeout that a steady refused stream never lets expire
  • What a Refused arrival is (current main 3b559045, pkgs/id/src/log_sync.rs ~:349-356): an Operation message that carries a body — "Events carry no body here, and a body is not stored, so a body is refused." It is entirely peer-controlled and costs the peer one frame per arrival.
  • Behaviour on current main that the PR replaces: ingest_arrivals counts a refusal immediately (tally.refused += 1), never stores it in a Vec, and collects a batch with non-blocking try_recv only — a refused-heavy stream cannot accumulate or stall a batch.

So on the PR head: body-carrying operations spaced <5 ms apart keep collect_batch looping forever (headers stays 0, the cap never fires, disconnect is the only exit), the batch Vec grows by one element per frame for as long as the peer keeps sending, and the ingest worker (spawn_blocking, one per session) makes no progress — no commit, no tally — for the whole time.

The four new batch tests in the PR exercise only Header arrivals, so this mix is unpinned.

Why it matters

LogSync ingest is a network-facing path: the peer pacing the arrivals is not necessarily a well-behaved client. One misbehaving or buggy peer can pin a blocking worker thread and grow host memory linearly with frames sent, for the duration of a session, instead of being counted-and-refused as on main today. It is also a silent stall: nothing is committed and no error surfaces while it happens.

Acceptance criteria

  • collect_batch is bounded in total arrivals and/or wall time regardless of the header/refused mix (e.g. refusals count toward a cap, or are tallied and dropped during collection as on main, or a maximum batch duration is enforced) — the chosen bound is named in the doc comment, replacing the current "refusals do not count towards the cap, as before" wording if it no longer describes the whole story
  • New regression test: a stream of Arrival::Refused paced inside the grace (and/or more refusals than INGEST_BATCH) terminates the batch at the bound, and the headers collected alongside are still handed to the store
  • The PR's existing four batch tests (paced coalescing, grace restart, lone arrival, full-batch cap) still pass

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    on Oct 28, 2026
  2. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-591

  3. dezren39
    added
    source/pr-diff-reviewFiled by the pr-diff-review job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review-b
    • Session / ID: pr-diff-review-b cron run 2026-10-27 19:00 CDT (lane B; B-state watermark code 1398)
    • Found via: filed this run
    • Task: PR fix(id): coalesce LogSync ingest batches and restart batch grace on each arrival (#241) #1433's collect_batch (pkgs/id/src/log_sync.rs:454, head 0c80543) caps a batch only by header count (:461-468) but pushes every arrival into the batch Vec and restarts the 5 ms grace on every arrival (:470-476) — Arrival::Refused (a peer-controlled, body-carrying Operation; main :349-356) therefore keeps a batch open indefinitely, growing the Vec without bound and committing nothing, where main counts a refusal immediately and never stores it. Enqueued as a triage packet to repo-health-code-pilot.
    • Expectation: triage confirms against PR fix(id): coalesce LogSync ingest batches and restart batch grace on each arrival (#241) #1433's head and current main; done when collect_batch is bounded in total arrivals/time for any header/refused mix, a refused-stream regression test pins it, and the PR's four batch tests still pass, per the issue's acceptance criteria.
    • Links: PR fix(id): coalesce LogSync ingest batches and restart batch grace on each arrival (#241) #1433 · issue id(sync): PR #1433 collect_batch lets refused arrivals grow a batch without bound — no total cap, grace restarts on every arrival #1537 · parent Bulk LogSync test retries a mid-stream reset instead of explaining it #241
  5. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  7. 99 remaining items

  8. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    on Oct 28, 2026
  9. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1806
    • Found via: queue claim (resume of awaiting_ci)
    • Task: PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 CI re-check on head e1e07ef — 26 pass / 5 pending / 0 fail at the 5-minute poll limit (2026-10-28T16:58Z); remaining jobs (cargo-check, clippy-lint, test-shard-2, test-web-unit, crash-gate-ingest) are queued behind the runner backlog.
    • Expectation: parked 20 min per CI rule — resume: merge PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 when CI is green (tolerating only the pre-existing id(serve): world_names_are_bounded_and_are_a_single_path_segment test fails on clean main #1709 failure), then complete task 1806.
    • Links: PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 @ e1e07ef
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Oct 28, 2026
  11. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D
    • Session / ID: queue task 1806, Lane D shift 2026-10-28 12:14 CDT
    • Found via: queue claim (resume from parked awaiting_ci checkpoint)
    • Task: Resume PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 for id(sync): PR #1433 collect_batch lets refused arrivals grow a batch without bound — no total cap, grace restarts on every arrival #1537 — CI now fully green (31 pass / 0 pending / 0 fail, fresh check); merge under standing criteria and close out task.
    • Expectation: effort/s; done = PR merged, issue closed, task 1806 completed fixed_merged.
    • Links: PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 · branch queue/1806-1537-collect-batch-bound @ e1e07ef
  12. dezren39
    removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 28, 2026
  13. dezren39
    closed this as completedin #1698on Oct 28, 2026
  14. dezren39
    added a commit that references this issue on Oct 28, 2026

    id(sync): bound collect_batch by total arrivals — refused stream can …

    f6760a6
  15. developing-today
    added
    status:done
    on Oct 28, 2026
  16. dezren39
    removed
    status:done
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  17. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane D
    • Session / ID: queue task 1806, Lane D shift 2026-10-28 12:14 CDT (resume of the parked awaiting-CI task)
    • Found via: queue claim
    • Task: PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 merged — collect_batch in pkgs/id/src/log_sync.rs is now bounded by BATCH_MAX_ARRIVALS counting refused arrivals too, so a refused stream can no longer hold a batch open; regression tests for the refused stream and refusal tallying included.
    • Expectation: done = PR merged and issue closed — met. Merge sha f6760a6.
    • Links: PR id(sync): bound collect_batch by total arrivals — refused stream can no longer hold a batch open (#1537) #1698 (MERGED) · CI: 31 checks pass / 0 fail (fresh check this shift); laptop targeted batch_collection tests passed (prior lane).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.