refactor(infra): rename Cloudflare Queue to loopover-jobs with dual-consume drain - #5558
Conversation
…onsume drain Creates loopover-jobs and loopover-jobs-dlq, switches the JOBS producer binding to write there going forward, and keeps the old gittensory-jobs/-dlq queues as active consumers during the drain window so any message already in flight at cutover still gets processed. Remove the 2 old-queue consumer entries once `wrangler queues info gittensory-jobs` confirms it's drained, then retire the old queues themselves. The queue() handler in src/index.ts needed zero code changes -- it's already queue-name-agnostic (dispatches by the "-dlq" suffix, not a brand-specific string), so this is purely a wrangler.jsonc binding change. Deliberately NOT touched: gittensory-webhooks/-dlq. Investigation found the WEBHOOKS Queue binding is only ever reached by enqueueWebhookByEnv's self-host-only code path (gated behind isSelfHostedReviewRuntime, which is always false on this hosted Worker -- direct-review-app webhook enqueue is retired in favor of the Orb broker's /v1/orb/webhook ingress). The live gittensory-webhooks queue has 0 producers, confirming its consumer binding is leftover from before that retirement -- renaming dead infrastructure under a new name didn't seem right, so it's flagged separately for a cleanup/deletion decision rather than migrated here. Part of #4768.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5558 +/- ##
=======================================
Coverage 94.91% 94.91%
=======================================
Files 570 570
Lines 45351 45351
Branches 14675 14675
=======================================
Hits 43046 43046
Misses 1571 1571
Partials 734 734
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 05:11:40 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
The old gittensory-jobs/-dlq drain-window consumers (added in #5558) are removed now that `wrangler queues info gittensory-jobs` confirms 0 producers and the queue fully drained -- the JOBS producer has been writing exclusively to loopover-jobs since that PR merged. Completes the #4768 queue rename; the Cloudflare-side queue objects themselves are deleted directly (not tracked in code) once this deploys and the consumer binding that currently blocks deletion is released. Closes #4768.
Summary
Creates
loopover-jobsandloopover-jobs-dlq(live, empty, verified viawrangler queues list), switches theJOBSproducer binding to write there going forward, and keeps the oldgittensory-jobs/-dlqqueues wired as active consumers during the drain window so any message already in flight at cutover still gets processed.The
queue()handler insrc/index.tsneeded zero code changes — it's already queue-name-agnostic (dispatches by the-dlqsuffix, not a brand-specific string match), confirmed by reading the dispatch logic directly. This is purely awrangler.jsoncbinding change.Follow-up (not this PR): once
wrangler queues info gittensory-jobsconfirms it's drained to zero, remove the 2 old-queue consumer entries and retiregittensory-jobs/-dlqthemselves.Deliberately NOT touched: gittensory-webhooks/-dlq
Traced the code path:
enqueueWebhookByEnv(the only writer of theWEBHOOKSbinding) returns"review_unavailable"immediately viaif (!isSelfHostedReviewRuntime(env)), before ever reachingenv.WEBHOOKS.send()— this check is always false on the hosted Cloudflare Worker.src/env.d.ts's own comment confirms: "Cloudflare no longer binds this because hosted reviews are retired." The livegittensory-webhooksqueue has a consumer bound to this Worker but 0 producers (confirmed viawrangler queues info gittensory-webhooks) — this strongly suggests it's leftover infrastructure from before direct-review-app webhook handling was retired in favor of the Orb broker's/v1/orb/webhookingress. Renaming dead infrastructure under a new name didn't seem right, so this is flagged as a separate cleanup/deletion decision rather than migrated here.Test plan
npm run test:cigate green.wrangler queues listconfirmsloopover-jobs/loopover-jobs-dlqexist, live, empty.gittensory-jobsqueue name (the dispatch logic being name-agnostic means zero test updates were needed).cf-typegen:checkconfirms no drift.Part of #4768.