Resolves the M5 milestone-close audit DRIFT (audit journal28ab56a). Single cohesive commit, M2.tidya80d495/ M3.tidy63d7d60precedent (pins are the coverage, no RED, no audit/fieldtest gate). - docs/DESIGN.md edit-1 §"Free (host side)": dropped the retired-M4 forward-reference ("an additive M4 concern, not a contradiction of this freeze"; M4 retired 2026-05-18) -> present-tense current fact (a boxed-field record is not an M3 embedding type, export-gate-rejected; the freeze covers exactly the all-scalar single-ctor record). - docs/DESIGN.md edit-2 §"Embedding ABI": reconciled the now- inaccurate "(no shared mutable runtime state - ... data-race-free, sanitiser-verified)" blanket with the real post-7bfa11e state: the per-allocation hot path (per-ctx counters + per-object refcount header) is non-atomic by design and never shared (Ctx:!Send, single-thread-per-ctx); the one shared datum is the atomic-relaxed global RC-stats fallback counter; "data-race-free, sanitiser-verified" retained (still true). - runtime/rc.c:88 comment-only: stale "two unconditional ++ operations" -> accurate "one counter bump per alloc/free ... relaxed atomic add on the global null-ctx fallback, a plain ++ on the per-ctx path" (consistent with the adjacent already- correct :93-106 atomic block + :45-55 Threading header). Boss-verified independently: all pins green (design_schema_drift 8/0, docs_honesty_pin 5/0, effect_doc_honesty_pin 4/0, embed_record_layout_pin 1/0) = mechanical proof no pinned/hashed byte moved; the adjacent separately-pinned bare-scalar sentence is byte-identical (shifted 2299->2305 by net-added lines; substring pin, passes); rc.c strictly comment-only (filter empty); cargo build --workspace Finished; git scope = only docs/DESIGN.md + runtime/rc.c + journal/stats. Clears the M5-audit doc-honesty debt; no new debt. FINAL M5 iteration. The M1-M5 Embedding ABI arc is functionally complete, audited, ratified, and doc-honest. Includes the per-iter journal, stats, and INDEX line.
3.6 KiB
iter embedding-abi-m5.tidy — milestone-close doc-honesty drift reconciliation
Date: 2026-05-19
Started from: e81fb90d88
Status: DONE
Tasks completed: 3 of 3
Summary
The M5 milestone-close audit (2026-05-19-audit-embedding-abi-m5.md)
found three doc-honesty drift items — two docs/DESIGN.md prose
inaccuracies and one runtime/rc.c stale performance-aside comment.
This tidy reconciles all three: DOC/COMMENT-ONLY, pin-safe, zero
language/checker/codegen/schema/runtime-behaviour change. Mirrors the
M2.tidy (a80d495) / M3.tidy (63d7d60) precedent — the existing pin
tests (design_schema_drift, docs_honesty_pin,
effect_doc_honesty_pin, embed_record_layout_pin) staying green
before AND after is the mechanical proof the edits moved no pinned
byte; that is the coverage, so no RED test, no audit/fieldtest gate.
This is the final M5 iteration; M5 closes after Boss-verify
(roadmap [~]→[x] + done-state are Boss-side).
Per-task notes
- iter embedding-abi-m5.tidy.1:
docs/DESIGN.mddoc-honesty (edit-1- edit-2). edit-1 §"Free (host side)" (
:2356-2360): dropped the retired-M4 forward-reference ("an additive M4 concern") — M4 was retired 2026-05-18; the boxed-field record is simply export-gate-rejected (present-tense current fact). edit-2 §"Embedding ABI" (:2290-2293): reconciled the stale "no shared mutable runtime state … data-race-free, sanitiser-verified" claim with the now-atomic global RC-stats fallback — the per-allocation hot path (per-ctx counters + per-object refcount header) is non-atomic and never shared (Ctx: !Send, single-thread-per-ctx); the one shared datum is the atomic-relaxed global RC-stats fallback counter. Pin-safety proof green (8/5/4 passed, 0 failed across the three ailang-core pin suites); the adjacent separately-pinned line (Export parameters are written **bare**:,docs_honesty_pin.rs:135) is byte-identical, shifted line 2299→2305 by the net-added lines above it but content unchanged (the pin is a substring assertion, not a line-number assertion — it passes).
- edit-2). edit-1 §"Free (host side)" (
- iter embedding-abi-m5.tidy.2:
runtime/rc.c18g.0-block (~:88-89) comment-only honesty fix. Replaced the stale "two unconditional++operations" performance aside with the accurate "one counter bump per alloc/free … relaxed atomic add on the global null-ctx fallback, a plain++on the per-ctx path", consistent with the adjacent already-correct :93-106 atomic paragraph and :45-55 Threading header. Mechanical comment-only filter clean (every changed line is a*-prefixed C comment); frozen-IR pinembed_record_layout_pinbyte-identical (1 passed, 0 failed — it asserts generated IR, never rc.c comment text; M3.tidy precedent). - iter embedding-abi-m5.tidy.3: consolidated doc-only + scope gate
(verification only, no files). All pins green across both crates
(
grep -c 'test result: ok'== 3 +embed_record_layout_pinok);git status --porcelainshows ONLYdocs/DESIGN.md+runtime/rc.cas content changes (zerocrates/**,examples/**,ail-embed/**,Cargo.toml,bench/baseline.json);cargo build --workspaceFinished — confirms no behaviour change.
Concerns
(none)
Known debt
(none — this iteration clears the M5-audit doc-honesty debt; no new debt introduced.)
Blocked detail
(n/a — DONE)
Files touched
docs/DESIGN.md(§"Embedding ABI" edit-2 ~:2290-2293; §"Free (host side)" edit-1 ~:2356-2360 — prose-only)runtime/rc.c(18g.0 comment block ~:88-89 — C-comment text only)
Stats
bench/orchestrator-stats/2026-05-19-iter-embedding-abi-m5.tidy.json