fix(compiler): lower multiple switch breaks - #173
Conversation
Teakowa
left a comment
There was a problem hiding this comment.
Major — synthetic/issue-47-switch-multiple-break is now declared a match but uses comparison: compiler-contract. The compatibility runner treats that path as accepted-gap and does not compare normalized output or semantic WIR, while the new regression test only asserts this patch's nested-If shape and offset literal. #172 requires observable-semantic evidence and explicitly forbids weakening the compatibility/conformance baseline. Add equivalent independent semantic evidence that can fail when case selection, case-local break, fallthrough, or default behavior is wrong; do not use compiler-contract as the evidence for a supported match.
Major — #172's ablation AC requires disabling/simplifying the shared switch-exit handling to make both the minimized regression and the pinned OW1 regression evidence fail again. The PR records only the minimized regression ablation. Run and record the same ablation against the pinned Overwatch-AI-PVE dispatcher/provider compile evidence.
Teakowa
left a comment
There was a problem hiding this comment.
Major — the previous semantic-evidence finding is only partially resolved. semantic-oracle.json is introduced in the same implementation patch and its canonical shape/offsets (Array(6, 0, 2, 5) plus nested If) are then used as the semantic-wir expectation. That does not constitute independent verification under the project evidence policy; nothing in the current patch independently derives this normalization from the preserved pinned OverPy oracle/source rather than from the new native lowering. Ground the semantic expectation in independently established external/provenance evidence or an independent semantic/property check that can disagree with this implementation, then keep the semantic-wir gate.
Major — latest head CI is red in Compiler compatibility gate during Run compatibility harness tests. This follow-up changes compatibility/support-matrix.json but not the packaged crates/opy-rs/support-matrix.json; the existing test_packaged_matrix_matches_canonical_matrix byte-equality contract therefore fails. Sync the packaged matrix (or revert the canonical matrix edit if it is not needed) and restore the gate.
Summary
breakstatements through nested canonical WIR shared-exit layersValidation
cargo test --workspace— 371 passedcargo clippy --workspace --all-targets --all-features -- -D warningspython3 -m unittest discover -s compatibility/tests— 35 passedsynthetic/issue-47-switch-multiple-breakhassemantic-wir: matchOverwatch-AI-PVE@e0c0721e827fb60ff9ed9c48fd78221ed7d9ebfcproviderlpp/compilereaches the next owner blocker:catalog-validation(filteredArrayexpectsArray, gotPlayer)Review follow-up
pinned_overpy_switch_action_tracetest independently parses the pinned OverPy action stream and executes the native WIR dispatch, so an incorrect lowering can disagree with the semantic shape file.unsupported-integration-surface: multiple switch breaks with later reachable actions require canonical switch targets.Stacked on #171.
Fixes #172