Repository navigation
fix(detectors): keep analysis whole while recording is still under way (#1212) - #1219
Merged
Merged
Conversation
#1212) CompletableFutureObtrudeDetector read a future's thread name before recordObtrude had set it: stateFor publishes the state first, and the null went into Map.of. analyze now reads the count before the thread name (recordObtrude sets them in the reverse order) and skips a future with neither yet. ThreadPoolDeadlockDetector listed the pools, then read the detector-wide risk count. A submission recorded between the two left hasIssues() true with no pool listed, so checkedReport threw on the empty structuredViolations. Each pool now keeps its own risk count and analyze totals the pools it lists. Both tests build the half-recorded state directly and failed before the fix; DetectorAnalysisUnderConcurrentWritesTest passed 20 of 20 repeats. Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Fixes the two detectors that turned
DetectorAnalysisUnderConcurrentWritesTestred on and off.CompletableFutureObtrudeDetector:NullPointerExceptionon main atfd0f41659(run 42398089347) and1ab210caa(run 42373466647).stateForpublishes a future's state beforerecordObtrudesets its thread name, andanalyze()put that null intoMap.of.analyzenow reads the count before the thread name, the reverse of the orderrecordObtrudesets them, and skips a future that has neither yet.ThreadPoolDeadlockDetector: "reported issues with an empty structuredViolations list" on #1208 (run 42398751481).analyze()listed the pools, then read the detector-wide risk total. A submission recorded between the two lefthasIssues()true with no pool listed. Each pool now keeps its own risk count, andanalyzetotals the pools it lists.Corrects #1212's description: #1207 changed only
AtomicityValidator, so it did not fix the first bug.Tests
checkedReportassertion) and pass with the fix.DetectorAnalysisUnderConcurrentWritesTestpassed 20 of 20 repeats locally.mvn clean verify -DskipTests(static gates) andmvn -P fast test(3922 + 113 + 13, no failures).Refs #1212
🤖 Generated with Claude Code