Files
hakorune/docs/private/roadmap/phases/phase-20.29/README.md

40 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase20.29 — Rust Freeze Baseline + SelfHost Loop
Purpose
- Freeze the Rust layer to thin I/O + entry glue, and move daytoday development into lang (Core/Builder). Establish a minimal, repeatable “Gostyle” selfhost loop: Hakorune compiles Hakorune.
Inscope
- Runner defaults (dev/quick) prefer GateC(JSON→Core). NyVM wrapper remains optin.
- Rust layer freeze policy documented and enforced (allow: glue/ENV/bugfix; deny: new semantics/ops).
- Selfhost bootstrap: lang compiler emits JSON v0; GateC executes; loop stable under canaries.
- SSOT exposure: generate/consume call SSOT from lang; Rust consumes outputs (no handcopy).
Outofscope
- Full stdlib or wide plugin semantics; focus on the minimal loop and boundaries.
- Performance work beyond correctness/FailFast.
Deliverables
- Green quick/integration-core with dev default = Gate-C(Core).
- Freeze policy doc + toggles noted in env guide.
- Self-host “compile tiny → JSON → Core → result” canaries always green.
- SSOT flow: lang → generated table → Rust (read-only use).
References
- docs/development/architecture/rust-freeze-policy.md
- docs/development/architecture/ssot-lang-gen.md
## Progress — 2025-10-31
- Gate-C(Core) is the default path for quick/dev; NYVM wrapper remains opt-in.
- Lang-side Core normalizer now rewrites all blocks/functions (String length/indexOf/lastIndexOf/substring/charAt/replace) and inserts missing `entry` ids.
- MIR(JSON) reader honours first block id when `entry` is omitted, fixing Gate-C “unterminated block” failures.
- Minimal Hako emitter provides `emit_if_eq_i64`/`emit_if_ne_i64`; canary (`hako_min_emitter_if_eq_vm.sh`) passes via Gate-C(Core).
- Core canaries extended (`core_lang_normalize_string_indexof_from_vm.sh`, `core_lang_normalize_string_lastindexof_vm.sh`) and documented in tools/smokes/v2/README.md.
- Hako emitter canaries now run on curated JSON fixtures (`if_ne`, `phi_diamond`) with an SSA validator to guard definition/usage consistency.
## Remaining Work
- Normalize optional/bang flags for String indexOf/find family; extend canaries for failure semantics.
- Harden `_read_args_digits` and related JSON scanners against whitespace/empty-list quirks (consider tokenizer helper).
- Consolidate Gate-C env helpers (some inline env writes remain in `pipe_io.rs`); ensure plugin=OFF paths stay minimal.
- Add additional Hako emitter canaries (if-ne + phi diamond) and JSON SSA validators.
- Re-run quick/integration-core after helper consolidation and promote canaries once stable.