fix(review): finalize CI-stuck silence, post a waiting placeholder, and name every silent AI-review skip - #9180
Merged
Merged
Conversation
…nd name every silent AI-review skip #9011: prReadyForReview used to defer a missing-required-context PR forever past the 2-minute cap instead of falling through to the existing finalize-past-cap block; a required context that never appears keeps ciState pending (never "passed"), so finalizing here can never produce a would-merge disposition. A new stuckReason ("missing_required_context" vs "ci_running") is threaded through the audit/log calls so the two causes are distinguishable. #9042: the silent wait before a review runs (measured live: 8.3min median, 21.9min p90, up to 50.9min) now gets an immediate "waiting" panel comment (renderWaitingForCiPlaceholder) upserted through the same PR_PANEL_COMMENT_MARKER the final verdict replaces, instead of leaving the PR blank until CI settles. #9000: root-causes the #8972 incident where a forced ("Re-run LoopOver review") retrigger completed with none of the events a forced pass should emit anywhere in the audit trail. shouldStartAiReviewForAdvisory folds in shouldRequirePublicAiReviewForAdvisory's hard gate (aiReviewMode off, an ineligible author, no head SHA, an AI kill-switch off, no AI binding) - a forced retrigger does not bypass this gate, and every one of its branches previously returned false with zero audit trail. resolvePublicAiReviewGateSkipReason names the exact reason, and a new catch-all audit event fires whenever aiReviewWillRun ends up false for a cause none of the other (already-audited) paths cover. The two adjacent silent branches in the frozen/paused/one-shot reuse chain - a hold condition true but nothing published to actually reuse - get their own named "unavailable" events for the same reason. This only closes the exhaustive-auditing and root-cause portion of #9000; the receipt-feedback / lost-webhook-click recovery sweep it also asks for is not yet implemented. Closes #9011 Closes #9042
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
#9173 introduced a comment referencing the deprecated pre-rename product name, which the branding-drift check on main was not catching -- breaking CI for every PR based on current main, including this one.
❌ 5 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prReadyForReviewdeferred a missing-required-context PR forever past its 2-minute surfacing cap instead of falling through to the existing finalize-past-cap block. A required context that never appears keepsciStateatpending(neverpassed), so finalizing here can never produce a would-merge disposition — it's safe to stop deferring silently. AstuckReason(missing_required_contextvsci_running) is threaded through the audit/log calls so the two causes are distinguishable.#8972incident where a forced ("Re-run LoopOver review") retrigger completed with none of the events a forced pass should ever emit anywhere in the audit trail.shouldStartAiReviewForAdvisoryfolds inshouldRequirePublicAiReviewForAdvisory's hard gate (AI review mode off, an ineligible author, no head SHA, an AI kill-switch off, no AI binding) — a forced retrigger does not bypass this gate, and every one of its branches previously returnedfalsewith zero audit trail anywhere. A new reason-resolving function names the exact cause, and a catch-all audit event fires whenever the AI review doesn't run for a reason none of the other (already-audited) paths cover. Two adjacent silent branches in the frozen/paused/one-shot reuse logic — a hold condition true but nothing published to actually reuse — get their own named "unavailable" events for the same reason.This PR only closes the exhaustive-auditing and root-cause portion of #9000; the receipt-feedback / lost-webhook-click recovery sweep it also asks for is a separate, larger piece of work and is not implemented here.
Test plan
npx tsc --noEmit -p tsconfig.json --incremental false— cleannpx vitest run test/unit/queue.test.ts test/unit/queue-2.test.ts test/unit/queue-3.test.ts test/unit/queue-4.test.ts test/unit/queue-5.test.ts test/unit/queue-lifecycle-guards.test.ts test/unit/ai-review-advisory.test.ts test/unit/auto-review-wiring.test.ts test/unit/reputation-wiring.test.ts test/unit/pr-panel-retrigger-pending-force-review.test.ts test/unit/pr-labeled-public-surface.test.ts— 1126 passedmainafter landing (picked up fix(selfhost): rescue orphaned dispositions, break the freeze-deadlock, and release AI-review locks before a hard kill can #9174/fix(webhook): scope the label public-surface trigger to disposition labels only #9176/fix(orb): bind identity to credentials instead of renameable logins or trusted request bodies #9177/fix(trust): commit the decision record to what actually decided, record the holdout draw, and fix the attestation envelope's width and freshness #9178/fix(orb): stop four silent alarm gaps in relay-drain, crash handling, DLQ, and reversal signals #9179 with no conflicts)Closes #9011
Closes #9042