iter form-a.1 (Tasks 1-5): additive phase + relocation
First half of the form-a-default-authoring milestone-close iter (Boss-decided strategy C, big-bang). All five tasks DONE; cargo test --workspace green at every per-task boundary. T1 — Add three new tests: - parse_is_deterministic_over_every_ail_fixture (round_trip.rs) - cli_parse_then_render_then_parse_is_idempotent (roundtrip_cli.rs) - carve_out_inventory.rs (new file; #[ignore]'d until T8 deletion) T2 — Bulk-render the 99 missing examples/<stem>.ail files via `ail render`. Corpus 58 .ail (pre-iter) -> 157 .ail. Eight .ail.json carve-outs (7 §C4(a) subject-matter + 1 §C4(b) prelude) preserved. One re-loop triggered: load_workspace prefers .ail siblings since ext-cli.1, so the newly-rendered imports broke seven Group-A entries whose JSON entry-paths now resolved imports to fresh .ail. Repair: pre-emptive forward-pull of five T3 migrations + 4 transient #[ignore]s on workspace.rs mod tests (cleanly relocated in T5). T3 — 14 Group-A test files migrated from ailang_core::load_workspace to ailang_surface::load_workspace + .ail paths. Carve-out lines preserved verbatim (7 sites in typeclass_22b2.rs / typeclass_22b3.rs). T4 — 12 Group-B test files: bulk regex flip on build_and_run / build_and_run_with_alloc / build_and_run_with_rc_stats call sites (~70 e2e.rs invocations + 11 subprocess sites). Four files mis-classified Group-A as Group-B in plan recon (mono_hash_stability, prelude_free_fns, print_mono_body_shape, show_mono_synthesis); two files mis-classified Group-B as Group-A (mono_recursive_fn, mono_xmod_qualified_ref). Migrated per actual shape, not plan label. T5 — Relocated #[cfg(test)] mod tests from production source to integration test crates with ailang-surface dev-dependency: - crates/ailang-core/tests/hash_pin.rs (10 tests from hash.rs) - crates/ailang-core/tests/workspace_pin.rs (10 non-carve-out tests from workspace.rs) - crates/ailang-codegen/tests/eq_primitives_pin.rs (3 tests from codegen/src/lib.rs:3717-3799) - ailang-prose/tests/snapshot.rs migrated (helper + 8 fixtures) to .ail + ailang_surface::load_module Carve-out tests in workspace.rs mod tests preserved in-place (3× 22b2 + 3× ct1 = 6 tests). Tempdir-based loader-mechanism tests (3 sites) also preserved — they don't consume examples/. Tests: 560 passed, 0 failed, 4 ignored (was 558 + 3 T1 new - 1 transit carve_out_inventory #[ignore] = 560 active). Tasks 6-12 (bench-driver suffix flips, e2e diff-test rewrite + 4 additional raw-JSON-inspect handlers, .ail.json deletion, retiring obsolete roundtrip tests + schema_coverage corpus flip, §C3 DESIGN.md restatement, §A4 doctrine edits, WhatsNew + roadmap strike) ship in the next dispatch on this iter ID. Known debt inherited to T6-12: 4 raw-JSON-inspect tests in e2e.rs (borrow_own_demo / reuse_as_demo / render_parse_round_trip_canonical / ail_run_accepts_ail_source_with_same_stdout_as_ail_json dual-form smoke) need rewrite or #[ignore] before T8 deletion; recorded in journal Concerns + Known debt sections.
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
# iter form-a.1 — Big-bang migration (Tasks 1-5: additive phase + relocation)
|
||||
|
||||
**Date:** 2026-05-13
|
||||
**Started from:** 1a065b37 (post-iter 24.tidy)
|
||||
**Status:** DONE (Tasks 1-5 only; Tasks 6-12 deferred to next dispatch)
|
||||
**Tasks completed:** 5 of 12
|
||||
|
||||
## Summary
|
||||
|
||||
First half of the form-a-default-authoring milestone-close iter: T1
|
||||
adds three new tests (parse-determinism + CLI-pipeline-idempotency +
|
||||
carve-out-inventory-but-`#[ignore]`'d), T2 bulk-renders the 99
|
||||
missing `examples/<stem>.ail` files via `ail render` (corpus 58 →
|
||||
157), T3 + T4 migrate ~26 test files from `ailang_core::load_workspace`
|
||||
to `ailang_surface::load_workspace` (Group A) and flip subprocess
|
||||
fixture-suffix strings from `.ail.json` to `.ail` (Group B), T5
|
||||
relocates `#[cfg(test)] mod tests` blocks from production source
|
||||
(`ailang-core/src/hash.rs`, `ailang-core/src/workspace.rs`
|
||||
non-carve-out subset, `ailang-codegen/src/lib.rs:3717-3799`) to
|
||||
integration test crates that carry `ailang-surface` as a
|
||||
dev-dependency, eliminating the production-source dependency on
|
||||
`.ail.json` fixture reads. The remaining Tasks 6-12 (bench-driver
|
||||
suffix flips, e2e diff-test rewrite, the actual 156-file
|
||||
`.ail.json` deletion, retiring obsolete roundtrip tests +
|
||||
schema_coverage corpus flip, DESIGN.md §Roundtrip Invariant
|
||||
restatement, CLAUDE.md + DESIGN.md doctrine edits, WhatsNew +
|
||||
roadmap close) run in the Boss's next dispatch on this iter ID.
|
||||
`cargo test --workspace` is green at every per-task boundary (560
|
||||
passed + 4 ignored at iter-half close; 558 + 3 new − 1 transit
|
||||
`#[ignore]` on the inventory test). One Task-2 plan defect surfaced
|
||||
inline and was repaired by pre-emptive forward-pull of Task-3
|
||||
migrations.
|
||||
|
||||
## Per-task notes
|
||||
|
||||
- **iter form-a.1.1** — Added `parse_is_deterministic_over_every_ail_fixture`
|
||||
(round_trip.rs) and `cli_parse_then_render_then_parse_is_idempotent`
|
||||
(roundtrip_cli.rs); created `crates/ailang-core/tests/carve_out_inventory.rs`
|
||||
with the 8-file hardcoded list and `#[ignore]`'d until Task 8.
|
||||
The plan's `cli_parse_then_render_then_parse_is_idempotent` body
|
||||
used an `ail()` helper that doesn't exist in the repo (assert_cmd
|
||||
is not a dev-dep); adapted to use `Command::new(ail_bin())`
|
||||
matching the file's existing pattern. Plan acknowledged this
|
||||
possibility — "verify before writing the body; if `list_ail_fixtures`
|
||||
is missing in roundtrip_cli.rs, add a parallel helper at lines 47+."
|
||||
- **iter form-a.1.2** — Rendered the 99 missing `.ail` files. The
|
||||
bulk render exposed a recon defect: `load_workspace` (since
|
||||
ext-cli.1) prefers `.ail` siblings for *imports* even when the
|
||||
entry is `.ail.json`. The seven Group-A test files whose entries
|
||||
were `.ail.json` but whose imports gained newly-rendered `.ail`
|
||||
siblings broke at Task 2's green-gate. Repair pulled forward five
|
||||
Task-3 migrations (mono_xmod_ctor_pattern, 3 sites in
|
||||
typeclass_22b2, 1 site in typeclass_22b3, env_construction_pin,
|
||||
4 sites in ailang-check/tests/workspace.rs, ctt2_registry_rekey)
|
||||
plus `#[ignore]`'d the 4 fixture-loading tests in
|
||||
`ailang-core/src/workspace.rs` `mod tests` with explicit
|
||||
`form-a.1 transit: Task 5 relocates...` markers. Also added
|
||||
`ailang-surface = { path = "../ailang-surface" }` to
|
||||
`crates/ailang-core/Cargo.toml` `[dev-dependencies]` (required
|
||||
for the ctt2_registry_rekey integration test to use
|
||||
`ailang_surface::load_workspace`).
|
||||
- **iter form-a.1.3** — Finished Group A migration across the
|
||||
remaining 12 Group-A files (10 + the 2 already migrated in T2
|
||||
scope-pull). Two files (`mono_recursive_fn.rs`,
|
||||
`mono_xmod_qualified_ref.rs`) were Group-B-pattern (subprocess
|
||||
CLI, suffix-only flip) but listed in plan's Group A; treated
|
||||
per their actual shape.
|
||||
- **iter form-a.1.4** — Group-B migration: bulk regex flip of
|
||||
`build_and_run("X.ail.json")` → `build_and_run("X.ail")` (3
|
||||
patterns) in e2e.rs across 59 invocations; plus targeted
|
||||
subprocess `examples/<fixture>.ail.json` → `.ail` flips at 11
|
||||
more e2e.rs sites (6× `ws_main`, 2× `sum`, 1× `escape_local_demo`,
|
||||
1× `list_map_poly`, 1× `std_either` left as-is per its raw-bytes
|
||||
roundtrip semantics). Four additional sites in e2e.rs preserved
|
||||
intentionally for raw-JSON inspection (`borrow_own_demo`,
|
||||
`reuse_as_demo`, the `sum.ail.json` diff-test pending Task 7
|
||||
rewrite, and the `ail_run_accepts_ail_source...` dual-form smoke).
|
||||
Four plan-Group-B files (`mono_hash_stability`, `prelude_free_fns`,
|
||||
`print_mono_body_shape`, `show_mono_synthesis`) were
|
||||
Group-A-pattern (consumers of `load_workspace`); migrated both
|
||||
imports AND paths.
|
||||
- **iter form-a.1.5** — Relocated 10 fixture-loading tests from
|
||||
`ailang-core/src/workspace.rs` `mod tests` to new
|
||||
`crates/ailang-core/tests/workspace_pin.rs` (integration test
|
||||
crate); relocated all 8 tests from `ailang-core/src/hash.rs`
|
||||
`mod tests` plus 2 in-memory unit tests to
|
||||
`crates/ailang-core/tests/hash_pin.rs`; relocated 3 tests from
|
||||
`ailang-codegen/src/lib.rs:3717-3799` to
|
||||
`crates/ailang-codegen/tests/eq_primitives_pin.rs`; migrated
|
||||
`ailang-prose/tests/snapshot.rs` (helper + 8 fixtures) to `.ail`
|
||||
+ `ailang_surface::load_module`. Carve-out tests stay in-place
|
||||
(3× `class_param_in_applied_position` / `superclass_with_wrong_param`
|
||||
/ `constraint_with_unbound_var` for 22b2; 3× `ct1_fixture_*`
|
||||
for ct.1). Tempdir-based loader tests
|
||||
(`user_module_named_prelude_is_rejected`, `detects_import_cycle`,
|
||||
`module_not_found_yields_structured_error`) stay in-place too —
|
||||
they don't consume the examples corpus, so they don't need
|
||||
migration for the Form-A goal. Added `ailang-surface` as a
|
||||
`[dev-dependencies]` entry to `ailang-codegen/Cargo.toml` and
|
||||
`ailang-prose/Cargo.toml`. Hash.rs has `mod tests {}` placeholder
|
||||
kept; workspace.rs `mod tests` shrunk from 73 to 57 tests +
|
||||
6 carve-outs unchanged.
|
||||
|
||||
## Concerns
|
||||
|
||||
- **e2e.rs raw-JSON-inspect tests** (4 sites: `borrow_own_demo_modes_are_metadata_only`,
|
||||
`reuse_as_demo_under_rc_uses_inplace_rewrite`, `diff_detects_changed_def`,
|
||||
`render_parse_round_trip_canonical`, plus the dual-form smoke
|
||||
`ail_run_accepts_ail_source_with_same_stdout_as_ail_json`) currently
|
||||
read raw `.ail.json` bytes for substring asserts or byte-roundtrip
|
||||
comparison. They pass today (the `.ail.json` files still exist
|
||||
pre-T8) but will break at T8 when `.ail.json` siblings are deleted.
|
||||
Plan Task 7 only addresses the `diff_detects_changed_def` test (the
|
||||
one that mutates JSON). The other three are out of T1-5 scope and
|
||||
inherit to Boss for T6-12 dispatch resolution (either parse-derived
|
||||
JSON via `ail parse` per T7 pattern, or `#[ignore]` with explicit
|
||||
marker).
|
||||
- **`ailang-core/src/workspace.rs` `mod tests`**: 3 tempdir-based
|
||||
loader-mechanism tests (lines :1743, :1759, :1776 pre-relocation;
|
||||
current line numbers shifted by the deletions) remain in-place
|
||||
per implementer-judgement (they don't consume `examples/`, so
|
||||
the Form-A goal is trivially satisfied). Plan suggested
|
||||
relocating them for doctrinal cleanup; scope reduction is
|
||||
deliberate. They continue to test what they always tested
|
||||
(loader cycle/missing-module/user-prelude-conflict behaviour)
|
||||
and pass.
|
||||
- **Plan recon defect on Group-A vs. Group-B classification**:
|
||||
`mono_hash_stability.rs`, `prelude_free_fns.rs`,
|
||||
`print_mono_body_shape.rs`, `show_mono_synthesis.rs` were listed
|
||||
in plan's Group B but actually use `ailang_core::workspace::load_workspace`
|
||||
directly (Group-A pattern). Migrated correctly by switching both
|
||||
the import and the path. Recorded so a future recon-tightening
|
||||
pass on the planner skill can review whether path-grep-only
|
||||
recon is sufficient for Group A/B classification.
|
||||
- **`mono_recursive_fn.rs` and `mono_xmod_qualified_ref.rs`** were
|
||||
symmetric — listed in plan's Group A but actually CLI subprocess
|
||||
callers (Group-B pattern). Suffix-only flip applied as if Group B.
|
||||
|
||||
## Known debt
|
||||
|
||||
- 4 raw-JSON-inspect tests in e2e.rs need T7-style rewrites or
|
||||
`#[ignore]` markers before Task 8's `.ail.json` deletion lands
|
||||
(see Concerns).
|
||||
- 3 tempdir tests in `ailang-core/src/workspace.rs` `mod tests`
|
||||
could be relocated as doctrinal cleanup but functionally don't
|
||||
need to be (see Concerns).
|
||||
- `mod tests {}` placeholder in `ailang-core/src/hash.rs` could
|
||||
be deleted entirely; left as a structural breadcrumb pointing at
|
||||
the integration test crate.
|
||||
|
||||
## Files touched
|
||||
|
||||
Working tree: 37 modified + 14 new test files + 99 new `.ail`
|
||||
fixtures = 150 paths. Detail:
|
||||
|
||||
### Modified production / test source (37)
|
||||
|
||||
- `crates/ail/tests/`: codegen_import_map_fallback_pin.rs,
|
||||
ct1_check_cli.rs, e2e.rs (extensive build_and_run + 11
|
||||
subprocess sites), eq_float_noinstance.rs, eq_ord_e2e.rs,
|
||||
floats_e2e.rs, ir_snapshot.rs, mono_hash_stability.rs,
|
||||
mono_recursive_fn.rs, mono_unification.rs, mono_xmod_ctor_pattern.rs,
|
||||
mono_xmod_qualified_ref.rs, mq3_multi_class_e2e.rs,
|
||||
polyfn_dot_qualified_branch_pin.rs, prelude_free_fns.rs,
|
||||
print_mono_body_shape.rs, roundtrip_cli.rs, show_mono_synthesis.rs,
|
||||
show_no_instance_e2e.rs, show_print_e2e.rs, typeclass_22b2.rs,
|
||||
typeclass_22b3.rs, typeclass_22c.rs (23 files)
|
||||
- `crates/ailang-check/tests/`: env_construction_pin.rs,
|
||||
method_collision_pin.rs, show_dispatch_pin.rs, workspace.rs (4)
|
||||
- `crates/ailang-codegen/`: Cargo.toml + src/lib.rs (2)
|
||||
- `crates/ailang-core/`: Cargo.toml + src/hash.rs + src/workspace.rs
|
||||
+ tests/ctt2_registry_rekey.rs (4)
|
||||
- `crates/ailang-prose/`: Cargo.toml + tests/snapshot.rs (2)
|
||||
- `crates/ailang-surface/tests/round_trip.rs` (1)
|
||||
- `Cargo.lock` (1)
|
||||
|
||||
### New (14 test files + 99 rendered .ail fixtures)
|
||||
|
||||
- `crates/ailang-codegen/tests/eq_primitives_pin.rs` (relocated T5)
|
||||
- `crates/ailang-core/tests/hash_pin.rs` (relocated T5)
|
||||
- `crates/ailang-core/tests/workspace_pin.rs` (relocated T5)
|
||||
- `crates/ailang-core/tests/carve_out_inventory.rs` (new T1)
|
||||
- 99× `examples/<stem>.ail` rendered via `ail render` (T2)
|
||||
|
||||
## Stats
|
||||
|
||||
bench/orchestrator-stats/2026-05-13-iter-form-a.1.json
|
||||
Reference in New Issue
Block a user