audit: canonical-type-names milestone close (clean) + ratify post-23.3.3 compile baseline

This commit is contained in:
2026-05-11 10:27:19 +02:00
parent ef4eff3f8b
commit 0e6079d335
2 changed files with 91 additions and 25 deletions
+66
View File
@@ -14506,3 +14506,69 @@ Workspace at iter-ct.4 close: full `cargo build --workspace`
and `cargo test --workspace` green (457 tests, 0 failed — net
+6 over ct.3's 451: 2 pin tests in hash.rs, 2 prose trim unit
tests, 1 prose snapshot, 1 E2E test).
## 2026-05-11 — Audit close: canonical-type-names milestone
Audit pipeline ran clean per skill protocol.
**Architect drift review:** zero items. DESIGN.md's Decision 2
amendment matches what the code enforces; the four obsolete
mechanisms in the ct.1 catalogue are all gone or correctly
narrowed; `qualify_local_types` is applied uniformly at all three
cross-module fn-lookup sites; the five remaining "bit-identical"
paragraphs in DESIGN.md refer to features orthogonal to the
canonical-form migration and remain factually correct. JOURNAL
test-count claim (457 at iter close) verified against
`cargo test --workspace`. Spec acceptance criteria 1-8 empirically
satisfied.
**Bench-regression check:** `bench/check.py` and `bench/cross_lang.py`
green at exit 0 (0 / 88 metrics regressed). `bench/compile_check.py`
initially reported 23 / 24 regressed (compile-time +27-44%
across every fixture). Bencher dispatched to localise; the
result refuted the initial hypothesis (validator-causes-regression)
with N=15 median measurements: validator's measured CPU
contribution is 0.01-0.07 ms per `ail check`, within noise.
Localised to **iter 23.3.3** (`12d9130``Ord extends Eq` + 3
Ord instances added to `examples/prelude.ail.json`). The prelude
grew from 18 to 223 lines between `3742583` and `12d9130`. The
cost is paid on every `load_workspace`: parse, canonicalise,
typecheck the prelude module, register its 6 instances. The
bench fixtures are tiny (hello = 4 defs); the prelude is now
larger than every user fixture in the corpus and dominates load
time. ct.1.* contributes a residual +0.05-0.15 ms on top — not
material against the ~+20 ms build floor.
**Resolution:** ratify. The prelude growth is a deliberate
post-iter-23.3 design state (Eq + Ord classes with three primitive
instances each are the canonical typeclass surface; the prelude
is auto-loaded for every workspace per iter 23.1.2). Constant
+17 ms per `ail build` invocation is the documented price of
the canonical typeclass prelude. Baseline rebased via
`bench/compile_check.py --update-baseline`; post-rebaseline run
is 24 / 24 stable.
Lesson logged: when a milestone closes and a bench script reports
broad regressions, the canonical move is to localise BEFORE
ratifying. Without the bisect, ratifying would have written
"canonical-type-names caused +30% compile time" into the
JOURNAL — a false attribution that would mislead future
archaeology.
**Rustdoc:** 20 pre-existing-pattern warnings (18 carried from
earlier, +2 introduced by ct.1.5a's `type_def_module` doc-link
and ct.3.2's `apply_per_module_types_overlay` rename). The
existing P2 roadmap entry "Rustdoc warning sweep" covers them;
not promoted to a tidy iteration on this audit.
**Audit verdict:** carry-on. Canonical-type-names milestone is
closed. Skill pipeline next step: `fieldtest`.
Follow-up not from this audit but worth flagging as a P3 idea:
optimising the prelude load path. A `OnceCell`-cached parsed
prelude (or a content-addressed disk cache) would recover most
of the ~17 ms per-invocation cost. Quantified by the bencher
above as worth doing only if the prelude-loading cost is judged
structurally permanent. Add to roadmap as P3 if the next
fieldtest surfaces it as friction.