Files
hakorune/docs/private/roadmap/phases/phase-20.28

Phase20.28 — SelfHost Bootstrap (Core + Builder)

Purpose

  • Move from “Core bringup + ring0(Array minimal)” to a minimal, repeatable selfhost bootstrap loop: lang compiler emits MIR(JSON v0) that the VM Core executes, under a stable set of rules (effects/order/normalize).

Inscope (what we complete in this phase)

  • Core mir_call coverage (positive/negative) for day1 collections and strings; stable tags for unsupported.
  • Builder/Optimizer: effect hints and singlepass emit order guarantees for mutating calls (set/push/pop/delete, etc.).
  • Normalize policy (SSOT): When plugins=OFF, do not force Method→Extern; honor Method/Constructor so ring0/builtin can operate. When plugins=ON, canonicalize to Extern as per SSOT.
  • GateC parity: file/pipe × plugins ON/OFF — quiet output and rc mapping symmetry.
  • Minimal bootstrap profile (env/docs): the exact toggles for deterministic selfhost runs.

Outofscope

  • Full language coverage or full std library. We target the smallest viable loop and expand next.
  • Performance tuning beyond basic correctness.

Why split now

  • Phase20.27 finalized Core routing and added ring0(Array) minimal semantics. This phase focuses on closing the JSON→Core loop endtoend for selfhost and stabilizing builder effects/order + normalize policy to avoid drift.

Deliverables

  • Green canaries for Core mir_call (positive/negative), GateC parity, and a small selfhost bootstrap smoke.
  • Docs: normalize policy, effects/order guarantees, bootstrap profile.