Skip to content

Self-host M3: check-m3-allowlist-snapshot.php drift guard (#1768 SSOT) #1905

@PurHur

Description

@PurHur

Problem

#1768 tracks M3 compile-driver symbol batches in lib/JIT.php (isM3CompileDriverRealLoweringName(), isM3CompileDriverSpineDenyName()), but the allowlist is hand-edited with no CI drift guard.

#1872 ✅ solved the same problem for M2 spine 589/593 counts via script/bootstrap-spine-count.php + check-selfhost-spine-count-sync.php. M3 batches need an analogous snapshot so PRs don’t silently shrink or duplicate allowlist entries.

Goal

  1. script/check-m3-allowlist-snapshot.php — parse lib/JIT.php allowlist/denylist names, compare to committed script/m3-allowlist-snapshot.txt (or JSON)
  2. M3_ALLOWLIST_SYNC_GATE=1 in ci-fast inventory checks (default on; opt-out =0 for bulk symbol PRs)
  3. Self-host M3: compile-driver real lowering symbol batch tracker #1768 issue body table updated by regenerating snapshot in each batch PR

Implementation hints

Piece Path Notes
Generator script/bootstrap-m3-allowlist-snapshot.php rg or PHP parse of isM3CompileDriverRealLoweringName array bodies
Checker script/check-m3-allowlist-snapshot.php Exit 1 with diff hint: run generator
Snapshot script/m3-allowlist-snapshot.txt One name per line, sorted
ci-common script/ci-common.sh Wire next to check-selfhost-spine-count-sync.php
Test test/unit/M3AllowlistSnapshotTest.php Assert checker script exists
php script/bootstrap-m3-allowlist-snapshot.php --write
./script/check-m3-allowlist-snapshot.php
M3_ALLOWLIST_SYNC_GATE=0 ./script/ci-fast.sh   # bulk PR escape hatch

Acceptance criteria

Verification (local / Docker only)

./script/ci-fast.sh --filter M3Allowlist
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  ./script/ci-fast.sh --filter M3Allowlist

No GitHub Actions.

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions