Files
hakorune/docs/private/roadmap/phases/phase-20.9/PLAN.md

42 lines
1.7 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.

# Phase 20.9 Plan — Rustless Kernel (Script→C ABI)
Milestones
1) CABI Surface (readonly first)
- Add/confirm header declarations:
- `hako_gc_stats() -> char*` (caller frees with free())
- `hako_gc_roots_snapshot() -> int64_t`
- (Future/gated) `hako_gc_collect/start/stop -> void`
- Notes: Prototypes exist for GC; extend for console/time/string as needed.
2) LLVM Lowering (llvmlite)
- Lower `env.gc.stats/0``hako_gc_stats` (bridge i8* → handle via boxer)
- Lower `env.gc.roots_snapshot/0``hako_gc_roots_snapshot`
- Keep control hooks for later (gated, noop/FailFast).
3) GcBox Policy (Hakorune)
- Wrap readonly calls; add lightweight cadence/log formatting (dev gate).
- Provide sample `policy_tick()` usage in docs.
4) Canary Smokes (gated)
- LLVM canaries (readonly): `SMOKES_GC_ENV_LLVM=1`
- stats expects JSON with keys, roots_snapshot expects integer
- VM parity exists via adapter; LLVM confirms script→C ABI path.
5) Diagnostics Parity
- Maintain short lines for NOT_FOUND/UNSUPPORTED/VALIDATION on both VM and LLVM.
- Ensure canaries fail with short lines when symbols missing (gate remains OFF by default).
Acceptance Checklist
- [x] stats/roots_snapshot canaries PASS under LLVM with provided symbols
- [x] GcBox.stats()/roots_snapshot() return same shapes across VM/LLVM
- [x] collect/start/stop are defined, gated, and do not silently succeed
- [x] Docs updated (bridge plan/roadmap/usage) and gates documented
Rollback
- Remove/disable C shims; LLVM canaries remain gated OFF; VM path unaffected.
Links
- ./CHECKLIST.md, ./README.md
- ../../../development/architecture/abi/hakorune-c-abi-bridge.md
- ../../../development/architecture/gc/llvm-extern-plan.md