Skip to content

ci: the spec guard fails only when an example joins the list - #104

Merged
heyJordanParker merged 2 commits into
masterfrom
ci/spec-list-only
Oct 12, 2026
Merged

heyJordanParker merged 2 commits into
masterfrom
ci/spec-list-only

Conversation

@heyJordanParker

Copy link
Copy Markdown
Owner

Problem

Each line of sharp/baseline/spec carries a count of "not supported yet" messages. A PR fails when a listed example's count rises. That count blocks real progress:

  • The generics PR teaches the parser syntax it used to reject. 8 examples go from parse errors only (a count of 0) to one named refusal (a count of 1 to 5). A better checker reads as a regression.
  • Mago master alone raises 6 counts against the pin the list was written at, so every re-pin hits the same wall.

Solution

The list holds the failing examples and nothing else, the way test262's expected-failure lists in V8 and SpiderMonkey track which tests fail, not how. A PR fails when an example joins the list, as it does today. It no longer fails when a listed example's messages change.

Master's checker judges each PR, and it refuses a list line without exactly 3 fields, so dropping the column takes two PRs. This is the first one. It changes sharp/bin/spec only:

  • --base stops comparing counts. sharp/bin/spec with no flag compares the listed ids and sections, not the counts.
  • A list line reads with or without its third field, so the next PR can drop the column under this checker.
  • A Markdown file outside the GUARDED folders, other than README.md and docs/spec.md, counts as a file that can't change a result, so it may change beside a guarded file. Markdown never runs. The next PR changes the list's docs beside sharp/bin/spec.

The next PR drops the third field from the list, writes and reads exactly two fields, and updates docs/architecture/spec-examples.md, docs/how-we-work.md and sharp/README.md.

What the guard gives up

The guard no longer notices when an example already on the list gets worse. mago-sharp's and php-sharp's own tests cover the rules those examples use.

Files

sharp/
└── bin/spec   <- compares listed ids and sections, reads 2 or 3 fields, lets Markdown change beside a guarded file

Each line of sharp/baseline/spec carries a count of "not supported yet"
messages, and a PR fails when a listed example's count rises. A better
checker reads as a regression: the generics PR turns 8 examples' parse
errors into one named refusal each, and Mago master raises 6 counts
against the current pin, so every re-pin fails the guard. Dropping the
count column takes two PRs, because master's checker judges each PR and
refuses a list line without its third field.

The checker now compares which examples fail and nothing else, like
test262's expected-failure lists in V8 and SpiderMonkey. It reads a list
line with or without the count, so the next PR can drop the column.
Markdown outside the guarded folders, other than the two example
documents, never runs, so it may now change beside a guarded file. That
lets the next PR change the list's docs beside the checker.

sharp/
└── bin/spec*   <- compares listed ids and sections, reads 2 or 3 fields, lets Markdown change beside a guarded file
@heyJordanParker
heyJordanParker merged commit 9342ec2 into master Oct 12, 2026
11 checks passed
@heyJordanParker
heyJordanParker deleted the ci/spec-list-only branch October 12, 2026 05:41
heyJordanParker added a commit that referenced this pull request Oct 12, 2026
… to Mago c314bab

Problem: PR #102 must be up to date with master. Master gained #103, which keeps a
PHP# change to a static List, Map or Set. It also gained #104 and #105, which
make the spec guard fail only when an example joins sharp/baseline/spec, and
make the list name only the examples that fail. Mago #152 merged its own master
and moved to c314bab.

Solution: merge master. Git merged every file on its own, the generated
Zend/zend_vm_execute.h included. zend_vm_gen.php regenerates the same VM files
from the merged zend_vm_def.h. #103 marks ZEND_FETCH_STATIC_PROP_R with
ZEND_SHARP_OPERATOR in extended_value, and this branch's
ZEND_SHARP_VERIFY_TYPE_ARGS keeps its own flag on its own opcode.

The pin moves to Mago c314bab. Only SHARP_MAGO_COMMIT changes in
ext/sharp/sharp_unit.h, and SHARP_UNIT_ABI stays the same. method-declarations,
generic-method-inference, self-on-type-parameters and index-rules now pass and
leave sharp/baseline/spec. sharp/bin/test passes 199 of 199 tests without
opcache, in both file cache modes, twice in one process, under each of the 16
optimizer passes alone, and under the tracing and function JITs. The census
and sharp/bin/test --spec pass.

.
├── Zend/                       master's static receiver beside this branch's checks
├── ext/opcache/jit/            master's inline static object under the JIT
├── ext/sharp/
│   ├── php_sharp.h, sharp.c    master's sharp_collection_of_static_property
│   └── sharp_unit.h            pinned to Mago c314bab
├── sharp/baseline/spec         four examples that now pass leave the list
└── sharp/bin/spec, docs/       master's guard and its documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant