Skip to content

ci: sharp/baseline/spec lists only the examples that fail - #105

Merged
heyJordanParker merged 1 commit into
masterfrom
ci/spec-list-two-fields
Oct 12, 2026
Merged

heyJordanParker merged 1 commit into
masterfrom
ci/spec-list-two-fields

Conversation

@heyJordanParker

Copy link
Copy Markdown
Owner

Problem

#104 stopped the spec guard from comparing "not supported yet" counts. The count is still there, though. Each line of sharp/baseline/spec still ends in it, sharp/bin/spec still collects and writes it, and the docs still say a PR fails when a count rises. #104 left the checker reading two fields or three only as a bridge, because master's checker judges each PR and the old one refused a line without its count.

Solution

The list is now one <section>\t<id> line per failing example. Nothing of the three-field format remains:

  • sharp/bin/spec writes and reads exactly two fields. The $refusals collection and check_compile's &$refusals parameter are deleted. check() again compares the list's text exactly, so an unsorted or duplicated list fails as before.
  • sharp/baseline/spec was written by the checker's own cp command. It lists the same 96 examples. Only struct-parse and struct-parse-object swap order under natural sort once the count is gone.
  • The docs give the new format and record why the list keeps no count. They also say a Markdown file outside the guarded folders may change beside a guarded file.

The list records which examples fail, not how, as test262's expected-failure lists do in V8 and SpiderMonkey. A checker that turns parse errors into a named refusal, or a Mago re-pin that does the same, no longer reads as a regression.

REFUSAL stays in sharp/bin/spec for one other rule: a "not supported yet" error never satisfies a compile error line.

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                         <- writes and reads `<section>\t<id>`, collects no refusal count
└── baseline/spec                    <- the 96 failing examples, two fields each
docs/
├── architecture/spec-examples.md    <- the list's format, why it records no count, four CI cases
└── how-we-work.md                   <- a listed example may fail in a new way, docs may change beside guarded files
sharp/README.md                      <- the list's format and the guard without the count

Each line of sharp/baseline/spec still ends in a count of "not supported
yet" messages that nothing compares since the guard stopped reading it,
and the checker still collects and writes that count. The docs still say
a PR fails when a count rises.

The list is now one `<section>\t<id>` line per failing example, and the
checker writes and reads exactly those two fields. The refusal count is
gone from the checker, the list and the docs. The docs record why: the
list tracks which examples fail, not how, like test262's expected-failure
lists, and a Markdown file outside the guarded folders may change beside
a guarded file because it never runs.

sharp/
├── bin/spec*                        <- writes and reads `<section>\t<id>`, collects no refusal count
└── baseline/spec*                   <- the 96 failing examples, two fields each
docs/
├── architecture/spec-examples.md*   <- the list's format, why it records no count, four CI cases
└── how-we-work.md*                  <- a listed example may fail in a new way, docs may change beside guarded files
sharp/README.md*                     <- the list's format and the guard without the count
@heyJordanParker
heyJordanParker merged commit fd6bbaa into master Oct 12, 2026
12 checks passed
@heyJordanParker
heyJordanParker deleted the ci/spec-list-two-fields branch October 12, 2026 06:07
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
heyJordanParker added a commit that referenced this pull request Oct 13, 2026
Master brings #120: Mago lives in `sharp/mago/`, and php-sharp pins no
Mago commit. It also brings #105's failing spec examples as one empty
file per example under `sharp/baseline/spec/`.

Two files conflicted:
- `ext/sharp/sharp_unit.h` takes master's side, with no Mago commit. The
  next merge, of mago-sharp `feat/slice-generics` into `sharp/mago/`,
  writes the header its bridge generates.
- The slice's one-file list `sharp/baseline/spec` is removed, as
  docs/architecture/spec-examples.md says. The next merge lists the
  examples the slice fixes and fails in the folder.

ext/sharp/sharp_unit.h    master's header, which names no Mago commit
sharp/baseline/spec       the one-file list removed for the folder
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