Repository navigation
Description
What
The SOP-002 decoy suites for PHP (tests/decoys/test_decoy_php.py, arriving on main with #9463) found real engine leaks. Each is filed as its own issue and locked in the suite as @pytest.mark.xfail(strict=True): fixing a leak makes its test pass unexpectedly, which fails the suite until the marker is removed. That is the signal the leak is closed. Part of the epic #8863 (keyword-family validity).
Leaks
- PHP: # line comments are not stripped, so commented code counts in every keyword family #9443 PHP: # line comments are not stripped, so commented code counts in every keyword family
- PHP: text outside <?php ... ?> tags (inline HTML) is counted as code in every keyword family #9444 PHP: text outside tags (inline HTML) is counted as code in every keyword family
- PHP: a comment on the same line as the opening <?php tag (first line of the file) is counted as code #9445 PHP: a comment on the same line as the opening <?php tag (first line of the file) is counted as code
- PHP api: an attribute whose name merely starts with Route/Get/Post/Put/Delete/Patch/ApiResource counts as an API attribute #9446 PHP api: an attribute whose name merely starts with Route/Get/Post/Put/Delete/Patch/ApiResource counts as an API attribute
- PHP telemetry: the logger( branch has no leading word boundary (my_logger(), getlogger()) #9447 PHP telemetry: the logger( branch has no leading word boundary (my_logger(), getlogger())
- PHP telemetry: the severity word is matched anywhere later on the line, not as the logging method #9448 PHP telemetry: the severity word is matched anywhere later on the line, not as the logging method
Recall gaps the suite noticed (not filed: decide with the contract before calling them bugs)
- namespaced attributes (
#[\App\Route]) are not counted byapi
How
Follow .claude/skills/family-validity-fix/SKILL.md, docs/agents/family-validity-checklist.md and docs/agents/decoy-spec-protocol.md (SOP-002). Rules live in gitgalaxy/standards/language_standards/languages/php.py. First check that the suite is on main (ls tests/decoys/test_decoy_php.py); if it is not yet, the PR it arrives in (#9463) has not merged: wait. Per leak: reproduce with the snippet in the leak issue, name the cause class, read the contract, make the smallest fix, then remove that test's xfail marker, flip the cell's gate in tests/family_validity_baseline.json from leak to pass (decoys..), regenerate the charts (python tests/tools/family_validity_chart.py --write), run the suite both directions, time CPU before and after (seconds, on keyword-rosetta and language-crucible), and bless the goldens once for the PR. If keyword-rosetta counts move, label rosetta:rebless-owed. One PR for this language only, with one Closes #N line per leak it fixes. A real fix needs no rule contract change; where the contract is draft or silent, file the question on #8862 instead of guessing.
The suite is a measurement: do not weaken a test to make a fix pass, and do not skip a leak because the fix is awkward.
🤖 Generated with Claude Code
Activity
Re-bless goldens: guzzle Middleware.php telemetry 1 -> 0 (LoggerInter…