Read AI advisor verdicts from CH and use in autorevert decisions#7908
Merged
izaitsevfb merged 3 commits intomainfrom Apr 2, 2026
Merged
Read AI advisor verdicts from CH and use in autorevert decisions#7908izaitsevfb merged 3 commits intomainfrom
izaitsevfb merged 3 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
661668a to
bb41c53
Compare
|
Deployment failed with the following error: |
fc6dc64 to
e1d39e6
Compare
When advisor verdicts are available in misc.autorevert_advisor_verdicts, autorevert now uses them to make faster decisions: - revert → produce AutorevertPattern immediately (skip restarts) - not_related → early exit (Ineligible) - garbage → suppress signal for 2 hours since verdict timestamp - unsure → continue normal restart-to-confirm flow Key changes: - AIAdvisorResult dataclass + AdvisorVerdict enum in signal.py - SignalCommit gets optional advisor_result field - fetch_advisor_verdicts() query in signal_extraction_datasource.py - _attach_advisor_verdicts() in signal_extraction.py wires CH data to SignalCommits - Flakiness check moved AFTER advisor check/dispatch so advisor can still evaluate flaky-looking signals - 8 new tests covering all verdict types, expiry, signal key matching
1c51ffe to
ed40f5a
Compare
1. AutorevertPattern carries optional advisor_verdict field. When a revert is advisor-accelerated, the revert comment includes "Note: This revert was accelerated by the AI advisor" with verdict and confidence. 2. State JSON includes advisor data in two places (both forward/backward compatible — absent in older states, gracefully ignored): - outcomes: advisor_verdict on AutorevertPattern data - columns: advisor_results map per (commit_sha → verdict/confidence) 3. HUD renderer shows: - "AI:revert" / "AI:not_related" / etc badges in table cells - "[AI: revert @95%]" in outcome notes for advisor-accelerated reverts
52db32f to
b9686ba
Compare
FakeDatasource now accepts advisor_verdicts dict, enabling end-to-end tests that verify verdicts are correctly attached to SignalCommit objects during extraction. 3 new tests: - verdict attached to matching (commit, signal_key) - verdict for wrong signal_key is not attached - verdict attached to test-track signals
b9686ba to
529dd6d
Compare
Contributor
|
There is a gap in our autorevert that we're not closing with the given strategy, but I believe it is not sufficiently pervasive to require dedicated logic. Having said that, the solution seems very simple.
|
wdvr
approved these changes
Apr 1, 2026
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
Closes the loop on the AI advisor: autorevert now reads verdict results from
misc.autorevert_advisor_verdicts(populated via S3 ingestion from the advisor workflow) and uses them to make faster decisions.Verdict Handling
revertAutorevertPatternimmediately — skip restartsnot_relatedIneligible(ADVISOR_NOT_RELATED)garbageunsureChanges
signal.py:AdvisorVerdictenum,AIAdvisorResultdataclass,SignalCommit.advisor_resultfield,_check_advisor_verdict()method, restructuredprocess_valid_autorevert_pattern()(flakiness check moved after advisor)signal_extraction_datasource.py:fetch_advisor_verdicts()— CH query for verdicts by commit SHAssignal_extraction.py:_attach_advisor_verdicts()— post-processing step that wires CH data to SignalCommit objectstests/test_signal.py: 8 new tests covering all verdict types, 2h expiry, signal key matching, flaky signal handlingDependencies
Test plan
tested locally:
example of the result:
2026-04-01T00-11-54.124373-00-00.html
2026-04-01T01-22-24.845831-00-00.html