diff --git a/docs/SOUNDNESS.adoc b/docs/SOUNDNESS.adoc index 21bccb16..151a45a0 100644 --- a/docs/SOUNDNESS.adoc +++ b/docs/SOUNDNESS.adoc @@ -4,7 +4,7 @@ // Freshness stamp — a real main-ancestor commit (survives squash-merge); advance // it (and --reseal) in any change that touches a soundness path. See "Keeping // this honest" and tools/check-soundness-ledger.sh (property 4). -:ground-truth-sha: 84eca60 +:ground-truth-sha: 464f7c6 :ground-truth-date: 2026-12-01 :stamp-verified-by: tools/check-soundness-ledger.sh :toc: macro @@ -311,6 +311,26 @@ write into the literal region. Layout invariant: `test_wasm_heap_literals_intact_after_alloc` — run under Bun's WASI; `test_wasm_heap_exhaustion_traps`); `lib/codegen.ml` `memory_layout_of_datas` / `check_memory_layout` + +| #833 +| The tree-walking interpreter — the oracle the compiled backends are compared +against — runs the programs the checker accepts and agrees with Bun-ESM on +them. It used to refuse a function that calls itself, one that calls a later +declaration, any `let mut` / `const mut` assignment, and any use of an +imported `Some` / `None` / `Ok` / `Err` (all loud). One shape was *silent*: an +early `return` evaluated its operand and carried on, so +`if c { return 1; } 2` yielded `2`. (The assignment arm also ignored a +compound operator — `a += 5` would have stored `5` — which a +`let mut` program could not reach, because the assignment failed first.) `affinescript eval` also type-checked +with its own fold of `Typecheck.check_decl`, without the signature +pre-registration of `Typecheck.check_program`, so it rejected forward and +mutual references that `check` and `compile` accept; it now calls +`check_program`. Not changed: `eval` still does not run the borrow checker +(`check` and `compile` do), so it accepts programs they reject. +| `fixed` +| `test/test_interp_eval.ml` (18 cases: each program passes the full frontend, +then its interpreter output is compared with the expected lines and with the +Bun-ESM output of the same program; all 18 fail on `4248912`). |=== == Still open — read before claiming "sound" diff --git a/tools/soundness-anchors.sha256 b/tools/soundness-anchors.sha256 index 2d788c56..8d9a6543 100644 --- a/tools/soundness-anchors.sha256 +++ b/tools/soundness-anchors.sha256 @@ -9,7 +9,6 @@ 20e73d88738c8fd075f81a36803554f92fa4ee53f71e33fa6759eae07c6e70f4 suite:test/test_intrinsic_shadow.ml 2bbd1b989fd0097530eede3e5230258e0e1092271a23ff7dff20cca65c0e612e suite:test/test_wasm_call_resolution.ml 2dfe36a21983a7dfb7ffa1157f7ddec9865a531a92682976b8fd677e4825e78d test:test_801_impl_methods_refused -3b74c20f201d0d53c2fbab5582a681d3dfc3cf978a0aea676ecc6400087452d9 suite:test/test_intrinsic_shadow.ml 45eb0f3aa5f643afbd003248998dd5a046688418647b491e0f2d4bb55fcbd0f2 test:test_wasm_heap_exhaustion_traps 546939eaa3c64c82edd23da0a3ba7f74bcf7378cfe1e426132dd1a9f8fd46050 test:test_801_transitive_public_and_const 5b84a4f71aa65f9aa9383e31c0cb624291c4f9d0de7cca4a0ea6a76fe85aea35 fixture:test/e2e/fixtures/handle_resume_nontail.affine