fix(tia): re-anchor after a full suite run without a coverage driver - #1866
Open
lazerg wants to merge 1 commit into
Open
fix(tia): re-anchor after a full suite run without a coverage driver#1866lazerg wants to merge 1 commit into
lazerg wants to merge 1 commit into
Conversation
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:
Description:
ChangedFiles::filterUnchangedSinceLastRun()seeds its candidates with every path inlastRunTree, so a file that was edited during one run and reverted after it still counts as changed. It no longer matches the hash captured while it was dirty. That part is deliberate, a revert is a real change against the recorded edges.What is missing is the clean up. Without pcov or xdebug,
enterReplayMode()warns, runs the whole suite and returns beforereplayRanis set, soaddOutput()never reachesbumpRecordedSha(). The entry outlives the run that was meant to cover it, and every run after that prints the same warning and runs the same full suite. A driver clears it, so the trap only closes on people who do not have one.The fallback now flags the run, and the sha and the tree get re-anchored when it ends, the same way they do for a recorded commit that git no longer knows. The flag is read after the suppressed and RESULTS-ONLY checks, so a bailed or truncated run still writes nothing.
The regression test sits in
tests/Features/Tia/StateReclamation.php, next to the equivalent one for the unreachable commit. It plants the stale tree entry, runs twice withXDEBUG_MODE=off, and expects the second run to replay instead of warning. It fails on5.xin both the sequential and parallel datasets. The TIA tests are in their own group, so the snapshot tally does not move.Related:
Fixes #1864