Skip to content

fix(tia): record new dependencies of known tests on coverage runs - #1955

Open
lazerg wants to merge 2 commits into
pestphp:5.xfrom
lazerg:fix/tia-coverage-new-edges
Open

lazerg wants to merge 2 commits into
pestphp:5.xfrom
lazerg:fix/tia-coverage-new-edges

Conversation

@lazerg

@lazerg lazerg commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

On --tia --coverage runs, Graph::replaceEdges() is called with keepExisting: true and skips every test file that already has edges. A test that starts using a new file never gets that edge, so a later change to the file replays the test as passed.

This takes the change suggested in the issue: with keepExisting, the new edges are added to the recorded set instead of being dropped. The coverage report still cannot narrow a recorded set, and a plain --tia run still replaces it.

The new test in tests/Features/Tia/CoveragePiggyback.php makes Greeter call Calculator and expects app/Calculator.php in the edges of GreeterTest after a coverage run. It fails on 5.x in the sequential and parallel datasets. It skips without a coverage driver, like the xml coverage test above it.

Related:

Fixes #1953

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 never records a new dependency of a test that is already in the graph, so a broken dependency replays as passed

1 participant