fix(queue): guard review/pause/resume/explain/generate-tests against webhook redelivery - #9398
Conversation
…webhook redelivery The four throttle functions (maybeThrottleReviewNagPing and siblings) already short-circuit a redelivered issue_comment via hasAuditEventForDelivery over the COMMAND_RATE_LIMIT_REDELIVERY_WINDOW_MS window, but the five earlier-dispatched action-command handlers had no equivalent guard. A GitHub redelivery (queue max_retries:3 plus the dlq re-drive reuse the identical deliveryId) therefore re-ran each handler's side effect a second time: a repeat re-review dispatch, pause/resume state change, explanation comment, or E2E test regeneration. Each handler now runs the same redelivery short-circuit keyed on its own completed audit-event type, placed before any side-effecting work, plus a per-handler redelivery test asserting the replay is a no-op.
|
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 #9398 +/- ##
==========================================
+ Coverage 75.46% 76.53% +1.07%
==========================================
Files 275 276 +1
Lines 58030 61442 +3412
Branches 6199 7435 +1236
==========================================
+ Hits 43790 47025 +3235
- Misses 13970 14032 +62
- Partials 270 385 +115
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-27 17:16:30 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
fix(queue): guard review/pause/resume/explain/generate-tests against webhook redelivery
The four throttle functions (maybeThrottleReviewNagPing and siblings) already
short-circuit a redelivered issue_comment via hasAuditEventForDelivery over the
COMMAND_RATE_LIMIT_REDELIVERY_WINDOW_MS window, but the five earlier-dispatched
action-command handlers had no equivalent guard. A GitHub redelivery (queue
max_retries:3 plus the dlq re-drive reuse the identical deliveryId) therefore
re-ran each handler's side effect a second time: a repeat re-review dispatch,
pause/resume state change, explanation comment, or E2E test regeneration.
Each handler now runs the same redelivery short-circuit keyed on its own
completed audit-event type, placed before any side-effecting work, plus a
per-handler redelivery test asserting the replay is a no-op.
Closes #9312
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines