Skip to content

fix: a batch put back on a full capture queue drops the oldest, counted - #13

Merged
kbhatnagar1506 merged 1 commit into
mainfrom
fix/requeue-full-queue
Oct 3, 2026
Merged

kbhatnagar1506 merged 1 commit into
mainfrom
fix/requeue-full-queue

Conversation

@kbhatnagar1506

Copy link
Copy Markdown
Owner

Found in a bug sweep of the codebase.

When a capture batch didn't fit under the byte limit, the rest of it went back to the front of the queue:

  • Python: deque.extendleft on a full queue evicted the newest calls, without counting them.
  • JS: the queue grew past its cap.

The calls being put back are the oldest, so on a full queue they are now the ones dropped, and they are counted. That is the queue's own documented policy. New test: putBack / _put_back with a full queue.

🤖 Generated with Claude Code

When a batch didn't fit under the byte limit, the rest went back to the front with
deque.extendleft; with the queue full of newer calls meanwhile, that evicted the newest,
silently. The calls put back are the oldest: they are the ones dropped, and counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kbhatnagar1506
kbhatnagar1506 merged commit 17440ba into main Oct 3, 2026
5 checks passed
@kbhatnagar1506
kbhatnagar1506 deleted the fix/requeue-full-queue branch October 3, 2026 22:28
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