From 8b455bee4ca2b09bcadc56d95e0d79dcef75d284 Mon Sep 17 00:00:00 2001 From: Brummel Date: Thu, 14 May 2026 01:53:14 +0200 Subject: [PATCH] =?UTF-8?q?plan:=20rpe.1=20amendment=20=E2=80=94=20Task=20?= =?UTF-8?q?5=20Cat=20B=20test-harness=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the six IR-shape tests in crates/ail/tests/e2e.rs to Task 5's file list and documents the test-harness patch (replace home-rolled desugar+lift loop with monomorphise_workspace). The patch is the small structural fix the rpe.1 BLOCKED orchestrator's Cat B findings pointed to. With the two upstream codegen bugs now fixed (commits 1fb225e + feb9413), the rpe.1 corpus migration plus this Cat B harness patch should make the full retry green. --- docs/plans/2026-05-14-iter-rpe.1.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/plans/2026-05-14-iter-rpe.1.md b/docs/plans/2026-05-14-iter-rpe.1.md index f556f3a..1341b72 100644 --- a/docs/plans/2026-05-14-iter-rpe.1.md +++ b/docs/plans/2026-05-14-iter-rpe.1.md @@ -399,6 +399,28 @@ in Task 5; expect Task-5 sites to fail and proceed to Task 5. - Modify: `crates/ailang-core/tests/design_schema_drift.rs:87-94` - Modify: `crates/ailang-surface/src/lex.rs:320, 328` - Modify: `crates/ailang-prose/src/lib.rs:1585-1593` +- Modify: `crates/ail/tests/e2e.rs` — six IR-shape tests at lines 1408, + 1628, 1710, 1800, 1936, 2013 (Cat B test-harness patch, see below). + +**Cat B test-harness patch (added 2026-05-14 after the rpe.1 BLOCKED +orchestrator run):** Six IR-shape tests in `crates/ail/tests/e2e.rs` +build their own `lifted_ws` via a `lift_letrecs` loop and lower it +via `lower_workspace_with_alloc`, skipping `monomorphise_workspace`. +Pre-migration this was fine — the fixtures used `(do io/print_int x)`, +a directly-recognised effect-op. Post-migration they use `(app print x)` +(polymorphic free fn), which requires mono to resolve to +`print__Int`. Without the mono pass, lowering errors with +`UnknownVar("print")`. The fix is identical at all six sites: replace +the home-rolled `desugar+lift` loop with a single call to +`ailang_check::monomorphise_workspace(&ws)?` and lower the +resulting `MonomorphisedWorkspace`. Sites to patch: + +- `reuse_as_demo_under_rc_uses_inplace_rewrite` (line 1408) +- `alloc_rc_borrow_only_recursive_list_drop` (line 1628) +- `alloc_rc_partial_drop_skips_moved_keeps_wildcarded` (line 1710) +- `alloc_rc_own_param_dec_at_fn_return` (line 1800) +- `iter18e_drop_iterative_emits_worklist_body_no_self_recursion` (line 1936) +- `iter18e_no_annotation_keeps_recursive_drop_body` (line 2013) - [ ] **Step 1: Migrate `ailang-check/src/lib.rs:3871-3877`**