diff --git a/plans/host-spa.md b/plans/host-spa.md index c7533fd9..67d19698 100644 --- a/plans/host-spa.md +++ b/plans/host-spa.md @@ -43,6 +43,20 @@ graceful degradation to plain server-rendered pages with no JS. WASM kernel (sx.rose-ash.com avoids this because its Docker image ships a consistent bundle and it navigates via client-router page-routes, not boost). +## Rebuild attempt (2026-06-28) — FAILED, reverted + +Tried it: `dune build browser/sx_browser.bc.wasm.js` succeeded (with many +`integer-overflow` warnings — "generated code might be incorrect"), and +`node hosts/ocaml/browser/compile-modules.js shared/static/wasm` recompiled all +35 `.sxbc` cleanly. But the freshly-built kernel **crashes on init** in the +browser: `Fatal error: exception Invalid_argument("Char.chr")` — so `SxKernel` +never initialises (worse than before). The integer-overflow truncation during +wasm codegen is the likely culprit (a SHA/char constant). Reverted +`shared/static/wasm/` to the main-worktree bundle (which boots cleanly — +verified SxKernel + data-sx-ready). So a naive in-worktree rebuild is NOT the +fix; the wasm build itself needs investigating (wasm_of_ocaml version? the merged +sx-vm-extensions/resolver changes interacting with codegen?). + ## Next step — rebuild a consistent WASM bundle `scripts/sx-build-all.sh` does: build the browser wasm target → sync web `.sx`