Repository navigation
Correct Dependent Test detector (approved SRS exception) - #5
Merged
Merged
Conversation
7 tasks done
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.
What this changes
Corrects the Dependent Test detector, which could not report a smell under any
input. This modifies an engine file under an exception to the SRS engine
constraint, approved by the client on 16 November 2026. The full record is in
documentation/srs-exceptions.md.Two independent defects, either sufficient on its own:
Stringto aStream, so the condition wasfalse for every method in every file and the element list was never populated.
setHasSmell(true), andgetHasSmell()countsonly elements whose flag is set.
The fix uses
contains()against a set of the test method names, callssetHasSmell, and excludes a method calling itself as recursion rather thandependency. No other engine file is touched.
tools/corpus/engine-checksums.txtis regenerated — the diff is one line, thehash of the approved file.
Testing
Regression fixture added at
fixtures/testAccount.java/fixtures/Account.java,where
testBalanceAfterDeposit()callstestDeposit().Identical input both times.
Fixture corpus coverage rises from 20 of 21 to 21 of 21 detectors. All other
detector results unchanged.
Shared cross-IDE corpus re-run:
5 matched, 5 declared divergences, 0 unexpected, 0 stale. No case in it contains a test calling another test, so no expectedresult moves and no divergence declaration goes stale.
Full CI job simulated locally before pushing: checksums verify, engine compiles,
corpus comparison exits 0.