iter pd.3: prelude.ail.json retired — milestone prelude-decouple closed

Deleted examples/prelude.ail.json (-559 lines). The cross-form-identity
preflight test that ratified pd.3's load-bearing assumption at module
hash 3abe0d3fa3c11c99 has discharged its purpose and was removed
along with its supporting bytes; the long-term prelude_parse_yields_canonical_hash
anchor stays. The ail-CLI migrate-bare-cross-module-refs subcommand's
defensive include + lockstep skip-branch removed; the rewrite logic's
prelude-fallback capability silently retired with the synthetic insert
(known debt, doc-comment updated to reflect). One in-mod core test
relocated to crates/ailang-core/tests/workspace_pin.rs (pd.2.4 dev-dep
cycle precedent — in-mod call to ailang_surface still structurally
impossible).

carve_out_inventory.rs: 8 → 7 carve-outs, §C4(b) row dropped, header
sentence updated. form-a-default-authoring.md §C4(b) gets a "RETIRED
2026-05-14 by milestone prelude-decouple" status marker; original
historical text preserved. New prelude_decouple_carve_out_pin.rs
asserts examples/prelude.ail.json does NOT exist.

Milestone prelude-decouple closed: prelude exists on disk only as
examples/prelude.ail; ailang-core embeds zero prelude bytes; CLAUDE.md
"authors write .ail" doctrine holds without exception.

cargo test --workspace 573 green; bench/cross_lang.py +
bench/compile_check.py exit 0; bench/check.py exit 1 with the
established noise envelope (14th observation of bench_list_sum.bump_s
since audit-cma; pd.3 is filesystem + spec text + test deletion only,
no codegen / runtime / typecheck path edited — baseline pristine).

Folds in the orphan pd.2 INDEX entry that was left uncommitted in the
working tree.
This commit is contained in:
2026-05-14 13:24:40 +02:00
parent c0dd2bc334
commit 9a8d3850e7
11 changed files with 354 additions and 664 deletions
+6 -33
View File
@@ -2630,39 +2630,12 @@ mod tests {
assert!(modules.contains_key("main"));
}
/// pd.1 Task 2: `build_workspace` accepts a pre-assembled modules
/// map (with the caller having already injected any implicit
/// modules) and runs the three-stage validation pipeline. The
/// `implicit_imports` slice is what the diagnostic helpers consult
/// for fallback candidate suggestions (Task 3 wires it through).
#[test]
fn build_workspace_accepts_assembled_modules_and_runs_validation() {
let dir = tempfile::tempdir().unwrap();
write_module(dir.path(), "main", &[]);
let entry = dir.path().join("main.ail.json");
let (entry_name, root_dir, mut modules) =
load_modules_with(&entry, load_one).expect("load");
// Caller-side prelude inject — pd.2 deletes `load_prelude` from
// production, but this test still needs SOMETHING in the
// `prelude` slot to demonstrate the caller-injects pattern.
// Read the JSON sidecar via the same path the retired
// `load_prelude` used. Surface owns the production inject path
// (via `ailang_surface::parse_prelude`).
const PRELUDE_JSON: &str =
include_str!("../../../examples/prelude.ail.json");
let prelude: Module = serde_json::from_str(PRELUDE_JSON)
.expect("examples/prelude.ail.json must parse as a Module");
modules.insert("prelude".to_string(), prelude);
let ws = build_workspace(entry_name, root_dir, modules, &["prelude"])
.expect("build");
assert_eq!(ws.entry, "main");
assert!(ws.modules.contains_key("main"));
assert!(ws.modules.contains_key("prelude"));
}
// Note: tests that need a real prelude module via
// `ailang_surface::parse_prelude()` live in
// `crates/ailang-core/tests/workspace_pin.rs` (integration crate)
// because the dev-dep cycle (`ailang-core` -> `ailang-surface` ->
// `ailang-core`) leaves the lib-test target with two distinct
// `ailang-core` compilations whose `Module` types do not unify.
fn module_with_bare_classref(name: &str, class_ref: &str) -> Module {
// A module containing a single Def::Instance whose `class` field is