Repository navigation
Phase 5: prove the backend on real corpus programs #78
Copy link
Copy link
Open
2 / 42 of 4 issues completedLabels
Milestone
Description
Why this phase
The backend rows (BE-01..BE-28) are the parts of the matrix with no official-suite evidence, because no harness has ever compiled and run a corpus passing file. Phase 1 builds that harness; this phase uses it.
The backend is not the bottleneck in most cases — the frontend is. What the backend needs is proof that a representation decision holds for real programs, not more representations. BE-27 currently has vertical execution tests for the implemented slice and nothing else.
Sub-issues
Tracked as children of this epic. Known gaps at planning time:
- Backend: Wasmtime execution harness for synthesized WIT ABI fixtures #73 — a Wasmtime harness that executes synthesized WIT aggregate fixtures. All 20 fixtures under
crates/psrs-backend/src/mir/indirect_tests/aggregate/(result, option, variant, nested payloads, flags, non-byte list,list<record>, resource-in-result, large return area, indirect parameter record) currently end atvalidate_all. Onlylist<tuple<string,string>>executes, because it is the one shape reachable from source. The blocker is thatmir/gc_tests'run_gcis private, pinned to the real WASI command world, and the fixtures import a synthesizedwasi:io/streamsfunction with no host implementation;wasm/lower/post_return/tests.rsshows the pattern that works for an import-free fixture world. - BE-13..BE-16 — cover the remaining MIR instruction forms and pass the L6/M7 gate with per-operation validation.
- BE-05..BE-10 — broaden source-path coverage for enum tags, field-bearing ADTs, newtype erasure, parameterized ADTs, records, and arrays past the cases the acceptance records cover.
- BE-01, BE-02, BE-03 — general control flow beyond enum-tag
Switch, remaining partial applications, recursive and mixed-field layouts.
Gate
Every in-scope passing file for an implemented backend feature compiles, validates, and runs with the expected observable result, and the runtime scoreboard reports per-file agreement.
References
docs/design/D-04-suite-roadmap.md— M7, BE matrix, CC/MIR crosswalkdocs/implementation/backend/— topic acceptance recordscrates/psrs-backend/src/mir/gc_tests/mod.rs— the existing execution harness and its limits
Validation
cargo fmt --all --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
PSRS_REQUIRE_WASMTIME=1 cargo test --workspace
Reactions are currently unavailable
Activity
Keep quantified effect wrappers and import diagnostics on their source
Lower Effect Unit command entries through the existing closure
Keep quantified effect wrappers and import diagnostics on their source
biuld commentedon Oct 16, 2026
The runtime scoreboard now has a full-board number. On 2026-10-17, at
886cd82cand Wasmtime 49.0.3, L6/M7 is 273/413 (was 164/413). All 273 agreeing cases exit 0, and none trap.The other 140 are 69 library-foreign link failures, 34 P5 typecheck, 13 P8 closure conversion, 11 P5 kind check, 6 P3, 4 P0, one P7 command-runner mismatch (
Sequence.purs), one 10-second timeout (2288.purs), andBigFunction.purs, which the OS kills before a diagnostic. The phase stays open because L6 is not complete.Recorded by #145.