https://github.com/k-kinzal/php-ai-toolkit/commits/main/…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
https://github.com/k-kinzal/php-ai-toolkit/commits/main/ の最新コミットでCIが落ちています。修正しCIをグリーンにしてください。
Assistant
I'll check the CI status for the latest commit on main.
Assistant
The local HEAD (
aa47efb) isn't pushed yet — CI failed on5528570. Let me see all failing jobs and check whether the unpushed commit already addresses them.Assistant
Several distinct failures. Let me look at the local state — the unpushed commit may already fix some — and reproduce locally.
Assistant
Now let me reproduce locally. Starting with the current state on PHP 8.5.
Assistant
Now the main fix — making the doctest configuration independent of PHPUnit's extension-bootstrap ordering:
Assistant
Now the extension test, which no longer needs to construct a version-specific facade:
Assistant
PHPStan's own
SrcUnitTestPairRulerequires each public method to be tested, sobootstrap()must stay directly exercised. I'll isolate the PHPUnit version difference in a fixture, the wayParserFactoryBridgedoes for php-parser:Assistant
Now the
Generatorimports:Assistant
All lanes verified locally. Now committing, grouped by the distinct failures:
Assistant
CI is running. While it completes, let me double-check one thing I could not run locally — that the new fixture is picked up by the autoloader as CI generates it:
Assistant
All CI jobs are green except mutation testing, which is still running. Let me wait on it:
Assistant
- User
Assistant
The mutation gate is the remaining failure: MSI 80.22% against the 81% floor. Let me get the numbers.
Assistant
The mutation gate is the last failure: the doctest port added ~3,100 mutants at a much lower kill rate, dragging the tree from 82.3% to 80.2%. I need the full escaped list to fix the tests. Setting up a local Infection run that matches CI:
Assistant
Both were killed by my
pkill. Restarting the run scoped to the doctest sources, with Xdebug off so it finishes in reasonable time:Assistant
The local run is drowning in timeouts because Xdebug is loaded. Let me unload it and restart:
Assistant
Only 592 mutants live in
src/Doctest(95 escaped) — so the deficit is wider than the doctest port. Let me preserve this list and start a full-tree run in the background:Assistant
Now I have a precise list. Let me read the sources behind the biggest clusters:
Assistant
Now writing the tests. Starting with the
__getdefault arms and the value objects:Assistant
Now the two biggest clusters. First
AssertionParser:Assistant
Now
ExampleExtractor:Assistant
Now
SourceScanner:Assistant
Now the remaining doctest fixes:
Assistant
The full-tree run is too slow on this machine. Better idea — mutate only what changed since the last green build:
Assistant
The doctest-side tests are in and passing; I'm waiting on the mutation measurement for the rest of the changed code.
Where the mutation gate actually stands: CI reported 12,561 mutants with 10,077 detected (80.22%); the 81% floor needs 10,175, so the build is 98 killed mutants short. The gap is not the doctest port alone — that code measures 592 mutants at 84%. Comparing against the pre-port baseline (9,468 mutants at 82.26%), the ~2,500 mutants added by the other recent work sit at ~72%, and that is what pulled the tree under the floor.
So far I've added 22 test methods across the doctest suite, targeting ~65 of the 95 escaped mutants there — the
__getfallback arms,AssertionParser's capture trimming and buffering,ExampleExtractor's tag/fence boundaries and line numbering,SourceScanner's walk not descending into bodies, andExceptionMatcherrejecting a short name that resolves to a different class (with a fixture exception whose short name collides with the global one). About 28 of the 95 are equivalent mutants that no test can kill — e.g. ends in , where both arms are identical, and 's php-parser 4 branch never runs on the version CI mutates.