RC Integrity: Leak-Free Codegen & Matrix Regression Guard
5 sections
Overview
Eliminate all memory leaks in AOT-compiled Ori programs, harden the test infrastructure to detect leaks automatically, expand code journey coverage to exercise leak-prone patterns, and build matrix regression tests that narrow the band of acceptable behavior — making it progressively harder for future work to introduce regressions as the compiler grows in complexity.
Completed
5 sections
Tooling — Leak Detection Infrastructure
Every AOT binary checks for leaks at exit. test-all.sh fails on leaked memory. No silent leak passes.
Fix All Pre-Existing Leaks
All 1317 AOT tests pass with ORI_CHECK_LEAKS=1 — zero leaked allocations in any test
Code Journeys — Expanded Coverage
Add journeys covering heap-typed loop reassignment, nested RC structures, and COW patterns — all scoring 10/10
Matrix Testing — Regression Guard
Combinatorial test matrix covering value-type × operation × context — makes regressions progressively harder to introduce
Verification & Merge Gate
Zero leaks, zero regressions, all 20 journeys correct, all matrix tests green — branch merge-ready