Bootstrap Replay Handoff — Apr 9, 2026
Situation
The bootstrap chain is broken. The binary at HEAD cannot compile the source at HEAD. The break was introduced when compiler source features were added without rebuilding the binary and verifying fixpoint.
Last Verified Fixpoint
Commit 4a088d43 — “feat: complete UFCS unification for IntMap, Range, Arena, Pool”
- Binary version: 5.12.15-alpha
- Self-compiles cleanly: 0 errors, ~600K lines IR
- Also verified at
2b013e20and102fedd1(same binary, later source)
Root Cause
At commit 4597aa43 (“Phase TH Tiers 1+3”), HashMap<String, Int> type annotations were added to struct fields in typecheck_util.qz. The binary at that commit (5.12.15) could handle this fine. But at some point in the dogfooding sprint that followed, the binary was rebuilt from source that used features the binary didn’t support, breaking the chain. Every subsequent rebuild propagated the broken state.
The Break Point
Between 4a088d43 (works) and 738d2610 (broken — 9 errors about missing functions). Commits that touched the binary in this range:
738d2610— Vec mutation intrinsics81747947— reverse, sort, unique, flatten4df609b9— enumerate, zip, partition7563bf6b— shovel operator0fb2d700— Lexer mode stack
Recovery Plan: Incremental Replay
Strategy
Start from the last verified fixpoint (4a088d43). Replay commits one at a time. At each binary-changing commit, rebuild and verify fixpoint. If a commit breaks fixpoint, fix the source before proceeding.
Steps
- Create a replay branch from
4a088d43 - Cherry-pick commits from
4a088d43..HEADone at a time (or in batches for non-compiler commits like spec files) - For each commit that touches
self-hosted/: a. Cherry-pick or apply the commit b. Runquake guard(backup → build → fixpoint → stamp) c. If fixpoint passes, commit with binary + stamp d. If fixpoint fails, debug and fix before proceeding - For commits that only touch spec/, docs/, std/ (non-compiler):
- These can be cherry-picked in bulk without rebuilding
- Verify at the end that the replayed branch matches HEAD’s source
Optimization: Batch Non-Compiler Commits
Many of the ~100 commits are dogfooding spec file conversions (triple-quoted strings). These don’t touch the compiler and can be batched:
- ~60 spec dogfooding commits → batch into 1-2 commits
- ~10 documentation commits → batch
- ~30 actual compiler feature commits → replay individually
Key Commits to Watch
These are the binary-changing commits between the fixpoint and HEAD. Each one needs careful rebuild:
738d2610— Vec mutation intrinsics (capacity, truncate, dedup, retain, extend)81747947— reverse, sort, unique, flatten4df609b9— enumerate, zip, partition7563bf6b— shovel operator0fb2d700— Lexer mode stack for string interpolation87c0eb01— Match arm enhancementsc1031c59— Length-based pre-dispatch64118f8f— Dogfood 700+ arm string match31403f34— “Commit working compiler binary”aef2610b— Open UFCS0c73a2fc— Self type aliasdc3d196a— Trait default methods- Various dogfooding/trait/UFCS commits
- Memory optimization Phase 1+2
Prevention: Quake Guard
A quake guard task has been added to Quakefile.qz:
- Backs up current binary
- Builds compiler
- Verifies fixpoint (gen1 == gen2)
- Writes
.fixpointstamp file - Stages binary + stamp for commit
A git pre-commit hook at .git/hooks/pre-commit enforces:
- Compiler source changes REQUIRE binary + .fixpoint stamp staged
- Stamp must match current source hash
- Blocks commit if any check fails
Git Bundle Backup
Full repo backup at: /Users/mathisto/projects/quartz-full-backup-20260409.bundle
To restore: git clone quartz-full-backup-20260409.bundle quartz-restored
Working Binaries Available
self-hosted/bin/quartz— broken (at HEAD)self-hosted/bin/backups/quartz-prev— from Phase 1 memory opt era (broken for self-compile)/tmp/quartz-4a08— from4a088d43(WORKING fixpoint, 5.12.15)- Various
self-hosted/bin/quartz-pre-*backups
Estimated Time
The replay is mechanical:
- ~30 compiler commits need individual rebuild+fixpoint (~5 min each = ~2.5 hours)
- ~70 non-compiler commits can be batched (~10 min total)
- Debug time for broken fixpoints: unknown, but features already work in the source
- Total estimate: 3-4 hours
IMPORTANT
- The git pre-commit hook and
quake guardtask are in the CURRENT working tree - They need to be carried forward during the replay
- After replay reaches HEAD, the Quakefile.qz changes should be the final commit