fix(review): stop redundant republishing for a draft fork PR's repeat CI-completion triggers#6710
Conversation
… CI-completion triggers (#6685) A draft fork PR's own CI produces one check_run.completed webhook per job (each arriving with an empty pull_requests[] payload, forcing the fork-resume fallback in webhook-coalesce.ts to re-run the whole evaluation pass), so a multi-job CI run republished the SAME comment/label surface once per completing job even though nothing about the PR changed between them. Confirmed live: 12 identical republishes of #6592 in 29 minutes -- the actual root cause of the ops_anomaly "review burst" false alarms that have been firing across the fleet for at least a day. The one-shot cadence guard already avoids wasting AI spend on these repeat passes (ai_slop_one_shot_skip, linked_issue_satisfaction_one_shot_skip, ai_review_auto_review_skipped all correctly fire), but nothing stopped the pipeline from proceeding to republish anyway. The only existing "skip republish if nothing changed" guard (canSkipCurrentSurface) is deliberately scoped to publicSurface: "off" repos, and requires gateEnabled -- which is false fleet-wide here since reviewCheckMode is disabled, so that guard never even engages for loopover/awesome-claude/metagraphed regardless of surface type. Add a narrower, independent skip specifically for the draft case: when autoReviewSkipReason is deterministically "review skipped (draft)" (not just reused from cache) and the head SHA matches what was last fully published, republishing is a provable no-op. Hoisted the reason into a try-block-independent variable (autoReviewSkipReasonForPublish) since the original is scoped inside the try block that ends before the publish site, mirroring the existing aiReviewExpected/aiReviewWasReused hoisting pattern. Closes #6685
|
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 #6710 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 681 682 +1
Lines 68098 68126 +28
Branches 18695 18704 +9
=======================================
+ Hits 63775 63802 +27
Misses 3347 3347
- Partials 976 977 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-16 20:36:04 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
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. 🟩 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.
|
Summary
check_run.completedwebhook per job (each arriving with an emptypull_requests[]payload, forcing the fork-resume fallback inwebhook-coalesce.tsto re-run the whole evaluation pass), so a multi-job CI run republished the SAME comment/label surface once per completing job even though nothing about the PR changed between them. Confirmed live: 12 identical republishes of feat(ui): maintainer dashboard panel for the existing @loopover chat Q&A surface #6592 in 29 minutes — the actual root cause of theops_anomaly"review burst" false alarms that have been firing across the fleet for at least a day.ai_slop_one_shot_skip,linked_issue_satisfaction_one_shot_skip,ai_review_auto_review_skippedall correctly fire), but nothing stopped the pipeline from proceeding to republish anyway. The only existing "skip republish if nothing changed" guard (canSkipCurrentSurface) is deliberately scoped topublicSurface: "off"repos, and requiresgateEnabled— which is false fleet-wide here sincereviewCheckModeis disabled, so that guard never even engages for loopover/awesome-claude/metagraphed regardless of surface type.autoReviewSkipReasonis deterministically"review skipped (draft)"(not just reused from cache) and the head SHA matches what was last fully published, republishing is a provable no-op. Hoisted the reason into a try-block-independent variable (autoReviewSkipReasonForPublish) since the original is scoped inside the try block that ends before the publish site, mirroring the existingaiReviewExpected/aiReviewWasReusedhoisting pattern.Closes #6685
Validation
npm run typechecknpm run test:coverage(full unsharded run — new lines fully covered, verified line-by-line againstcoverage/lcov.info)npm run test:ci(full gate; one unrelated, pre-existingminer-attempt-worktree.test.tstimeout reproduced under heavy concurrent-session load, confirmed to pass cleanly in isolation twice and unrelated to this diff — every other step in the chain verified individually green)npm audit --audit-level=moderate— 0 vulnerabilitiesgit diff --check— clean