fix(review): add a review-failure-burst signal alongside review-burst - #3991
Merged
Conversation
The existing review-burst anomaly only counts SUCCESSFUL publish events, so a repeat-failure retry storm (every attempt inconclusive, never reaching a publish) is invisible to it -- the exact incident c707394 (#3747) fixed. Every AI review call already records an `inconclusive` boolean in ai_usage_events' metadata_json regardless of whether it published, so add a companion query keyed on that and wire it into the same anomaly detector, alongside the existing publish-only signal (kept as-is; it still catches a different, valid incident shape: excessive successful re-reviews of an unchanged PR). Closes #3926
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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
findHottestReviewTargetForRepo) only counts SUCCESSFULpr_public_surface_publishedevents, so a repeat-failure retry storm (every attempt inconclusive, never reaching a publish) is invisible to it -- the exact incident c707394/fix(review): stop the medium-effort retry storm burning tokens on zero output #3747 fixed.inconclusiveboolean inai_usage_events.metadata_json(set atrecord()'s call site insrc/services/ai-review.ts) regardless of whether it published. AddedfindHottestInconclusiveReviewTargetForRepo, a companion query keyed on that field, and wired it into the samedetectOutcomeAnomaliesdetector alongside the existing signal.statuscolumn (always"ok"for a completed call, inconclusive or not) -- the daily neuron-budget sum filtersstatus='ok', so repurposing that field would have silently excluded genuinely-spent tokens from budget accounting. Uses the existing metadata field instead.Scope
Closes #3926above.Validation
npm run typechecknpx vitest run test/unit/ops-wire.test.ts-- 26/26 pass, including an E2E test reproducing the fix(review): stop the medium-effort retry storm burning tokens on zero output #3747 incident shape (repeated inconclusive calls, zero publishes) and a healthy-mix negative test.Safety