fix: bump ordeal 0.9.1 → 0.14.0 — rem_s can now route through trap_gate#290
Open
avrabe wants to merge 2 commits into
Open
fix: bump ordeal 0.9.1 → 0.14.0 — rem_s can now route through trap_gate#290avrabe wants to merge 2 commits into
avrabe wants to merge 2 commits into
Conversation
Contributor
Author
|
CI note: the two non-green checks are not caused by this PR. |
Completes the consumer side of ordeal#84 (= ordeal#72): ordeal < 0.10.0's
`trap_div(DivOp::RemS)` wrongly included the `INT_MIN/-1` overflow clause,
so this gate falsely REJECTED the sound `rem_s(INT_MIN,-1) -> 0` fold as a
phantom trap mismatch — which is why rem_s stayed on the per-pass static
guard. ordeal fixed it in v0.10.0 (spec-grounded, mutation-checked); this
bump picks it up (0.14.0 current).
The un-pinning test is MUTATION-CHECKED against the old pin, not asserted:
- ordeal 0.14.0: rem_s_int_min_neg1_fold_is_accepted ... ok
- ordeal 0.9.1: FAILED — "got RejectCounterexample([])"
(the phantom mismatch, reproduced exactly)
Plus the dual guard: a WRONG-value rem_s fold (-> 1 instead of 0) is still
rejected, so accepting the sound fold did not wave rem_s folds through.
Also corrects the div_define doc comment, which described 0.9.1's bug as
spec ("INT_MIN/-1 overflow for the signed ops" — it is div_s ONLY; WASM
defines rem_s(INT_MIN,-1) = 0).
Full loom-core suite with the verification feature: 655 tests, 0 failed.
API compatible across ordeal 0.10-0.14 (no code changes needed beyond
docs+tests).
NOT addressed here: #288's systemic finding that trap_gate is never called
by any pass. This bump removes the rem_s blocker for that wiring, but the
wiring itself (a per-fold gate call inside constant_folding, with its cost
and caching questions) is its own design effort — see #288 comment.
Refs: #288
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBJ6kdJ16E3hnsBbq9Lwf1
…e backstop Completes the consumer side of ordeal#84: ordeal < 0.10.0's trap_div(RemS) wrongly carried the div_s INT_MIN/-1 overflow disjunct, so the trap-gate falsely rejected the sound rem_s(INT_MIN,-1) -> 0 fold and rem_s stayed on its static #273 guard. ordeal 0.14.0 drops that disjunct for remainder. - bump ordeal 0.9.1 -> 0.14.0 (loom-core) - route I32RemS/I64RemS in trap_backstop::div_meta so rem_s const-folds are now trap-gated like the other three div/rem kinds (all four covered) - remove the now-false pin test rem_s_int_min_is_over_approximated_rejected (it asserted the 0.9.1 over-approximation; superseded by the positive un-pinning test rem_s_int_min_neg1_fold_is_accepted + its wrong-value dual) - update trap_backstop module + div_meta docs (rem_s: gap -> routed) Verification suite green (loom-core --features verification --lib): 481 passed, 0 failed. rem_s un-pin + wrong-value dual + #273/#274 static-guard tests all ok. Refs #279
avrabe
force-pushed
the
fix/ordeal-0.14-rem-s-gate
branch
from
July 22, 2026 04:07
ac365cc to
dd15d85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the consumer side of ordeal#84 (= ordeal#72), and removes one blocker from #288.
The gap
ordeal < 0.10.0's
trap_div(DivOp::RemS)wrongly included theINT_MIN/-1overflow clause (WASM Core §4.4.1: onlyidiv_straps there;irem_s(INT_MIN, -1) = 0, defined). So this gate falsely rejected the soundrem_s(INT_MIN,-1) → 0fold as a phantom trap mismatch — which is whyrem_sstayed on the per-pass static guard. ordeal fixed it in v0.10.0; this picks it up (0.14.0 current).The un-pinning test is mutation-checked, not asserted
That reproduces the historical false rejection exactly. The dual guard is included: a wrong-value rem_s fold (
→ 1instead of0) is still rejected, so accepting the sound fold did not wave rem_s folds through.Also fixed
div_define's doc comment described 0.9.1's bug as spec ("INT_MIN/-1 overflow for the signed ops" — it'sdiv_sonly).Gate
Full loom-core suite with the
verificationfeature: 655 tests, 0 failed. API compatible across ordeal 0.10–0.14 — no code changes needed beyond docs + tests.What this does NOT do
#288's systemic finding stands:
trap_gateis still never called by any pass (confirmed onad39d1c— the only external reference is a test). This bump removes the rem_s blocker for that wiring; the wiring itself — a per-fold gate call insideconstant_folding, with its cost/caching design questions — is its own effort and shouldn't ride along in a dependency bump.🤖 Generated with Claude Code
https://claude.ai/code/session_01EBJ6kdJ16E3hnsBbq9Lwf1