# iter embedding-abi-m3.tidy — close the two M3-audit doc-honesty DRIFT items

**Date:** 2026-05-18
**Started from:** 4fc34705528333de765251be9c26f7bb3182e175
**Status:** DONE
**Tasks completed:** 3 of 3

## Summary

Post-audit docs-honesty tidy that reconciles the two DRIFT items the
M3 milestone-close audit (`docs/journals/2026-05-18-audit-embedding-abi-m3.md`,
committed `b8a60b1`) routed here, in the M2.tidy `[medium]+[low]
doc-honesty → tidy` precedent shape. Two surgical, independent text
edits, zero language/checker/codegen behaviour change. (1) DESIGN.md
§"Embedding ABI" `:2300-2301` — replaced *only* the contradicted
M1-era parenthetical (`modes apply only to heap-shaped types, which
the scalar-only rule above forbids at an export boundary anyway`),
which since the M3 frozen-layout SSOT accepts a single-ctor record
export type contradicted both that freeze and the `(own/borrow
(con T))` mode contract at `:2345-2351`; the replacement states the
present-tense truth and points at the frozen-value-layout SSOT. The
`docs_honesty_pin.rs:135`-pinned sentence ("Export parameters are
written **bare**: a scalar type carries no `own`/`borrow` mode",
`norm()`-whitespace-collapsed) shares physical line `:2300` with the
stale clause — the edit kept every pinned word contiguous; the pin
stayed GREEN (5 passed) across the edit, no RED→restore needed.
(2) `crates/ailang-codegen/src/lib.rs:608-610` — comment-only
honesty fix: the forwarder-body comment claimed the gate guarantees
`Int`/`Float`-only, false post-M3 (a gate-guaranteed single-ctor
record lowers to `ptr`); the IR byte-pin + 3 forwarder-IR pins
stayed byte-identically GREEN before and after, the guard that no
generated code moved. Four standing pins at exact recon baseline
(`docs_honesty_pin` 5, `design_schema_drift` 8,
`embed_record_layout_pin` 1, `embed_staticlib_lowering` 3); full
workspace 639/77 byte-unchanged from the M3-DONE baseline. Diff is
exactly the two intended files. This closes the M3 audit's
`[medium]`+`[low]` doc-honesty drift; bench was already carry-on at
the audit (decisively causally exonerated by byte-identical
generated IR — M3 changed no executable-path codegen; NO ratify).
No audit/fieldtest gate after this tidy — the four pins + the
639/77 baseline ARE the regression coverage (M2.tidy precedent).

## Per-task notes

- iter embedding-abi-m3.tidy.1: reconcile the contradicted DESIGN.md
  parenthetical (`[medium]`). Replaced only the parenthetical on
  `:2300-2301`; pinned bare-scalar sentence kept verbatim+contiguous
  (`docs_honesty_pin` 5 passed, `design_schema_drift` 8 passed).
- iter embedding-abi-m3.tidy.2: honesty-fix the stale forwarder-body
  comment (`[low]`). Comment-only edit at `lib.rs:608-610`;
  `embed_record_layout_pin` 1 + `embed_staticlib_lowering` 3 passed
  byte-identically before and after (no IR delta); full codegen
  crate green.
- iter embedding-abi-m3.tidy.3: milestone-close verification gate.
  Four standing pins at recon baseline; workspace 639/77 unchanged;
  diff exactly two files (DESIGN.md, codegen/src/lib.rs). One
  plan-vs-actual grep discrepancy recorded under Concerns (Step 1
  pattern collides with the plan's own Task 2 replacement text;
  substantive intent satisfied via the discriminating fragment).

## Concerns

- Task 3 Step 1's verification grep pattern `guarantees every param`
  is a plan defect: it is a substring of the plan's *own* Task 2
  prescribed NEW replacement text (`// The check-side export gate
  guarantees every param and`), so it cannot return "no output" as
  the plan's Step 1 expects without contradicting Task 2. The
  substantive intent of Step 1 — the stale `Int`/`Float`-only
  comment is gone — was verified via the discriminating fragments
  instead: the stale `check-side gate (Task 4)` marker is ABSENT
  (grep exit 1) and the stale `guarantees every param` + immediately
  following `and the ret are \`Int\`/\`Float\`; map` two-line claim
  is ABSENT (Pzo exit 1), while the new correct M3 comment with
  `single-constructor` record framing is PRESENT (`:609`). The
  implementation followed Task 2's verbatim replacement exactly as
  mandated; the retained words "guarantees every param" are correct
  (the gate genuinely still guarantees every param — the M3 change
  is *what* it guarantees, not *whether*). No edit was made to
  dodge the grep; the plan's pattern is the defect, not the code.

## Known debt

(none — the two audit-flagged drift items are both closed; no
deferred follow-up.)

## Blocked detail

(none — DONE.)

## Files touched

- `docs/DESIGN.md` — §"Embedding ABI" parenthetical replaced (`:2300-2301`)
- `crates/ailang-codegen/src/lib.rs` — `Target::StaticLib` forwarder-body comment honesty (`:608-610`)

## Stats

bench/orchestrator-stats/2026-05-18-iter-embedding-abi-m3.tidy.json
