Skip to content

Self-host M3: PHPTypes native unit probe (lib/PHPTypes subset) #2430

Description

@PurHur

Problem

M3 unit probes cover Compiler (#2216), JIT (#2332), VM (#2354), and CFG parse (#2409) — but not the PHPTypes surface used on every compile path (\PHPTypes\Type, union/intersection constants, JIT external class seeds).

When native emit fails inside type coercion or Type:: constants, triage dumps into generic #2301 / #2323 buckets instead of a reproducible micro-probe.

Goal

  1. test/selfhost/types_unit_probe/main.php — smallest require_once chain into vendor/ircmaxell/php-types / patched PHPTypes used by lib/Compiler.php
  2. script/bootstrap-selfhost-types-unit-probe.sh — native AOT link + run; stdout contains types_unit_probe bundle OK
  3. make bootstrap-selfhost-types-unit-probe + docs/bootstrap-selfhost.md M3 probes table row
  4. Follow-ups: CI opt-in gate (mirror CI: BOOTSTRAP_PARSER_UNIT_PROBE_GATE opt-in in ci-local after #2409 #2417), north-star3-verify step (after Testing: north-star3-verify — add parser unit probe step after #2409 #2418), default-on flip

Implementation hints

Piece Path Notes
Probe test/selfhost/types_unit_probe/ Exercise Type::TYPE_* constants + one union/intersection parse path
Bundle Reuse compiler_minimal pattern Do not pull full 657-file spine
Patches patches/php-types-*.patch Same as host script/apply-patches.sh
M5 #1416 Prelink vendor — probe should not assume vendor/ at cold boot long-term

Verification (local / Docker only)

make bootstrap-selfhost-types-unit-probe
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && make bootstrap-selfhost-types-unit-probe'

No GitHub Actions.

Acceptance criteria

Dependencies

Links

Activity

  1. added a commit that references this issue on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions