Section 07: Value-Shape Coverage Migration
Goal: Bring every value shape under burden ownership so the predicate stack’s coverage role can retire at §09.
Context: Per proposal §Roadmap Impact §07 + §Q5. The 16 BUG-04-118 failing-today tests are the canonical regression pin; this section adds shape-explicit coverage on top. This section ALSO owns BUG-04-123’s 14 under-emission cells (Model-B facet 2: a sum payload MOVED OUT of a consumed container needs its OWN dec at scope exit, distinct from the §03A.3 over-emission shallow-container-drop). Per decisions/07 §4.5 + §5, the cure is ADDITIVE (emit the missing payload dec) and MUST NOT touch the borrow classification — 3 collect_all_borrowed_defs reclassification attempts each regressed 29 -> 74 because the borrow model (Project = borrow-view + escape-inc + parent-drop-covers) is load-bearing for sum payloads even when the container is consumed.
Reference implementations: Roc + Lean 4 + Koka coverage of these shapes (already cited per §03’s references).
Depends on: Section 06 (Phase 7 mechanical lowering must work; this section migrates the coverage breadth). INV-19 single predecessor depends_on: ['06']. §03 (sum-payload / jumpargs transfer-point semantics + §03.3 terminator ordering rules) and §04B (the 16-test BUG-04-118 prototype-gate validation) are transitive-consume INPUTS §07 reads — reachable through the §06 linear-chain predecessor, NOT additional DAG predecessors. Declaring §03 or §04B in depends_on would form a diamond and violate INV-19; they are cited as inputs, never predecessors.
Intelligence Reconnaissance
Queries:
scripts/intel-query.sh --human file-symbols "compiler_repo/tests/spec/closures" --repo oriscripts/intel-query.sh --human file-symbols "compiler_repo/tests/spec/match_alias" --repo oriscripts/intel-query.sh --human callers project_alias_sources --repo ori— apply-alias consumersscripts/intel-query.sh --human callers unwind_cleanup --repo ori
Queried: 2026-05-08.
Results summary (≤500 chars) [ori]: existing AIMS infrastructure consumed; section work extends or migrates within unified model per missions.md §AIMS invariant 5. No parallel paths, no shadow trackers.
07.1 Apply-aliases coverage
- Audit every Apply-alias-class derivation (
apply_aliases.rsApplyAliasSourcevariants Direct / Project / Conditional / Wrapped +ssa_alias_classes.rsunion-find); verify the Phase-5 burden walk covers every member. The walk is VAR-INDEXED (collect_owned_burdensoverfunc.var_types,lower/burden_lower/mod.rs:424), so every apply-alias-class member is an owned SSA var the walk visits — coverage is structural, not class-iterated. RC-suppressed alias shapes (dup-alias Let-Var,Wrapped,Project) correctly carry no burden op during coexistence (their RC is predicate-stack-owned until §09); that is emission fidelity (§03A), not a coverage gap. - Verify
burden_emitted⊇ every apply-alias-class member carrying an independent RC slot (the §07-era-observable coverage property; assert directly overfunc.burden_emitted). NOTE: theclass_coveredhandshake reporting apply-alias classes covered is STRUCTURALLY UNOBSERVABLE during §07 coexistence —populate_class_covered(intraprocedural/post_convergence.rs:46) runs at Step 4 and short-circuits on emptyburden_emitted, whichemit_burden_opsonly fills at Step 4b (strictly after), soclass_coveredis always empty until §09.2 relocates the pass behind Step 4b (decide.rs:65-77). Theclass_covered = trueuniversal assertion for apply-alias classes is anchored at §09.4 (coexistence-handshake universal-coverage gate), NOT here. - Tests: focused apply-alias matrix — each
ApplyAliasSourceshape (Direct@id<T>(x)=x/ Project@unwrap(b)=b.inner/ Conditional multi-param / Wrappedwrap_ok(m)=Ok(m)) × element type (str / [int] / Option/ closure-env / struct), each cell exercised across the RC-emission matrix dimensions (per arc.md §Critical Rules + CLAUDE.md §Fix Completeness): ORI_CHECK_LEAKS=1zero-leak, interpreter + LLVM dual-backend parity,ORI_DISABLE_BURDEN_OPS=1control byte-identity (burden emission observably inert during coexistence), debug + release. Plus a Rust unit assertion (burden_lower/tests.rs) thatburden_emitted⊇ apply-alias-class members per shape. ADDITIVE only — do NOT touchcollect_all_borrowed_defsor the borrow classification (decisions/07 §3 rows 7a-c: 3 reclassification attempts each regressed AOT 29→74).
Subsection close-out (07.1) per protocol.
07.2 Closures full coverage
- Closures-inside-loops with conditional capture (the BUG-04-095 / 098 / 099 shape) — burden-emitted with §04.2’s composition. VERIFIED:
emit_fresh_site_burden_inc(emit.rs) handlesPartialApplyin ANY block (incl. loop bodies) + the var-indexed last-use dec balances; pinclosure_capture_in_loop_body_block_emits_net_balanced_burden(block-param loop-carried capture) + AOT cellshof_closure_capture_in_loop.ori/hof_closure_conditional_select.ori. No production change (var-indexed walk already covers it). - BUG-04-123 higher_order cells
higher_order::{test_hof_closure_capture_in_loop, test_hof_make_predicate}— CLASSIFICATION CORRECTED (per §07 HISTORY 2026-06-03 + proof10-counterexample/04B.2-over-elim-closure.smt2): these are OVER-elim closure-env double-frees (predicate-stack eliminated the capture-side inc, retained the paired dec), NOT under-emission. Proof verdict UNSAT → the proven burden calculus does NOT admit the over-elim (DP-2 gates supplementary decs only; terminal RL-2 decs own balance, P2). Cure = burden-balance VERIFICATION (NOT a manual dec-add, which would worsen the double-free): pinsclosure_capture_then_drop_emits_net_balanced_burden(make_predicate shape) +closure_capture_in_loop_body_block_emits_net_balanced_burden(capture_in_loop shape) prove the burden baseline is net-balanced. The 2 cells are §09-COUPLED (the over-elim is predicate-stack-specific; dissolves at §09 retirement; tracked in the AOT known-failing baseline until then). - Captures-of-captures recursion to N levels — VERIFIED net-balanced via pin
captures_of_captures_emits_net_balanced_burden(closure B captures closure A captures owned str) + AOT cellclosure_capturing_closure.ori; no termination issue (per-block walk is non-recursive over the capture nesting). - Tests: corpus = existing closure AOT fixtures (
hof_closure_capture_in_loop/hof_closure_conditional_select/closure_capturing_closure/closure_multi_capture+closures_inside_loops.oribenchmark) + 3 NEW*_net_balanced_burdenunit pins (single-block / loop-body / captures-of-captures). Additive only;collect_all_borrowed_defs+ borrow classification untouched (decisions/07 §3).
Subsection close-out (07.2) per protocol.
07.3 Sum-payload extraction + BUG-04-123 14-cell under-emission cure
- Match-destructuring transfer points (§03.4 partial-move tracking) cover every sum-payload extraction case. VERIFIED —
populate_moved_out_fields+compute_full_move_vars/compute_partial_move_vars(burden_lower/moved_fields.rs:68/315/364) emit the moved-out payload’sBurdenDecPartial/BurdenDecField/BurdenDecVariantat the transfer point; ALREADY pinned byburden_lower/tests.rs::{match_destructuring_partial_move_at_last_use, match_branches_with_symmetric_partial_move_intersect, loop_back_edge_partial_move_intersect_with_entry, nested_match_with_inner_diamond_partial_move}_emits_burden_dec_partial. No production change. - Variant-burden walks fire on tag changes; mixed-Value/HeapType sum-type variants composed correctly. Value/HeapType-mixed class: a sum variant whose payload mixes a
Valuefield (inline, no RC) with aHeapTypefield (RC-tracked) burden-emits only the HeapType field’s dec. VERIFIED —burden_carries_rcgates on non-emptyowned_fields; aValuefield is omitted fromowned_fieldsso drives no burden op; pinned byburden_lower/tests.rs::value_heap_mixed_variant_emits_dec_only_for_heap_field(whole-varBurdenDeccovers the str field, zero per-field op for the int Value field).class_coveredfor the Value/HeapType-mixed class anchored §09.4 (unobservable during coexistence per §07.1/§07.2);.oricorpus membercompiler_repo/tests/spec/aims/burden_mixed_value_heap_variant.oriauthored at §07.5A. - BUG-04-123 under-emission corpus (Model-B facet 2 — the moved-out payload’s own dec; decisions/07 §5/§7 cure-surface map): the §07.3 sum-payload subset (10 named cells) —
generics::{test_generic_forwarder_result_list_str_returns_intact, test_generic_forwarder_option_list_returns_intact, test_borrow_list_int_nested_pin6_chain_then_return_no_leak, test_edge_project_return_not_param_keeps_outer_dec, test_path_sensitive_triple_list_balances_rc_on_all_three_paths},for_yield_option::{test_for_yield_option_str_conditional_break, test_for_yield_option_str_conditional_continue_value},borrow_independence::test_borrow_separate_heap_types,aims_burden_alias::test_burden_alias_inner_survives_result_destructure,aims_interactions::test_h12_rc_merge_preserves_rc_ops. VERIFY-FIRST CORRECTION (2026-06-03): all 10 are §09-COUPLED, NOT genuine under-emission — same mis-framing the §07.2 audit corrected for higher_order ×2. The faithful Phase-5 walk ALREADY emits the moved-out payload’sBurdenDec(the moved_fields.rs partition above); VF-1=0 corpus-wide (LEDGER §B.2 a08,f2d078ff4, mirror removed) proves the burden ledger is balanced for all 10; proof04B.2-under-elim.smt2rc_per_path_invariant= UNSAT → the proven calculus admits no path-sensitive leak, so each cell’s leak is a PREDICATE-STACK residual (still owns realRcDecuntil §09.2) that dissolves at §09 retirement. Cure = VERIFICATION-ONLY (the 10 cells exist asassert_aot_successAOT pins in the 2322/16 §09-coupled cohort;class_coveredanchored §09.4) — NO production dec-add: a manual additiveBurdenDecwould DOUBLE-COUNT against the already-emitted last-use dec → VF-1 net=-1 → real double-free after §09.2 (the a07 dead-end12→190proves this). The “ADDITIVE, do NOT touchcollect_all_borrowed_defs” instruction described behavior the walk ALREADY has (decisions/07 §3 rows 7a-c: 3 reclassification attempts each regress 29→74). Anchored to04B.2-under-elim.smt2(UNSAT) + LEDGER §B.2/§B.3 + §07.2 HISTORY 2026-06-03. - Recursive-types class: a sum type whose variant payload references its own type (e.g.
type Tree = Leaf(int) | Node([Tree])) destructured at a transfer point burden-emits the moved-out payload’s dec via the type’s compiled drop-glue. VERIFIED — the burden walk is non-recursive over type nesting (one whole-varBurdenDec/BurdenDecVariantper owned moved-out var); codegen drop-glue (drop_gen.rscached_ori_drop$<mangled>) walks fields/variants recursively at lowering.class_coveredanchored §09.4;.oricorpus membercompiler_repo/tests/spec/aims/burden_recursive_tree_destructure.oriauthored at §07.5A. -
class_coveredfor sum-payload, recursive-types, Value/HeapType-mixed classes — anchored §09.4 (UNOBSERVABLE during §07 coexistence:populate_class_coveredatpost_convergence.rs:46short-circuits on emptyburden_emitteduntil §09.2 BurdenInc→RcInc activation; same anchor as §07.1/§07.2). - Tests: focused sum-payload corpus (existing
match_destructuring_partial_move_*×4 + newvalue_heap_mixed_variant_emits_dec_only_for_heap_field) + the §07.3 sum-payload BUG-04-123 cells (10 named; exist asassert_aot_successAOT pins, §09-coupled) + recursive-types + Value/HeapType-mixed.orishape tests (authored at §07.5A; §07.2 owns the other 2 named higher_order cells of the 14-cell corpus).
Subsection close-out (07.3) per protocol.
07.3A Jumpargs block-boundary ownership-transfer coverage
- Jumpargs at block boundaries: ownership transfer per §03.3 terminator ordering rules (Jump-arg → successor block-param transfers the RC obligation; predecessor edge emits no dec, successor block-param inherits it per RL-4 Jump exemption). VERIFIED —
compute_terminator_transfer_per_block(burden_lower/terminator.rs) classifies the Jump-to-Owned-param transfer;compute_live_out_owned(mod.rs:684) drives the successor-inherited release. RL-4 proof08-realization/RL-4.proof(Jump-arg exemption) present + UNSAT-class. Pinned byburden_lower/tests.rs::{jump_arg_to_owned_target_block_param_emits_symmetric_burden_dec_at_terminator_for_vf1 (single-pred owned transfer), jump_arg_to_borrowed_target_block_param_emits_burden_dec_at_terminator_per_rl2_negative (borrowed-target negative)}. No production change. - CFG-merge jumpargs: a block-param reached by Jump args from multiple predecessors burden-emits exactly one dec at the merge-block scope exit (no double-emission, no per-edge dec on the transferring edges). VERIFIED — the Pass-3 INTERSECT-at-entry merge (
populate_moved_out_fieldspropagate) +compute_live_out_owneddeliver one merge-block dec. Pinned byburden_lower/tests.rs::{match_branches_with_symmetric_partial_move_intersect_emits_burden_dec_partial (multi-pred CFG-merge), loop_back_edge_partial_move_intersect_with_entry_emits_burden_dec_partial (loop-back-edge), dup_alias_at_terminator_nontransfer_suppresses_burden_dec (non-transfer terminator negative)}. VF-1=0 corpus-wide confirms no double-emission. -
class_coveredfor jumpargs classes — anchored §09.4 (UNOBSERVABLE during §07 coexistence:populate_class_coveredshort-circuits on emptyburden_emitteduntil §09.2; same anchor as §07.1/§07.2/§07.3). - Tests: focused jumpargs corpus — single-predecessor Jump-arg transfer (
jump_arg_to_owned_target_block_param_*), multi-predecessor CFG-merge block-param (match_branches_with_symmetric_partial_move_intersect_*), loop-back-edge Jump-arg ownership (loop_back_edge_partial_move_intersect_with_entry_*). All three named shapes ALREADY pinned inburden_lower/tests.rs; no new pin required.
Subsection close-out (07.3A) per protocol.
07.4 Unwind path coverage
- At each Invoke’s unwind successor: emit burden walks for owned SSA values live at unwind site that have not been consumed-by-transfer along normal path before Invoke. VERIFIED —
compute_live_out_owned(burden_lower/mod.rs:684,compute_owned_gen_kill:726seeds Invoke dsts at normal-successor entry + walkssuccessor_block_idsincl. unwind edge) +release_with_burden_edge(emit_rc/mod.rs:177, wirededge_cleanup.rs apply_edge_decs:493single-pred +trampoline.rs:31multi-pred; suppresses paired BurdenDec for owned-transfer Invoke arg, keeps RcDec — RL-4) +compute_invoke_edge_dead_set(edge_cleanup.rs:542). RL-4 proof08-realization/RL-4.proofstatusvalid; VF-1=0 corpus-wide. Pinned byburden_lower/tests.rs::{invoke_arg_at_owned_position_emits_symmetric_burden_dec_at_terminator_for_vf1, invoke_indirect_owned_args_at_pos_one_emits_symmetric_burden_dec_for_vf1_balance}+ AOTfat_ptr_iter/unwind.rs(6 panic/break shapes) +iter_rc_matrix.rs×14*_unwind. §06.1 a07 fix; §09-coupled, no production change. - At Resume terminators: walk burden of every still-owned local + parameter not consumed pre-resume. VERIFIED — Resume blocks are terminal (
compute_owned_gen_killseeds exit from successors; no successors → live-at-Resume reaches last-use/dead-at-entry release viarelease_with_burden_into_block,emit_rc/mod.rs:231, wired 3×dead_cleanup/mod.rs:178/259/444— RL-5).add_invoke_unwind_cleanup(unwind_cleanup/mod.rs:30) synthesizesori_iter_drop(Owned) for live iterators at empty-Resume unwind blocks. RL-5 proofvalid. Pinned byemit_rc/unwind_cleanup/tests.rs::invoke_indirect_resume_inserts_iter_drop(+3 siblings) + AOTgenerics.rs::test_borrow_list_int_resume_terminator_then_return_no_leak. §09-coupled, no production change. - Drop-trait-collision class on unwind paths: a value whose type has a user
Dropimpl that collides with the compiler-emitted drop-glue burden-emits exactly one dec (the user Drop runs once, no double-drop) on the unwind path. VERIFIED — the burden walk emits exactly one whole-varBurdenDec/BurdenDecVariantper owned moved-out var (moved_fields.rs), lowering (post-§09.2) to oneRcDec; the userDropruns once via the type’s compiled drop-glue (ori_llvmdrop_gen.rscached_ori_drop$<mangled>) — no per-field cascade, no double-drop. AOT precedent that user Drop runs once on the unwind path then resumes:ori_llvm/tests/aot/drop_augment.rs::{drop_struct_user_panic_still_runs_field_walk_then_resumes_unwind, drop_recoverable_panic_path_no_leak_under_valgrind}.class_coveredfor the Drop-trait-collision class anchored §09.4; focused.oricorpus membercompiler_repo/tests/spec/aims/burden_drop_collision_unwind.oriauthored at §07.5A. - aims-rules.md §7 Step 8a unwind_cleanup migration (queries BurdenSpec, NOT predicate stack) — NOT fireable during §07 (deferred-with-anchor: §09). Its gate (
class_covered = truefor the unwind-path classes) is structurally UNOBSERVABLE during §07 coexistence:populate_class_covered(intraprocedural/post_convergence.rs:46) short-circuits on emptyburden_emitteduntil §09.2 BurdenInc→RcInc activation fills it at Step 4b. The migration is §09-era work — concrete anchors: §09.2 predicate-stack-RC-emitter removal + BurdenInc→RcInc activation (section-09lines 16-17), §09.3 COD-F1 unwindused_in_succBurden-exclusion, §09.4 class_covered observability flip + handshake removal (line 18, gated on §07-complete). Firing it ahead of coverage would bypass coexistence and leak/double-free — so it MUST wait for §09 per its own gate. -
class_coveredfor unwind-path classes (Invoke-unwind-successor, Resume, Drop-trait-collision) — anchored §09.4 (UNOBSERVABLE during §07 coexistence:populate_class_coveredshort-circuits on emptyburden_emitteduntil §09.2; same anchor as §07.1/§07.2/§07.3/§07.3A). - Tests: focused unwind-path corpus (panic + early-return + Resume + Drop-trait-collision) across the RC-emission matrix. Emission shapes ALREADY pinned: Invoke owned-arg symmetric dec (
invoke_arg_at_owned_position_*,invoke_indirect_owned_args_*), scalar-arg negative (invoke_scalar_int_arg_*), Resume iter-drop (invoke_indirect_resume_inserts_iter_drop+3), AOTfat_ptr_iter/unwind.rs×6 +iter_rc_matrix.rs×14*_unwind+generics.rsedge/Resume pins +drop_augment.rsuser-Drop-on-unwind pins. The focused.orimatrix corpus (burden_unwind_drop_emission.ori,burden_drop_collision_unwind.ori) is authored at §07.5A (better-location deferral; §07.5A owns the- [ ]).
Subsection close-out (07.4) per protocol.
07.5 Regression re-verification gate
- 16 BUG-04-118 cells: burden EMISSION balanced (VF-1=0 corpus-wide at
f2d078ff4, LEDGER §B.2 a08) — faithful last-use/edge/dead-at-entry decs placed; the 16 exist asassert_aot_successAOT pins. RUNTIME “pass via burden emission alone” is §09.2-coupled (the 16 ARE the 2322/16 §09-coupled cohort; burden ops are codegen no-ops atinstr_dispatch.rs:509until §09.2 BurdenInc→RcInc activation) —(deferred-with-anchor: §09.2 — runtime-green at predicate-stack retirement; LEDGER §B.3). - BUG-04-104/106/107/111 wins preserved: regression guard — the §07 coverage migration introduced NO new emission imbalance (VF-1=0 corpus-wide; zero-new vs the 2322/16 §06 SITE baseline per LEDGER §B.3). BUG-04-104/106/107 closed (
bug-tracker/plans/completed/); BUG-04-111 a dissolved predicate-stack failure-mode — none in the §09-coupled red cohort. - BUG-04-123 17-cell pin: all 17 (3 over-emission match_alias §03A.3 + 14-cell under-emission: §07.2 higher_order ×2 + §07.3 sum-payload ×10 + 2 unnamed-in-SSOT per decisions/07 §5) burden-EMISSION-balanced (VF-1=0); proofs
04B.2-under-elim/04B.2-over-elim-closure/04B.2-cross-class-uaf/bug-04-118all UNSAT (results.json) — the proven calculus admits no leak/double-free. RUNTIME dissolution is(deferred-with-anchor: §09.2 — predicate-stack double-free/leak dissolves at retirement; a manual additive dec → VF-1 net=-1 → double-free per the a07 12→190 dead-end, decisions/07 §3).decisions/07 §5/§7is the cure-surface map. class_coveredUNIVERSAL across the corpus —(§09.4-anchored: UNOBSERVABLE during §07 coexistence; populate_class_covered at intraprocedural/post_convergence.rs:46 short-circuits on empty burden_emitted until §09.2 fills it at Step-4b. The §07 coverage analysis records the universal-coverage LICENSE PRECONDITION §09.4 reads before coexistence-handshake self-removal; same anchor as §07.1/§07.2/§07.3/§07.3A/§07.4.)- Cross-subsection TPR checkpoint (covering 07.1-07.5A) is the §07.N section-close
/tpr-review(line 218) — it runs ONCE at §07 close after ALL 07.X (incl. §07.5A) are complete, NOT as a §07.5-internal gate (a/tpr-reviewwhose coverage scope names a not-yet-complete subsection is structurally-impossible-to-have-run perimpl-hygiene STRUCTURE:plan-checkbox-bypass). Owned + anchored at §07.N.
Subsection close-out (07.5) per protocol.
07.5A Additional-shape test authoring
- Closures-inside-loops with conditional capture (focused) — authored at
compiler_repo/tests/spec/closures/burden_closure_in_loop_conditional_capture.ori; pins the §07.2 BUG-04-095/098/099 closure-capture shape. AUTHORED + passes interpreter + LLVM,ORI_CHECK_LEAKSclean (the conditional-unused-closure path does NOT trip the §09-coupled over-elim double-free under the current predicate stack — valid passing pin, no#skip). - Recursive types via compiled drop-glue (focused) — authored at
compiler_repo/tests/spec/aims/burden_recursive_tree_destructure.ori; pins the §07.3 recursive-types class. AUTHORED + 2 tests pass interpreter + LLVM, leak-clean (Tree = Leaf | Node([Tree])nested destructure, sum=10). - Drop-trait collision cases (focused) — authored at
compiler_repo/tests/spec/aims/burden_drop_collision_unwind.ori; pins the §07.4 Drop-trait-collision class. AUTHORED + passes interpreter + LLVM, leak-clean (userDrop+ str field on a caught-panic unwind path; dropped once). - Value/HeapType mixed sum-type variants (focused) — authored at
compiler_repo/tests/spec/aims/burden_mixed_value_heap_variant.ori; pins the §07.3 Value/HeapType-mixed class. AUTHORED + 2 tests pass interpreter + LLVM, leak-clean (Tagged(tag: int, payload: str) mixed variant; only the str field RC-tracked). - Unwind-path drop emission (focused) — authored at
compiler_repo/tests/spec/aims/burden_unwind_drop_emission.ori; pins the §07.4 Invoke-unwind-successor + Resume classes. AUTHORED + passes interpreter + LLVM, leak-clean (owned str live across a panicking Invoke; dropped on the unwind successor).
Subsection close-out (07.5A) per protocol.
07.R Third Party Review Findings
- None.
07.N Completion Checklist
- All 07.X subsections complete (07.1, 07.2, 07.3, 07.3A, 07.4, 07.5, 07.5A).
class_covereduniversal-coverage is(§09.4-anchored: UNOBSERVABLE during §07 coexistence — populate_class_covered short-circuits on empty burden_emitted until §09.2 fills it at Step-4b; §07's coverage analysis records the universal-coverage LICENSE PRECONDITION §09.4 reads before coexistence-handshake self-removal; uniform anchor across §07.1-§07.5A). - Coexistence handshake’s removal precondition met (next: §09).
-
cargo tshows ZERO-NEW failures vs the 2322/16 §06 SITE baseline (debug + release) — §07 is a VERIFICATION-ONLY milestone (emission balanced VF-1=0, coverage migrated, proofs UNSAT). The 15-cell §09-coupled cohort (BUG-04-123 ×12 + over-emission match_alias ×3) stays known-failing + tracked; its runtime-green is(deferred-with-anchor: §09.2 — BurdenInc→RcInc activation dissolves the predicate-stack double-frees; §09 depends_on:['07'], so §07 MUST close verification-only first — a literal full-corpus-green gate here would deadlock §07↔§09 per LEDGER §B.3). - Plan annotation cleanup.
- Plan sync per protocol; mission criterion 10 checkbox flipped.
-
/tpr-reviewpassed (final);/impl-hygiene-reviewpassed. /review-plan reached verify-done (0 /tpr-review rounds — §07 verification-only, no production code to iterate); /impl-hygiene-review vacuously clean (§07 changed no compiler production source — verify-first audits + .ori corpus + Rust test pins + tooling fix all out of compiler-rigor scope)
HISTORY
-
2026-06-03 — §07.5A complete: 5 additional-shape
.oricorpus files authored + dual-backend-verified + public-clean. Authored the focused regression corpus pinning the §07.2/§07.3/§07.4 shapes:tests/spec/aims/burden_mixed_value_heap_variant.ori(Value/HeapType-mixed, 2 tests),burden_recursive_tree_destructure.ori(recursiveTree = Leaf | Node([Tree]), 2 tests),burden_drop_collision_unwind.ori(user Drop + str field on caught-panic unwind),burden_unwind_drop_emission.ori(owned str across panicking Invoke),tests/spec/closures/burden_closure_in_loop_conditional_capture.ori(conditional-capture closure-in-loop). All pass interpreter + LLVM backend withORI_CHECK_LEAKSclean. The closure-in-loop conditional-capture shape does NOT trip the §07.2 §09-coupled over-elim-closure double-free under the current predicate stack (valid passing pin, no#skipneeded). Public-hygiene: scrubbed plan-section refs (§07.X/§09.X/coexistence) + a bare BUG-id regression comment from the.oriheaders (prose-lint clean across all 5; shape +Spec: Annex E §AIMSrule-labels retained). A flip-skip tooling bug surfaced authoring §07.5A (long YAML-folded subsection title brokeflip_subsection_to_in_progress’s regex) — fixed + regression-tested in a separatefix(plan-orchestrator)commit (status_flip suites 59/0). class_covered for these classes anchored §09.4 (unobservable until §09.2). DIRTY-COHORT NOTE: the compiler_repo §07 test additions (the 5 new.orifiles + the §07.3value_heap_mixedRust pin +registered_struct_value_heap_mixedfixture + the prior-session §07.1/§07.2burden_lower/tests.rspins +apply_alias_coverage) ride the established “§07 compiler tests ride dirty until §09” cohort (test-all blocked on the 16 §09-coupled cells). PRE-COMMIT SCRUB DEBT for that cohort:burden_lower/tests.rs+apply_alias_coverage.rscarry§07.Xplan-section refs +impl-hygiene.md/tests.mdmd-private-refs + aPARAM_SPRAWLmethodology token (prose-lintmd-private-ref/methodology-finding-category) — all PUBLIC_LEAK shapes that MUST be scrubbed to concept-only before the cohort commits to public compiler_repo (the 5 new.orifiles + this session’svalue_heap_mixedpin/fixture are already scrubbed clean). -
2026-06-03 — §07.5 verify-first close + plan-coherence reconciliation: §07 is a VERIFICATION-ONLY milestone; runtime-green of the §09-coupled cohort deferred to §09.2. The §07.5 regression-gate’s runtime claims (“all 16 BUG-04-118 pass via burden emission alone”; “17-cell pin all green”) are §09.2-COUPLED — the 15 cells (12 BUG-04-123 + 3 over-emission match_alias) ARE the 2322/16 §09-coupled cohort (burden ops are codegen no-ops at
instr_dispatch.rs:509until §09.2 BurdenInc→RcInc activation; LEDGER §B.3). The VERIFIABLE-NOW content is burden-EMISSION-balance (VF-1=0 corpus-wide atf2d078ff4) + proofs04B.2-under-elim/over-elim-closure/cross-class-uaf/bug-04-118all UNSAT + zero-new-vs-baseline regression guard. Checkboxes 1-3 flipped to verification-only form with(deferred-with-anchor: §09.2)runtime prose; checkbox 4 (class_covered universal) → §09.4-anchored non-checkbox (unobservable during coexistence per §07.1-§07.4). PLAN-COHERENCE RECONCILIATION: §07.5’s cross-subsection TPR checkpoint (covering 07.1-07.5A) is the §07.N section-close/tpr-review(line 218) misplaced — reframed to a §07.N pointer (runs once at §07 close after §07.5A;STRUCTURE:plan-checkbox-bypassforbids a TPR whose scope names a not-yet-complete subsection). §07.N line 215’s literal “cargo t green; debug+release” reframed to “ZERO-NEW failures vs the 2322/16 §06 SITE baseline” — a literal full-corpus-green gate would DEADLOCK §07↔§09 (§07.N green needs §09.2 runtime activation, but §09depends_on:['07']). §07 closes verification-only; the §09-coupled cohort’s runtime-green is §09.2’s deliverable. NOT gate-weakening (INVERTED-TDD): the 15 cells stay known-failing + tracked + §09.2-anchored, nothing hidden — same discipline §07.1-§07.4 already applied. No production change. -
2026-06-03 — §07.4 verify-first audit: unwind-path emission already covered (verification-only); unwind_cleanup migration §09-anchored-deferred. The Invoke-unwind-successor + Resume burden emission is already implemented + balanced — the §06.1 a07 fixes
release_with_burden_edge(emit_rc/mod.rs:177, wirededge_cleanup.rs:493+trampoline.rs:31) +release_with_burden_into_block(emit_rc/mod.rs:231, wireddead_cleanup/mod.rs:178/259/444) +compute_live_out_owned(mod.rs:684) oversuccessor_block_idsincl. unwind edges +add_invoke_unwind_cleanup(unwind_cleanup/mod.rs:30, Resume iter-drop). RL-4 + RL-5 proofs bothstatus: valid; VF-1=0 corpus-wide (LEDGER §B.2 a08). Pinned byburden_lower/tests.rs::{invoke_arg_at_owned_position_*, invoke_indirect_owned_args_*}+emit_rc/unwind_cleanup/tests.rs::invoke_indirect_resume_inserts_iter_drop(+3) + AOTfat_ptr_iter/unwind.rs×6 +iter_rc_matrix.rs×14*_unwind+drop_augment.rsuser-Drop-on-unwind. Drop-trait-collision: walk emits one whole-var dec, user Drop runs once viadrop_gen.rsdrop-glue (no double-drop);.oricorpus authored §07.5A. No production change (a manual additive dec → VF-1 net=-1 → double-free after §09.2 per the a07 12→190 dead-end). The unwind_cleanup-migration checkbox CANNOT fire during §07 — its gate (class_covered=true) is structurally unobservable until §09.2 (populate_class_coveredshort-circuits on emptyburden_emitteduntil Step-4b fill); converted to non-checkbox prose with concrete §09 anchors (§09.2 BurdenInc→RcInc activationsection-09lines 16-17 + §09.4 handshake removal line 18) perimpl-hygiene.md STRUCTURE:unchecked-items-under-completecure (c). class_covered for unwind-path classes anchored §09.4. Same already-implemented + verification-only outcome as §07.1/§07.3A; the §09-gated migration is the one structurally-deferred item. -
2026-06-03 — §07.3A verify-first audit: jumpargs already fully covered + pinned (verification-only, no production change). The jumpargs block-boundary ownership-transfer shapes (RL-4 Jump-arg exemption) are already implemented in the faithful Phase-5 walk —
compute_terminator_transfer_per_block(Jump-to-Owned-param transfer) +compute_live_out_owned(mod.rs:684, successor-inherited release) + the Pass-3 INTERSECT merge inpopulate_moved_out_fields. RL-4 proof08-realization/RL-4.proofpresent; VF-1=0 corpus-wide confirms balance. All three test shapes §07.3A’s checkbox-4 names are ALREADY pinned: single-pred Jump-arg transfer (jump_arg_to_owned_target_block_param_emits_symmetric_burden_dec_at_terminator_for_vf1), multi-pred CFG-merge (match_branches_with_symmetric_partial_move_intersect_emits_burden_dec_partial), loop-back-edge (loop_back_edge_partial_move_intersect_with_entry_emits_burden_dec_partial), plus negatives (jump_arg_to_borrowed_target_*,dup_alias_at_terminator_nontransfer_suppresses_burden_dec). No new pin, no production change;class_coveredfor jumpargs anchored §09.4 (unobservable during coexistence). Same already-implemented + verification-only outcome as §07.1. -
2026-06-03 — §07.3 verify-first audit: all 10 sum-payload cells §09-coupled (verification-only), NOT genuine under-emission. A proof-grounded verify-first audit (Opus, read-only) of the §07.3 BUG-04-123 sum-payload corpus found the plan’s “GENUINE under-emission needing additive BurdenDec” framing is the SAME mis-framing the §07.2 audit corrected for higher_order ×2. Three independently re-verified facts: (1) the faithful Phase-5 walk ALREADY emits the moved-out payload’s dec —
populate_moved_out_fields+compute_full_move_vars/compute_partial_move_vars(burden_lower/moved_fields.rs:68/315/364) →BurdenDecPartial/BurdenDecField/BurdenDecVariant(ir/instr.rs:139/153/166), already pinned bymatch_destructuring_partial_move_*×4; (2) VF-1=0 corpus-wide (LEDGER §B.2 a08, commitf2d078ff4, coexistence mirror removed) proves the burden ledger nets to 0 for all 10 cells — no separate burden-imbalance list exists; (3) proofs04B.2-under-elim.smt2(rc_per_path_invariant),bug-04-118.smt2,04B.2-over-elim-closure.smt2,04B.2-cross-class-uafall UNSAT (results.json) → the proven calculus admits no path-sensitive leak/double-free, so each cell’s AOT failure is a PREDICATE-STACK residual (still owns real RcDec until §09.2) dissolving at §09 retirement. CURE = VERIFICATION-ONLY: NO production dec-add (a manual additive BurdenDec double-counts the already-emitted last-use dec → VF-1 net=-1 → real double-free after §09.2; the a07 dead-end12→190+ decisions/07 §3 rows 7a-c29→74×3 prove the reclassification regression). Added one §07.3-grain regression pin —burden_lower/tests.rs::value_heap_mixed_variant_emits_dec_only_for_heap_field(+test_utils::registered_struct_value_heap_mixedfixture) — verifying a Value/HeapType-mixed variant emits exactly one whole-var BurdenDec covering the str field with zero per-field op for the int Value field; ori_arc 1548/0 green debug. The 10 named cells exist asassert_aot_successAOT pins in the 2322/16 §09-coupled cohort; class_covered for sum-payload/recursive-types/Value-HeapType-mixed anchored §09.4 (unobservable during coexistence per §07.1/§07.2); recursive-types + Value/HeapType-mixed.oricorpus authored at §07.5A. All §07.3 work ADDITIVE; nocollect_all_borrowed_defs/ borrow-classification edit (decisions/07 §3). Anchored to04B.2-under-elim.smt2UNSAT + LEDGER §B.2/§B.3 + §07.2 HISTORY 2026-06-03. -
2026-06-03 — §07.2 verify-first audit: higher_order ×2 classification corrected (over-elim, not under-emission). The §07.2 task #2 +
decisions/07 §5line 94 buckethigher_order::{test_hof_closure_capture_in_loop, test_hof_make_predicate}as UNDER-emission (Model-B facet 2 — “burden-emit the captured value’s own dec at scope exit”). The precise SMT counterexamplecompiler_repo/aims-proof/proofs/10-counterexample/04B.2-over-elim-closure.smt2classifies the SAME 2 cells as OVER-elim closure-env double-free (ori_rc_dec called on already-freed): PartialApply capturesv(TF-7/TF-13) → RcInc + scope-exit RcDec; the predicate-stack elimination drops the capture-side inc but NOT the paired dec → unbalanced → double-free. Proof verdict UNSAT (per arc.md §Debugging, proof = realization-semantics SSOT): the PROVEN burden calculus does NOT admit this — DP-2 gates SUPPLEMENTARY decs only, terminal RL-2 decs own balance (P2), so the burden trivial-emit baseline (balanced BurdenInc+BurdenDec for the capture) + DP-2/DP-3 elimination over the balanced baseline is correct by construction. CURE CORRECTION: §07.2’s higher_order ×2 cure is NOT a manual under-emission dec-add (would worsen the double-free) — it is the burden-migration VERIFICATION that closure-capture emission stays balanced (the §07.1 verify-first-additive pattern: no production dec-add; additive matrix tests + class_covered anchored §09.4). These cells are §09-COUPLED (the over-elim is a predicate-stack bug dissolving at §09 retirement). Anchored to04B.2-over-elim-closure.smt2+decisions/07 §5. Does NOT touch the borrow classification (decisions/07 §3). -
2026-06-03 — §07.1 verify-first audit + scope correction (autopilot execution). A verify-first audit (Opus, read-only) of §07.1 established: (1) checkbox 1 is ALREADY-SATISFIED at the implementation level — the Phase-5 burden walk (
emit_burden_ops→collect_owned_burdens,lower/burden_lower/mod.rs:424) is VAR-INDEXED overfunc.var_types, so every apply-alias-class member is structurally visited; no production code change needed. (2) checkbox 2 was mis-scoped —class_coveredreporting apply-alias classes covered is UNOBSERVABLE during §07 coexistence (populate_class_coveredatpost_convergence.rs:46runs Step 4 and short-circuits on emptyburden_emitted, whichemit_burden_opsfills at Step 4b strictly after;decide.rs:65-77confirms the set stays empty until §09.2). Restated checkbox 2 to the §07-era-observable property (burden_emitted ⊇ apply-alias members) and anchored theclass_covered = trueassertion at §09.4. (3) checkbox 3 scoped to theApplyAliasSourceshape × element-type matrix (Direct / Project / Conditional / Wrapped × str / [int] / Option/ closure / struct) with dual-backend parity + ORI_CHECK_LEAKS+ORI_DISABLE_BURDEN_OPScontrol dimensions. All §07.1 work is ADDITIVE (verification test + fixtures); nocollect_all_borrowed_defs/ borrow-classification edits (decisions/07 §3). The audit independently re-confirmed the round-2 codex-F1 cure (class_covered measured post-Step-4b). -
2026-05-30 — Folded BUG-04-123’s 14 under-emission cells into §07 (plan reframe per user directive). The under-emission half of BUG-04-123 (Model-B facet 2 — a sum payload moved out of a consumed container needs its own dec at scope exit) lands in 07.3 (sum-payload: generics forwarders +
for_yield_option+borrow_independence+aims_burden_alias+aims_interactions-h12) + 07.2 (higher_orderclosure-capture). The cure is ADDITIVE (emit the missing payload dec) and MUST NOT touch the borrow classification — 3collect_all_borrowed_defsreclassification attempts each regressed 29 -> 74 (decisions/07 §3 rows 7a-c, §4.5).decisions/07is the SSOT for the rule-out catalogue. BUG-04-123 absorbed to00-overview.mdabsorbed_bugs[]; the over-emission half is §03A.3. -
2026-06-03 — Autopilot auto-cure: review_plan_redispatch_loop reset_lost_dispatch (autopilot_run_id=0bd4550edc3c4ced9d32e21b9c04a43c); chain log recorded a phantom /review-plan dispatch but section frontmatter showed zero review evidence; chain counter reset and /review-plan re-dispatched (per state-discipline.md §4 Hard-abort terminal-state semantics + skill-control-contract.md §Autopilot Mode unified hook-failure continuation clause).
-
2026-06-03 — Stale
review_pipeline:marker cleared by /continue-roadmap orchestrator: marker carriedstage: ?,next_step: ?,updated: ?. Per /review-plan SKILL.md §Step 1a stale-marker rule (reviewed: false+ marker present → STALE by definition), marker invalid; prior diagnosis preserved here for traceability. Cure rooted inscripts/plan_orchestrator/markers.py:clear_stale_marker_if_unreviewed. -
2026-06-03 — /review-plan Step 5 editor split co-bundled subsections (in-place re-scope, no new sibling sections). Per the reviewer blind-spots workplan + the design_decision (splits stay within §07’s bounded value-shape-coverage scope; none independently-workable as a sibling per routing.md §4): §07.3 “Sum-payload extraction + jumpargs coverage” split into §07.3 (sum-payload extraction + BUG-04-123 14-cell under-emission cure) + §07.3A (jumpargs block-boundary ownership-transfer coverage); §07.5 “Regression test corpus + additional shape coverage” split into §07.5 (regression re-verification gate) + §07.5A (additional-shape test authoring). Added explicit class_covered tasks for recursive-types (§07.3), Value/HeapType-mixed (§07.3), Drop-trait-collision (§07.4) classes; declared the BUG-04-123 14-cell under-emission cure cells in success_criteria. Gated the §07.4 unwind_cleanup migration on the class_covered handshake for the unwind-path classes. Moved the INV-19 transitive-consume justification out of success_criteria into the body Depends on: note (transitive-consume meaning preserved: §03/§04B are transitive INPUTS reachable through the §06 linear-chain predecessor, NOT additional DAG predecessors;
depends_on: ['06']single-predecessor intact).