Skip to content

Self-host M5: native vendor bundle rebuild audit (php-cfg, php-types, php-llvm) #8718

Description

@PurHur

Category

bootstrap | php-in-php

Problem

Committed prelinked/bootstrap-vendor/*.o sidecars keep M5 fast path green, but there is no automated audit that native objects can be rebuilt from source under prelinked/bootstrap-vendor/sources/ when vendor/ is absent and BOOTSTRAP_M5_VENDOR_ALLOW_ZEND=0. Stale or hand-patched blobs can drift from the PHP sources they claim to represent.

php-src reference: N/A (bootstrap). Reference packages: php-cfg, php-types, php-llvm vendored sources in-repo.

Repro

# Today: manual / ad-hoc only
BOOTSTRAP_M5_VENDOR_ALLOW_ZEND=0 ./script/bootstrap-vendor-native-rebuild-audit.sh 2>/dev/null || echo "script missing"
ls -la prelinked/bootstrap-vendor/*.o

Observed (2026-06-15):

  • Sidecars exist and link in fast M5 gates
  • No CI presenter fails when native rebuild from sources/ diverges from committed .o hashes

Scope

  • Add script/bootstrap-vendor-native-rebuild-audit.sh (or extend script/north-star5-verify.sh --fast opt-in step)
  • Document per-package object_ok / hash diff output
  • docs/bootstrap-selfhost.md — when to run audit (monthly / before vendor-prelink PRs)
  • prelinked/bootstrap-vendor/sources/ — no Zend compile fallback in audit path

Done when

  • Audit script rebuilds each vendor bundle natively (no vendor/, no Zend gen-0) and compares object hashes or link smoke output
  • Script exits non-zero on drift with actionable package name
  • Wired into make north-star5-verify-fast as opt-in gate (BOOTSTRAP_VENDOR_REBUILD_AUDIT=1) or documented monthly maintainer step
  • Issue template section in script output for filing drift bugs

Related

Activity

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

    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions