From 2db737cc96f2814c1eb20b170c3ac5a05d157a55 Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 18 May 2026 16:09:04 +0200 Subject: [PATCH] =?UTF-8?q?roadmap:=20close=20emit-ir-staticlib=20([=20]->?= =?UTF-8?q?[x])=20=E2=80=94=20M1=20fieldtest=20follow-up=20#2=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/roadmap.md | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index de8d0dc..3645f86 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -189,22 +189,34 @@ work progresses. findings [friction] + [spec_gap]#1; `docs/journals/2026-05-18-iter-form-a-scalar-param-mode-carveout.md`. -- [ ] **\[feature\]** `ail emit-ir --emit=staticlib` — restore the +- [x] **\[feature\]** `ail emit-ir --emit=staticlib` — restore the Decision-5 IR-readability affordance for kernels (M1 fieldtest - spec_gap). DESIGN.md Decision 5 makes "the compiler emits LLVM IR - as text so the LLM can read what it generated" a load-bearing - author affordance, but `ail emit-ir` has no `--emit=staticlib` - (only `ail build` does), and `emit-ir` on a `main`-free kernel - hits the executable-path `MissingEntryMain` rejection — so the - author cannot read the generated `@` forwarder for an - exported kernel, the exact thing M1 introduced. Resolution chosen - on the merits: **add** `--emit=staticlib` to `ail emit-ir` - (symmetric with `ail build`, reusing the `Target::StaticLib` - path) — NOT narrow DESIGN.md (narrowing a load-bearing affordance - to dodge a gap is the wrong direction). Scoped feature, no design - fork. P1. + spec_gap#2) — CLOSED 2026-05-18. `ail emit-ir` had no + `--emit=staticlib` (only `ail build` did) and on a `main`-free + kernel hit the executable-path `MissingEntryMain` rejection — an + author could not read the generated `@` forwarder for an + exported kernel. Resolution **added** (DESIGN.md *widened*, never + narrowed): a one-line symmetric codegen convenience + `lower_workspace_staticlib(ws)` routing through the M1-audited + unchanged `Target::StaticLib` path, an `emit` clap field on + `Cmd::EmitIr` symmetric with `Cmd::Build`'s, a zero-export guard + byte-identical to `build_staticlib`'s; DESIGN.md §"Embedding ABI + (M1)" affordance sentence + a CLI-synopsis correction also + discharging a pre-existing M1 `ail build --emit=staticlib` + omission. No new doc pin (E2E pins behaviour; architect's + milestone-close DESIGN.md read catches stale prose). Boss-verified: + 3 new E2E 3/0 (incl. functional CLI spot-check — `@backtest_step` + external forwarder readable, no `@main`), `embed_staticlib_cli` + 2/0 (build-side untouched), `docs_honesty_pin` 5/0, `ail` 186/0, + workspace 623→626 (+3), zero out-of-scope diff, no fixture minted. + Scoped feature — no audit/fieldtest gate (E2E is the coverage; + reuses the M1-audited codegen path, no invariant/surface change). + plan `docs/plans/emit-ir-staticlib.md` (`03493c9`) → iter + `bcfe554`. Stays here briefly for context; remove once stale (full + record in `docs/journals/INDEX.md`). - context: `docs/specs/2026-05-18-fieldtest-embedding-abi-m1.md` - finding [spec_gap]#2. + finding [spec_gap]#2; + `docs/journals/2026-05-18-iter-emit-ir-staticlib.md`. - [ ] **\[milestone\]** Embedding ABI — M2: per-thread runtime context + concurrency safety. `ailang_ctx_new()/_free` threaded