Skip to content

Bootstrap from the pinned release instead of the Zend cold seed - #112

Merged
blacktrs merged 2 commits into
mainfrom
stage0
Oct 7, 2026
Merged

blacktrs merged 2 commits into
mainfrom
stage0

Conversation

@blacktrs

@blacktrs blacktrs commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Why

The Zend cold seed kept src/ tied to what php can execute, so the compiler could not use its own superset features (Manticore\Ds, #[TypeDef], generics) in its own source. This bootstraps from a pinned previous release (stage0), the way Go and Rust do, and makes Zend opt-in.

What changes

  • BOOTSTRAP_VERSION (0.13.0, the Ds release): the one pin that bin/build, gate.sh, CI, release, the Dockerfiles and install.sh read.
  • tools/fetch_bootstrap.sh <dest>: downloads the pinned tarball for the host (glibc/musl/macOS × arm64/amd64), checks it against SHA256SUMS, and confirms manticore version runs. Uses curl or wget, no php.
  • bin/build: with no compiler, it fetches the pin, builds, then rebuilds once with the result. A bootstrap-gap error names the installed version and the pin.
  • gate.sh: tries cache → published main → pin. Zend only runs with MC_ZEND_SEED=1; otherwise the run fails with an explicit "bootstrap gap" result.
  • CI: new bootstrap-from-pin job (linux arm64, no suite) builds from the pin alone on every push. This job is what enforces the rule.
  • Release: every platform builds from the pin only; the macOS job needs no php.
  • Docs: the AGENTS.md section "Bootstrap: the pinned release" states the two-step rule — ship the feature in release N, raise the pin to N, then use it in src/.

Verification

  • Fresh worktree on macOS with php stubbed to fail: bin/build built two generations from 0.13.0 and never called php. AOT -k array_ passed 192/0.
  • An undefined call injected into src/ gives the bootstrap-gap message.
  • fetch_bootstrap.sh runs in the glibc and musl containers.
  • CI on this PR covers the Linux rows and the new job.

Not in this PR

  • Removing the Zend seed.
  • Rewriting src/ onto the new containers.

Fixes #105

…Zend cold seed

bin/build, gate.sh, CI, the release workflow, the Dockerfiles and install.sh
all start from the release named in BOOTSTRAP_VERSION (fetched and checksummed
by tools/fetch_bootstrap.sh, no php). Zend is opt-in (bin/build --seed,
MC_ZEND_SEED=1). A new bootstrap-from-pin CI job builds the tree from the pin
alone, so a merge that needs a feature newer than the pin fails with a named
bootstrap error. AGENTS.md documents the two-step rule: release the feature,
raise the pin, then use it in src/.

Fixes #105
…quired checks, and a doc-only PR skipped by paths-ignore would never report them
blacktrs added a commit that referenced this pull request Oct 7, 2026
Three shipped designs had no design note: per-program-point ownership
(OwnershipFlow, #15/#104), the native fixed-width buffer runtime behind
SplFixedArray and Manticore\Ds (#108), and the pinned-release bootstrap
(#112/#114). Each is derived from the code it cites; AGENTS.md links the
stage0 note.
@blacktrs
blacktrs added this pull request to stack #117 October 7, 2026 10:58
@blacktrs
blacktrs merged commit 9b5e1ad into main Oct 7, 2026
8 checks passed
@blacktrs
blacktrs deleted the stage0 branch October 7, 2026 12:01
blacktrs added a commit that referenced this pull request Oct 7, 2026
…114)

* Remove the Zend cold seed; docs follow the pinned-release bootstrap

The compiler bootstraps from BOOTSTRAP_VERSION (#112), so the seed has no
consumer left. Removed: bin/compile, tools/compile_files_mir.php, bin/build
--seed/--auto-seed, gate.sh MC_ZEND_SEED, install.sh's Zend fallback, and the
dead tools composer_data_smoke.sh, typecheck_scan.sh, split_ll.php,
docker/iopoll/diag.sh, docker/symfony_probe.sh. selfhost_stability.sh rebuilds
through the manifest path instead of Zend; composer.json drops the php
requirement (the installer downloads the release or builds from the pin).

Docs: every guide, README and design note audited against the tree — seed
instructions removed or marked historical, ABI references point at
MemoryAbi::VERSION (18), memory-abi.md gains the 64-byte descriptor (json_fn),
the v14 BIGINT box and the v18 native buffer block, pass tables gain
NarrowScalarGuards, ResolveMethodFcc, ResolveOverloads, SpillFreshBases and
OwnershipFlow.

* docs/design: ownership flow, native buffers and stage0 bootstrap notes

Three shipped designs had no design note: per-program-point ownership
(OwnershipFlow, #15/#104), the native fixed-width buffer runtime behind
SplFixedArray and Manticore\Ds (#108), and the pinned-release bootstrap
(#112/#114). Each is derived from the code it cites; AGENTS.md links the
stage0 note.
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.

Bootstrap from a pinned release instead of the Zend cold seed, so the compiler can use its own superset features

1 participant