audit-pd: tidy items + milestone close (prelude-decouple)

Architect drift: 1 Important + 1 Minor fixed inline as audit-pd-tidy.

DESIGN.md §"Roundtrip Invariant" point 4 + §Enforcement asserted
"Eight `.ail.json`-only fixtures" with one being the prelude embed.
Post-pd.3 the count is seven and the embed clause is empty; rewrote
both paragraphs to reflect the post-milestone state with a forward-
pointer to the prelude-decouple resolution.

ail/src/main.rs's migrate-canonical-types subcommand carried a
`local_types.get("prelude")` fallback in `rewrite_type` that was
dead-by-construction after pd.3 retired the synthetic prelude load
in the same subcommand. Removed the or_else arm; replaced with a
multi-line comment naming the milestone and the repopulation path
for any future variant that needs prelude awareness.

Bench: check.py + compile_check.py exit 1 with the established
envelope-noise (15th consecutive observation since audit-cma);
cross_lang.py clean. pd.* iterations are workspace-loader / spec /
filesystem / test-code only — zero codegen / runtime / typecheck
path edited, so the regression cluster cannot be milestone-induced.
Baseline left pristine consistent with all 14 prior decisions.

Roadmap: P0 entry (prelude-decouple, [~]) struck and removed; P0 is
empty again. The pre-milestone P2 entry that this work superseded
("Prelude embed: Form-A as compile-time source") is gone too. Per-
iter journals stay in INDEX.md as chronological context.

Carried debt unchanged: 3 cargo doc warnings on dangling load_workspace
references in core's lib.rs (covered by the existing P2 "Rustdoc
warning sweep" todo).
This commit is contained in:
2026-05-14 13:32:59 +02:00
parent 9a8d3850e7
commit 354175be30
5 changed files with 142 additions and 30 deletions
+10 -13
View File
@@ -2424,8 +2424,16 @@ fn rewrite_def(
{
return;
}
// Bare cross-module — find owner via imports-in-order, with
// prelude as last-resort fallback.
// Bare cross-module — find owner via imports-in-order. The
// implicit-prelude fallback that this helper used to carry
// (an `or_else` arm scanning `local_types["prelude"]`) was
// dead-by-construction after the prelude-decouple milestone
// (2026-05-14): the synthetic prelude entry that the migrate-
// canonical-types subcommand used to insert into `modules`
// was removed in iter pd.3, so `local_types["prelude"]` is
// never populated. Removed in audit-pd-tidy. If a future
// migrate variant needs prelude awareness, repopulate
// `local_types["prelude"]` explicitly via `parse_prelude`.
let owner: Option<&str> = import_names
.iter()
.map(|s| s.as_str())
@@ -2434,17 +2442,6 @@ fn rewrite_def(
.get(*imp)
.map(|s| s.contains(name))
.unwrap_or(false)
})
.or_else(|| {
if local_types
.get("prelude")
.map(|s| s.contains(name))
.unwrap_or(false)
{
Some("prelude")
} else {
None
}
});
if let Some(owner) = owner {
*name = format!("{owner}.{name}");