Repository navigation
test(worker): pin wrangler.toml's one-message batches and that queue() retries a failing message on its own - #697
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…) retries a failing message on its own queue() acks or retries each message of a batch inside its own try/catch, but wrangler.toml delivers one message per batch and worker.test.ts runs under the same setting, so the loop was never driven past a failure. queueBatch.test.ts runs the bundle under a two-message batch whose first message throws; wranglerConfig.test.ts pins max_batch_size = 1, which is what gives one installation's scheduled run the whole invocation budget. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
|
Please add a kind label with |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesRead the consumer this pins, not just the diff — looks correct to me.
The 10s poll-then-300ms-settle in the batch test is bounded and fails loudly rather than hanging, so no flake concern worth blocking on. No findings. |
Test Improvement
Two pins for
src/server/worker.ts's queue consumer, the onesrc/module neithervitest --coveragenor the Stryker sets reach (it runs only inside workerd), so the miniflare suite is its only evidence:__tests__/worker/queueBatch.test.ts(new): runsdist-worker/worker.jsundermaxBatchSize: 2, maxRetries: 1andsendBatches twoschedulemessages; the fake GitHub fails installation 7's repository listing and serves installation 9's. Asserts 7 is listed twice (retried on its own), 9 exactly once (ran behind the failure and was acked, so the retry did not carry it), and 7's listing comes first. Every existing consumer test — andwrangler.tomlitself — delivers one message per batch, soqueue()'s per-messagetry/catchwas never driven past a failure.__tests__/worker/wranglerConfig.test.ts: pinsqueueConsumers['prow-jobs'].maxBatchSize === 1through wrangler's own translation, next to the queue/DLQ/migration pins. That1is what makes "the consumer runs the scheduled jobs for that installation only, within one invocation's budget" (feat(app): run on Cloudflare Workers; Platform.defer() for the grace period #615) true, and nothing held it.Verified at
9aa12b8: with the per-messagetry/catchremoved fromqueue()anddist-workerrebuilt, the batch test fails (expected [] to have a length of 1— installation 9 never runs); withmax_batch_size = 2inwrangler.tomlthe config pin fails. Restored,__tests__/workeris 42/42 including--sequence.shuffle;eslintandnpm run typecheckclean.Occupied-ground check: held #687 edits
__tests__/worker/worker.test.ts(KV TTL, grace-period delay); this PR does not touch that file. No other held PR toucheswranglerConfig.test.tsorqueue().Related Issue
Closes #696
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88