fix(review): stop re-reviewing a PR whose CI is permanently stuck - #3755
Conversation
|
Superagent did not find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-06 08:03:01 UTC
🛑 Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3755 +/- ##
==========================================
+ Coverage 93.30% 93.32% +0.02%
==========================================
Files 317 317
Lines 32384 32396 +12
Branches 11876 11877 +1
==========================================
+ Hits 30215 30234 +19
+ Misses 1537 1530 -7
Partials 632 632
🚀 New features to boost your workflow:
|
prReadyForReview finalizes (runs a full paid AI review) once CI has been pending past its staleness cap, so a PR is never silently deferred forever. But it had no memory of having already done so: a CI context that will never settle (an orphaned required context, a fork check with no webhook to ever fire) hits this exact branch again on every later evaluation and re-spends another review for a disposition already established. Confirmed live: 3 PRs whose CI never settled were each re-reviewed 200-300+ times over more than 20 hours this way -- independent of the sweep's own outage-repair attempt cap (#3747), since ordinary (non-priority) sweep candidacy and live webhook re-evaluations both still reach this function. Caps it at one finalize per head SHA via a SHA-scoped audit event (reusing the existing ledger, no new table): once already finalized for the exact current head SHA, defer again instead of paying for another review. A new commit changes the head SHA, resetting the guard so a still-stuck PR finalizes fresh.
The DB-only audit_events write from the previous commit has no operator visibility until someone queries the ledger directly, the way this bug was originally found. Add a matching structured console.error at the exact moment the guard suppresses a repeat review, so it flows through the existing forwardStructuredLogToSentry pipeline (level:"error" is deliberate -- the line's own existence IS the anomaly signal, same convention as selfhost_ai_provider_failed / selfhost_ai_providers_exhausted).
…ze guard Both new recordAuditEvent calls in the #orb-ci-stuck-repeat guard (review_finalized_ci_stuck_guard on first finalize, review_deferred_ci_pending on a guarded repeat) swallow their own write failures via .catch(() => undefined), but neither failure path had a test -- codecov flagged both lines as uncovered patch. Add two regression tests forcing the audit_events insert to throw in each case and asserting the surrounding finalize/defer decision still completes correctly despite the swallowed write failure.
4604fd7 to
963b654
Compare
Summary
prReadyForReviewfinalizes (runs a full paid AI review) once a PR's CI has been pending past its staleness cap, so it's never silently deferred forever -- correct in isolation, but it had no memory of having already done so for the exact same head SHA.JSONbored/metagraphed#3546,JSONbored/metagraphed#3594,JSONbored/awesome-claude#4398) were each re-reviewed 200-300+ times over more than 20 hours, continuing right up through this investigation -- entirely separate from the sweep outage-repair cap fixed in fix(review): stop the medium-effort retry storm burning tokens on zero output #3747, since ordinary (non-priority) sweep candidacy and live webhook re-evaluations both still reach this exact function every few minutes.audit_eventsledger, no new table/migration). Once already finalized for the current head SHA, defer again instead of paying for another review. A new commit changes the head SHA, which resets the guard and lets a still-stuck PR finalize fresh.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.audit_events), not a filed issue; the summary above is the evidence.Validation
git diff --checknpm run actionlint-- not run (no workflow files touched)npm run typecheck-- cleannpm run test:coverage(full/unsharded) -- not run locally; ran the full affected file directly instead (test/unit/queue.test.ts, 587/587 passed, including the new regression test)npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm run ui:openapi:check/npm run ui:lint/npm run ui:typecheck/npm run ui:build/npm audit --audit-level=moderate-- not run locally (no wrangler/MCP/UI/dependency surface touched); left to CI.prReadyForReviewtwice at the same head SHA and asserts the first evaluation finalizes (posts a real check-run/gate write) while the second defers with zero additional writes.Safety
Notes