host: doc — SPA WASM bundle rebuild attempt failed (Char.chr crash), reverted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 21:00:25 +00:00
parent dbcbc39ebe
commit 4df4de7f79

View File

@@ -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`