Repository navigation
PHP keyword families: bitwise_ops, io, debug_prints, time_date_logic count only their own construct (Part of #8863, #9337) - #9370
Conversation
|
No description provided. |
|
PR #9370 @ b20aeb8: 1 failed check(s) == rosetta-audit (failure) -- real |
|
No description provided. |
|
Waiting on an owner decision (asked privately, 2026-11-26). Nothing is needed from contributors; work resumes once it is answered. |
|
No description provided. |
|
PR #9370 @ 7e70322: 10 failed check(s) == crucible (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (cancelled) -- infra == publish-history (cancelled) -- infra == rosetta-audit (failure) -- real == shard ${{ matrix.shard }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
CI shepherd: |
|
No description provided. |
|
No description provided. |
Part of #8863. Implements #9337.
Checklist: done [c:925158e3]
What changed
PHP rules in
languages/php.pynow count only their own construct. Pinned crucible (language-crucible, 1721 PHP functions), weaker of recall / precision, before -> after:&&/||excluded); by-reference&$x,as &$v,int|stringunion types and<<<heredocs no longer count;~$xkept.PDO::method(call (the keyword-rosetta plant) counts,PDO::ATTR_*does not; call-form list of the oracle's file/stream/DB functions plusnew PDO/new mysqli;header,setcookie, baresocket,$_GET-style reads andPDOtype hints no longer count.echo/printstatements and dump functions as calls;->dump(),$print,Foo::print()anddl|dd|dtin regex strings no longer count.$timevariables excluded.#[must not follow a quote, operand,#or/and must start with a name, so'#[0-9]{2}#'inside a regex string no longer counts (checked on the engine's stream: line-start and in-parameter attributes both count).Goldens re-blessed with
golden-lock.sh(both legs). Diff is PHP signal files only (bitwise, decorators, io, print, time) plus the repo-wide archetype rollups that follow from them. Baseline and validity charts regenerated.test_php_strict.py: thedate_diffnegative case became a method-call negative, and$_GETis no longer an io hit (see sibling gaps).Class / Sibling gaps
#[\SensitiveParameter]on a PARAMETER, which the engine counted and the PHP oracle ignored. A parameter attribute is an attribute on the declaration it precedes (the C# oracle already counts it), so the oracle was wrong:family_oracle_specs_b.pynow counts it (closure parameters in the body still excluded; test intest_php_family_validity_8863.py). Re-measured on the wordpress scan: 78 fire vs 76 oracle, precision 0.97, recall 1.00.$_GET,$_POST) orheader()/setcookie()io? The oracle says no; the rule now agrees.print_r($x, true)/var_export($x, true)return strings but still count (no argument parsing in a bounded regex);echoinside a heredoc template counts.#[attributes survive the prism stream (verified); no prism change needed.Not in this PR: other languages, oracle changes.
Family-validity checklist
tests/test_php_family_validity_8863.pyFacts checked
family_oracle_sweep.py --write;family_red_cells.py --lang phplists only the hatched decorators cell.ruff format --check,audit_check.py(all clear),pr_gates.py --fast(9/9) and--ratchets(9/9) pass.ruff checkreports S101 on the new test, same as the C# template (baselined).golden-lock.sh, regenerated the family-validity SVGs);pr_gates --ratchets9/9 after it.family_rosetta_consistency.py --live: PHP io now agrees with the manifest (the old 3-of-2 gap wasPDO::query(, now counted). CPU: the five PHP rules over 600 wordpress files take 0.1-0.5 s each; 25k-char adversarial runs under 5 ms.pr_gates --fast9/9 and--ratchets9/9 after it. The pinned sweep also moved one unrelated rust baseline row from tokio to the pinned crucible (tool output, not hand-edited).Remaining slices
none: every PHP red cell is 0.8 or better (pinned cells on the crucible, decorators on wordpress).
Lessons for agents
scope_check.pydiffs against a freshly fetched origin/main: a sibling merge in between shows up as "outside --expect";git fetchand merge first, then re-bless.galaxyscope <data/wordpress> --db-only --file-speed --splicing-speed, thenfamily_oracle.py DB --src DIR --lang X --corpus NAME --update-baseline); the cause can be the oracle (a parameter attribute), not the rule.$_GETas io,date_diffas negative) lives intests/extraction/languages/test_<lang>_strict.py; run it after any rule change.🤖 Generated with Claude Code