roadmap: retire Embedding ABI — M4 (never speced) — speculative infra by feature-acceptance clause 2
M4 (sequence crossing via the List ADT) was struck during its own /boss brainstorm, in the Step-2/3 Q&A, before any spec — the "problem mis-framed -> don't ratify a known-unneeded shape into the roadmap" brainstorm path. No spec, no grounding-check, no planner handoff. Why: held against DESIGN.md feature-acceptance criterion clause 2, M4 removes no redundancy. The shipped M3 export gate is_c_abi_type (crates/ailang-check/src/lib.rs:1934-1953) is a per-parameter loop accepting a C scalar OR a single-ctor all-scalar record independently per param; the forwarder's llvm_scalar maps every non-scalar Type::Con to ptr (M3-frozen). So (State, Tick) -> State with both as single-ctor all-scalar records is already gate-accepted and forwarder-supported today. The minimal data-server binding is M3 (shipped) + a host-side per-tick loop; cons-list crossing would add a 2N+1-box-per-chunk host builder and the deferred flat-array perf debt, with no named consumer (M5's adapter unrolls each chunk host-side; whole-chunk in-kernel visibility is semantically void — State threads across calls regardless of chunk boundaries). Outcome: M4 retired in docs/roadmap.md (struck entry kept one cycle for context, never [x] — never shipped); M5 reconciled (depends on M4 -> M3 + the Tick-coverage todo; adapter unrolls host-side; friction feeds the host-per-tick-FFI vs. batch-crossing P2 perf decision); residual recorded as a new [todo] Tick-coverage on M3 — an E2E + fixture pinning the two-record-param per-tick (State, Tick) -> State shape (test backfill, no brainstorm). Rationale + the honest mid-Q&A correction (I had wrongly asserted M5 needs M4) in docs/journals/2026-05-18-brainstorm-embedding-abi-m4-retired.md; INDEX.md mirrors it.
This commit is contained in:
+38
-19
@@ -304,31 +304,50 @@ work progresses.
|
||||
`docs/journals/2026-05-18-audit-embedding-abi-m3.md`;
|
||||
`docs/journals/2026-05-18-iter-embedding-abi-m3.tidy.md`.
|
||||
|
||||
- [ ] **\[milestone\]** Embedding ABI — M4: sequence crossing via
|
||||
the existing `List` ADT. Host builds a `List Record` per chunk;
|
||||
`(State, List Record) -> State` callable end-to-end. Pure
|
||||
ABI/marshalling, no language change — applies M3's frozen
|
||||
layout repeatedly. Makes the real fold runnable over real
|
||||
chunks. The array-vs-cons-list performance question (1024 RC
|
||||
cons-cells per chunk on the hot path) is deliberately *not* in
|
||||
scope here — capability now, performance as a separate later
|
||||
non-ABI milestone (P2 below), keeping the user's "focus on the
|
||||
ABI, ignore the array gap" cut. Coherent stop:
|
||||
`(State, List M1) -> State` runs.
|
||||
- depends on: Embedding ABI — M3.
|
||||
- context: 2026-05-18 chat.
|
||||
- **\[milestone — RETIRED 2026-05-18, never speced\]** Embedding ABI
|
||||
— M4: sequence crossing via the `List` ADT. Struck during its own
|
||||
brainstorm Q&A, before any spec: failed feature-acceptance
|
||||
clause 2. The minimal data-server binding is M3 (shipped) + a
|
||||
host-side per-tick loop over each chunk's records —
|
||||
`(State, Tick) -> State` is *already* gate-accepted and
|
||||
forwarder-supported under M3 (the gate loop accepts each record
|
||||
param independently; the forwarder maps each to `ptr`). Cons-list
|
||||
crossing would *add* a 2N+1-box-per-chunk host builder plus the
|
||||
deferred flat-array perf debt rather than remove redundancy, and
|
||||
builds something no named consumer needs (M5's adapter unrolls
|
||||
the chunk host-side; whole-chunk in-kernel visibility buys nothing
|
||||
— `State` threads across calls regardless of chunk boundaries).
|
||||
Removed (not `[x]` — never shipped); rationale in the journal.
|
||||
Stays one cycle for context, then delete.
|
||||
- context: `docs/journals/2026-05-18-brainstorm-embedding-abi-m4-retired.md`.
|
||||
|
||||
- [ ] **\[todo\]** Tick-coverage on M3 — E2E + fixture pinning the
|
||||
two-record-param per-tick crossing `(State, Tick) -> State` on the
|
||||
shipped M3 ABI (host builds `Tick` via `ailang_rc_alloc` per the
|
||||
frozen `make_state` recipe, calls once per tick, threads `State`,
|
||||
alloc==free, both `own`/`borrow`). Zero language change — capability
|
||||
is present today but only E2E-proven for a *single* record param
|
||||
(`State`); this pins the two-record-param shape by fixture. No
|
||||
brainstorm (test backfill). The residual of retired M4 — the actual
|
||||
"minimal data-server binding".
|
||||
- context: `docs/journals/2026-05-18-brainstorm-embedding-abi-m4-retired.md`.
|
||||
|
||||
- [ ] **\[milestone\]** Embedding ABI — M5: `ail-embed` adapter +
|
||||
`data-server` wiring + thread-swarm backtest (fieldtest
|
||||
target). The host-side adapter crate (sole meeting point of
|
||||
`data-server` and AILang, per Invariant 1) wires
|
||||
`data-server`'s `while let next_chunk` loop to the AILang
|
||||
kernel via the ABI; an actual small backtest runs over a
|
||||
thread swarm. Natural `fieldtest` milestone: existence proof
|
||||
of the whole goal + friction harvest feeding the
|
||||
array-primitive decision. Coherent stop: the goal itself.
|
||||
- depends on: Embedding ABI — M4.
|
||||
- context: 2026-05-18 chat.
|
||||
kernel via the M3 ABI by **unrolling each chunk host-side** into
|
||||
per-tick `(State, Tick) -> State` calls (M4's cons-list crossing
|
||||
was retired — see above; the adapter, not the kernel, owns chunk
|
||||
iteration); an actual small backtest runs over a thread swarm.
|
||||
Natural `fieldtest` milestone: existence proof of the whole goal
|
||||
+ friction harvest feeding the host-per-tick-FFI vs. batch-
|
||||
crossing perf decision (the P2 flat-array item). Coherent stop:
|
||||
the goal itself.
|
||||
- depends on: Embedding ABI — M3; Tick-coverage on M3 (todo above).
|
||||
- context: 2026-05-18 chat; M4 retirement
|
||||
`docs/journals/2026-05-18-brainstorm-embedding-abi-m4-retired.md`.
|
||||
|
||||
- [x] **\[milestone\]** Heap-`Str` ABI — runtime infrastructure for
|
||||
malloc-backed, refcounted `Str` values alongside the existing
|
||||
|
||||
Reference in New Issue
Block a user