Section 05: Test Corpus + Parity + Error Cases
Goal
See frontmatter (Proposal Phase 5). Comprehensive matrix beyond the per-section focused tests, plus the rosetta-dogfood regression that surfaced BUG-04-129.
05.1 Spec Test Corpus + Dual-Execution Parity + Error Cases
- Positive spec corpus in
tests/spec/expressions/+tests/spec/traits/index_set/: simple index, nested index, field, mixed chains (field-then-index + index-then-field), deep mixed chain, map insert + replace,[T, max N], compound (all operators), functionalupdatedcalls. Each asserts a computed value (no tautologies). - Error-case corpus in
tests/compile-fail/index_assignment_errors.ori:#compile_fail(code:...)for immutable binding, parameter, loop variable,strno-IndexSet, invalid field, value mismatch, key mismatch — exact E-codes from section-03. - Dual-execution parity: run every new spec test through interpreter + LLVM; pin identical results; debug + release.
- Side-effect-once:
arr[f()] += 1counted-f()test at corpus level. - Rosetta regression:
compiler_repo/tests/run-pass/rosetta/001_100_doors/ori/simulate()(doors[idx] = !doors[idx]) compiles + runs correct on AOT; checksum matches;ORI_CHECK_LEAKS=1zero leaks. This is the BUG-04-129 origin case. - Verify:
./test-all.shgreen;cargo st tests/spec/expressions/ tests/spec/traits/index_set/.
Intelligence Reconnaissance
2026-06-01 — feature-mode scaffold; proposal is the research artifact.
scripts/intel-query.sh file-symbols "tests/spec/expressions" --repo ori— existing coverage, avoid duplication[ori:tests/spec/expressions/].scripts/intel-query.sh similar "test_harness" --repo rust,swift,zig --limit 5— matrix + dual-execution test prior art (pertests.md).- Rosetta origin case
[ori:compiler_repo/tests/run-pass/rosetta/001_100_doors/](the BUG-04-129 trigger).
Spec References
- Proposal §Implementation Plan Phase 5, §Error Cases.
tests.md§Matrix Testing Rule + §Negative Testing Protocol + §Cross-Phase Verification (dual-execution parity).- BUG-04-129 (rosetta-dogfood origin).
Tests
All test files named above; this section is the corpus owner (sections 01-03 contribute focused subsets).