Repository navigation
fix: record with pcov only, drop the Xdebug opt-in (SEL-120) - #2
Conversation
Capability::testMap() only looked for pcov, so a runner using Xdebug with
SELECTIVE_TEST_MAP_XDEBUG=1 advertised select and the server never asked it
to record, even though Tracer could. Tracer::available() and the "no tracer"
warning in Session each carried their own copy of the check, and neither
looked at xdebug.mode: with Xdebug loaded and the opt-in set but no coverage
mode, the client would take a recording and write nothing.
One predicate now, Capability::canRecord(): pcov is loaded, or Xdebug 3.1+
reports the coverage mode (xdebug_info('mode'), so XDEBUG_MODE is honored)
and the opt-in is set. testMap(), Tracer::available() and Session use it.
SELECTIVE_TEST_MAP_DISABLE still wins.
Also suggest ext-pcov in composer.json and say in the README that pcov is
required to record and is not installed with the client, plus the Xdebug
opt-in.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhRfiMBEZfMLrhpYsH7DSF
Advertising record for Xdebug (the previous commit) makes the three
recording conformance scenarios time out under Xdebug, 3 of 3 runs. The
first recorded test takes ~9s: CodeCoverage::stop() runs with an empty
filter and processes ~290 vendor files (7.6s measured). Excluding vendor
with xdebug_set_filter does not help, since PHPUnit's files are compiled
before the filter is set.
So the Xdebug path is removed. Capability::canRecord() is now just
extension_loaded('pcov'), still the one predicate behind testMap(),
Tracer::available() and the "no tracer" warning. The XdebugDriver fallback
and the SELECTIVE_TEST_MAP_XDEBUG branch are gone, the README no longer
mentions Xdebug, and the tests cover pcov, no pcov, Xdebug in each mode
with the old env var, and DISABLE.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhRfiMBEZfMLrhpYsH7DSF
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186m4FtnerBJftK3fP8mheE
|
Reviewed Merged main (#3) into the branch as Opus checked it in pcov, Xdebug and no-extension containers. Without pcov the client advertises Not fixing here; all three are filed as SEL-434:
Behaviour change: |
Recording is pcov only. Fixes the client side of SEL-120.
The Xdebug opt-in (
SELECTIVE_TEST_MAP_XDEBUG=1) is removed. It never advertisedrecord, so the server never asked an Xdebug runner to record. Making it advertiserecordwasn't worth it: on an earlier head of this branch (87d7164) that change made the three recording conformance scenarios (test_map_fragment,upload_stall,signal_keeps_close_status) time out under Xdebug, 3 of 3 runs. The first recorded test took ~9s.CodeCoverage::stop()runs with an empty filter and processes ~290 vendor files (7.6s measured). Excluding vendor withxdebug_set_filterdidn't help, because PHPUnit's files are compiled before the filter is set.What changed
Capability::canRecord()is the one predicate (pcov loaded).testMap(),Tracer::available()and the "no tracer" warning inSessionall use it. The Xdebug driver fallback and the env-var branch are gone.composer.jsonsuggestsext-pcov. README says pcov is required to record and isn't installed with the client; no Xdebug mention.testMap()in a barephp -n: no pcov, pcov, Xdebug in each of three modes plus the old env var, and DISABLE.Proof
testMap()/Tracer::available(), containers on PHP 8.4:developoroff+ old env varMain's
available()was true for Xdebug plus the env var, with or without coverage mode. It now matches what is advertised.php tests/harness/play.phpplus the per-scenario conformance loop) on 6 rows, all pcov: 8.2/10.5.66, 8.2/11.5.57, 8.3/12.5.40, 8.4/13.4.3, 8.5/12.5.40, 8.5/13.4.3. Each: play rc 0, 71 tests (62 on main), conformance 26 passed, 0 failed, 0 n/a. The 3 skips are the Xdebug cases, which need an Xdebug build.|| SELECTIVE_TEST_MAP_XDEBUG=1tocanRecord()fails the env-var test.Not run: the Laravel job. A bare
php:8.4-cliimage also failssigterm_after_failure(nokill), on main too.🤖 Generated with Claude Code
https://claude.ai/code/session_01RhRfiMBEZfMLrhpYsH7DSF