fix(ai-contracts-test): add no-changes tracking to prevent ranker loops#18601
Merged
smartcontracts merged 6 commits intodevelopfrom Dec 12, 2025
Merged
fix(ai-contracts-test): add no-changes tracking to prevent ranker loops#18601smartcontracts merged 6 commits intodevelopfrom
smartcontracts merged 6 commits intodevelopfrom
Conversation
- add no-need-changes.toml file for tracking tests with comprehensive coverage - modify ranker to detect stale entries by comparing contract git hashes - output stale_toml_entries array in ranking JSON - inject formatted stale entry list into rendered prompt via placeholder - remove ReinitializableBase.t.sol file from the exclusion file
- add retry loop with exponential backoff for session creation - track blocked state duration and exit after 5-minute timeout - parse nested structured_output for no-changes detection - change status value from finished_no_changes to no_changes_needed
- replace prepare_notification.sh with build_notification.sh - add notification for TOML tracking PRs when no changes needed - create build-slack-notification just command wrapping the script - update CircleCI to call new just command
- bump VERSION to 1.4.0 for TOML tracking feature - remove ReinitializableBase.t.sol from exclusion list - update runbook with TOML tracking system documentation - document stale entry detection and automatic reintegration
- check structured_output for changes_needed field when Devin blocks - add PR URL logging for both "finished" and "no_changes_needed" statuses - wait up to 5 minutes for structured_output to populate after blocked state - prioritize structured_output check before falling back to PR-only detection
- add ReinitializableBase.t.sol entry to no-need-changes.toml - add SafeSend.t.sol entry to no-need-changes.toml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #18601 +/- ##
===========================================
- Coverage 75.78% 75.48% -0.30%
===========================================
Files 189 189
Lines 11239 11239
===========================================
- Hits 8517 8484 -33
- Misses 2576 2611 +35
+ Partials 146 144 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
smartcontracts
approved these changes
Dec 12, 2025
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.
This PR adds TOML-based tracking for tests with comprehensive coverage to prevent the ranker from repeatedly selecting the same files when no improvements are needed.
Reason
The system had no mechanism to track when Devin analyzed a test and determined no changes were needed. This caused a loop where the ranker would repeatedly select the same test file on subsequent runs, wasting resources and time. Without persistent tracking, tests with already-comprehensive coverage would be re-analyzed indefinitely. This PR implements TOML-based tracking with automatic reintegration when contracts change, breaking the loop and allowing the system to progress through the test suite efficiently.
Changes
no-need-changes.tomltracking system to exclude tests with comprehensive coverage from rankingstructured_output.changes_neededbefore logging outcomestructured_outputto populate in Devin blocked statelog.jsonfor both outcome typesReinitializableBase.t.sol,SafeSend.t.sol)