You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codegen: Async CPS table-miss silently falls back to synchronous lowering — should fail loudly #556
When a function's effect row contains Async but its body shape isn't recognised by the CPS transform (e.g. an async call not in let-binding head position, like is_ok(get(u))), codegen silently falls back to the pre-existing synchronous lowering (codegen.ml:2000-2010; effect_sites.ml:186-189, the self-described "sound table-miss path").
The result is not a crash — it is a silent wrong value: the Thenable handle i32 flows onward as if it were the resolved value.
Why "zero regression" isn't enough
ADR-016 accepted the fallback as zero-regression vs the pre-CPS world, but post-CPS the contract changed: a declared / Async row now promises async lowering. A shape miss should be a loud UnsupportedFeature (mirroring codegen_gc.ml's fencing discipline) or the shape table should be extended — silent wrong-value is the worst of the options.
Requested
Convert the table-miss path to a loud failure naming the unrecognised shape, OR document+test the exact accepted-shape grammar and reject everything else.
Add a regression test for one known-missed shape (is_ok(get(u))).
Related: the general handler-dispatch tracking issue (same silent-vs-loud principle, filed same day).
Activity
docs: truth-refresh after CORE-01 closure + 2026-06-11 survey — matri…
docs: truth-refresh after CORE-01 closure + 2026-06-11 survey — matri…
docs: truth-refresh after CORE-01 closure + 2026-06-11 survey (matrix…
docs: consolidated session overview — migration corpus + string/float…
merge: integrate main (#556 async fence) into #555 resume-soundness b…
docs: author the proof-needs inventory (P-/F-/K- obligation series) (#…
docs: make soundness status a single, test-anchored source of truth (#…