Skip to content

fix: repeat memoised decoder calls and refuse a thrown call that touched the memo - #489

Merged
Sorte1 merged 5 commits into
mainfrom
fix/ox3-c4
Nov 22, 2026
Merged

Sorte1 merged 5 commits into
mainfrom
fix/ox3-c4

Conversation

@Sorte1

@Sorte1 Sorte1 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Fixes F1, F2 and P1 from review r9 (#484's thrown-call retry).

  • A memoised unit now runs each decoder call twice. The second run takes the hit path and must return the same value without throwing. Before this, a call site that ran only once never exercised the hit path, so a hit that throws or returns something else was inlined as the miss value (P1, and F1 when there are two call sites).
  • A monitored decoder invocation that throws after it read or stored a memo entry is now a state violation. A violation in the first pass refuses the unit; it is no longer retried with the thrown calls skipped (F2, and the F1 path).
  • A throw on the miss path before any memo write is still skipped and retried, so the rnd022-m3--control and rnd031-n3--empty-log gains from fix: leave a decoder call that throws undecoded and decode the rest of its unit #484 stay.

Rows: 7 in obfuscator_sweep_rows.rs, plus 2 ref-repeat rows with a new mutant in decoder_template_sabotage. The full sweep shows no verdict change in either lane. Krunker output is byte-identical in both lanes, and the obfuscator BASELINEs are unchanged.

…touched the memo

A stateful decoder's hit path was never run for a call site seen once, so a
hit that throws or returns another value was inlined as the miss value. Each
call of a memoised unit now runs twice and must return the same value. A
decoder invocation that ends in a throw after it read or stored a memo entry
is a state violation, and a violation in the first pass now refuses the unit
instead of retrying it with the thrown calls skipped.
…t need the repeat

The prefix and miss-result rows are now also caught by the repeated call, so
their mutants drop the repeat too.
@Sorte1
Sorte1 merged commit 0aa7352 into main Nov 22, 2026
9 checks passed
@Sorte1
Sorte1 deleted the fix/ox3-c4 branch November 22, 2026 02:30

This branch was successfully deployed

1 active deployment
preview — de5d284b Deployed Nov 22, 2026 by Sorte1 via deploy #1429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant