Bootstrap Contracts
HTML reading page generated from the source Markdown document.
Reading mode
This page is the static HTML reader for bootstrap_contracts.md. Internal Markdown links are rewritten to HTML when a matching reading page exists.
Bootstrap Contracts
This page is the index for the bootstrap-native contract surface.
Overview
Bootstrap contracts are split across artifacts, readable specs, snapshots, and gates so that a contributor can understand both the human intent and the exact machine-checked surface.
| Contract area | Primary reference |
|---|---|
| Seed trust chain | docs/bootstrap_seed.md |
| Native IR format | docs/bootstrap_native_ir.md |
| Snapshot evidence | tests/bootstrap_native/README.md |
| Full local gate | make bootstrap-native-contract |
| Fast local gate | make bootstrap-native-fast-contract |
- Seed trust chain:
docs/bootstrap_seed.md - Native IR contract:
docs/bootstrap_native_ir.md - Bootstrap-native snapshots:
tests/bootstrap_native/README.md - Local full contract target:
make bootstrap-native-contract - Local fast contract target:
make bootstrap-native-fast-contract - CI job:
bootstrap-native-contract
The bootstrap contract is intentionally split across readable docs, checked seed artifacts, deterministic snapshots, and visible CI steps. A change that affects the seed parser, generated shell backend, command behavior, or canonical compiler entry must carry the matching snapshots in the same change.
Responsibilities
- Keep bootstrap trust boundaries obvious during reviews.
- Point contributors to the right contract document for each bootstrap layer.
- Tie source edits to the exact gates that defend them.
Invariants
- Seed, IR, generated shell behavior, and snapshots must move together.
- A change to the bootstrap surface without updated evidence is considered incomplete.
- The fast local gate may optimize execution time, but not reduce the contract coverage it claims to represent.
Pipeline
The bootstrap-native path connects documentation to executable verification:
- The seed and native IR specs describe the accepted surface.
- Bootstrap sources and generated artifacts produce deterministic outputs.
- Snapshot suites pin those outputs.
- CI and local make targets enforce the contract continuously.
Driver
Bootstrap is exposed through the driver surface as much as through compiler internals, so driver behavior changes must be considered part of this contract.
Data Flow
- Review starts from the seed and IR docs.
- Source edits update seed, stage, or emitted shell behavior.
- Snapshots and contract targets confirm that the visible bootstrap output still matches the documented rules.
Examples
make bootstrap-native-fast-contract
make bootstrap-native-contract
tools/bootstrap_native_fixture_matrix.sh
These commands are useful in combination: the fast target gives a quick signal, the full contract target verifies the whole native chain, and the fixture matrix shows whether the touched bootstrap form is already covered by a snapshot.
PR Checklist
Before publishing a bootstrap-native change:
- Run
make bootstrap-native-contract. - Run
make docs-paths-check. - Run
make bootstrap-contracts-index-check. - Run
tools/bootstrap_native_fixture_matrix.shand confirm the touched surface is covered by snapshots. - If
toolchain/seed/vittec0.seedchanged, confirmtoolchain/seed/manifest.txtchanged with the new SHA-256. - If generated shell behavior changed, confirm the relevant
shell.*.mustsnapshots undertests/bootstrap_native/changed with it. - If parser or diagnostic behavior changed, confirm at least one
.ir.mustor.err.mustsnapshot changed with it.