Skip to content

fix(tia): drop coverage lines the current file no longer has - #2001

Merged
MrPunyapal merged 3 commits into
pestphp:5.xfrom
tiagoabsantos:fix/1954-drop-stale-coverage-lines
Oct 31, 2026
Merged

MrPunyapal merged 3 commits into
pestphp:5.xfrom
tiagoabsantos:fix/1954-drop-stale-coverage-lines

Conversation

@tiagoabsantos

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

When a covered file's lines moved, --tia --coverage kept the old line numbers in coverage.bin.gz as executable lines with no tests. The report counted them. Reverting the file did not remove them, so --min=100 kept failing on a suite that was back at 100%.

A file measured in the current run now owns its line map. Cached lines that are not in that map are dropped before the merge. Lines that still exist keep hits from tests that were replayed.

Related:

Fixes #1954

Tiago Santos and others added 3 commits October 27, 2026 17:19
@MrPunyapal
MrPunyapal merged commit e7a1b48 into pestphp:5.x Oct 31, 2026
7 checks passed
@MrPunyapal

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: --tia --coverage keeps the old line numbers of an edited file in coverage.bin.gz, so uncovered lines stay after a revert

2 participants