test(routing): add route-reply coverage

This commit is contained in:
Peter Steinberger
2026-01-07 05:07:53 +00:00
parent 3668388912
commit cb2a72f8a9
4 changed files with 122 additions and 0 deletions

View File

@@ -442,6 +442,10 @@ export function scheduleFollowupDrain(
while (queue.items.length > 0 || queue.droppedCount > 0) {
await waitForQueueDebounce(queue);
if (queue.mode === "collect") {
// Once the batch is mixed, never collect again within this drain.
// Prevents “collect after shift” collapsing different targets.
//
// Debug: `pnpm test src/auto-reply/reply/queue.collect-routing.test.ts`
if (forceIndividualCollect) {
const next = queue.items.shift();
if (!next) break;