Repository navigation
Stop classifying a failing PHPUnit assertion as a Composer failure (#377) - #378
Merged
Merged
Conversation
) php_composer_failure carried PHPUnit's own verdict markers (FAILURES!, Failed asserting, the Tests: ... Failures: summary) plus the bare composer install/update commands that run green in nearly every PHP job. A real symfony/symfony Unit Tests run (29551386048) that installed cleanly and then failed one ErrorHandler assertion was reported as php_composer_failure at 0.95, sending the maintainer to debug an install that had succeeded. Narrow the rule to genuine dependency errors (unresolvable requirement, platform mismatch, drifted lockfile) and the autoload Class ... not found. A plain PHPUnit test failure now carries nothing here and lands on unknown -- the honest ceiling, since PatchRail has no PHP test-failure class. Genuine composer failures keep full confidence; the 223-fixture zoo stays top-1 = 1.0. - narrow php_composer_failure patterns; update likely_subsystem/repair strategy - correct the self-written php-phpunit-failure fixture to expect unknown; lower min-confidence on lock-drift and autoload fixtures to their re-measured values - commit the real symfony run as a real-world benchmark log + pin it with a test - refresh docs/real-world-benchmark.md (twelfth log, five unknowns) and CHANGELOG
Merged
PabloCodes7
added a commit
that referenced
this pull request
Jul 21, 2026
Cut 0.7.4 from main. The last release, 0.7.3 (2026-07-16), predates ten false-positive fixes that are sitting on main and not on PyPI: an installed pytest read as a failing test run (#376), a passing test's title read as a secrets failure (#380), a PHPUnit assertion read as a Composer failure (#378), Flutter's cached Gradle Wrapper (#382), Cabal's dependency resolution read as Maven (#383), Crystal and dune's make targets read as C/C++ (#384, #385), a parenthesized 504 (#391), mypy in a pixi manifest (#390), an unset TERM read as a missing secret (#392), a warning-only yarn install and a recovered checkout (#393), and a verdict held up by invocations alone reporting diagnosis-level confidence (#395). Every one of those is a wrong answer a maintainer gets today from pip install patchrail. Version bumped in the four places that spell it out (pyproject, __init__, README quickstart, uv.lock), CHANGELOG's Unreleased section dated, and the real-world benchmark's release-status paragraph corrected: it no longer claims six fixes are unreleased. Co-authored-by: PabloCodes7 <[email protected]>
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.
Closes #377.
The confident-wrong
A real failed run of symfony/symfony
Unit Tests (8.3)(29551386048) installs its dependencies cleanly withcomposer update, runs the suite, and one assertion inErrorHandlerfails:PatchRail answered
php_composer_failureat 0.95 (on 0.6.1 and on the live PyPI 0.7.3) — telling a maintainer whose Composer step had gone green to go debug dependency installation.Root cause
The
php_composer_failurerule carried PHPUnit's own verdict markers (FAILURES!,Failed asserting, theTests: … Failures:summary) as if a failing test were a failing install, and it counted the barecomposer install/composer updatecommands that run in nearly every PHP job. The self-written zoo fixturephp-phpunit-failure.logenshrined the same wrong answer.Fix
Your requirements could not be resolved,requires php, a drifted lockfile, an unresolvableProblem N) and the autoloadClass … not found.unknown— the honest ceiling, since PatchRail has no PHP test-failure class (same as ruff and svelte).php-phpunit-failurefixture to expectunknown; lower the re-measured min-confidence on thelock-drift(0.85→0.7) and autoload (0.7→0.5) fixtures.tests/test_php_test_failure_not_composer.py, and refreshdocs/real-world-benchmark.md(twelfth log, fiveunknowns) + CHANGELOG.Verification
patchrail ci benchmark examples/ci-triage: 223/223, top-1 = 1.0 (no regression).php_composer_failurenow 5 fixtures, all passing;unknown1 fixture.