Skip to content

test(wasm): Tier B headless smoke — run the REAL wasm-visor blob under Node (no browser) - #3638

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/wasm-tier-b-headless-smoke
Jul 30, 2026
Merged

test(wasm): Tier B headless smoke — run the REAL wasm-visor blob under Node (no browser)#3638
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/wasm-tier-b-headless-smoke

Conversation

@0pcom

@0pcom 0pcom commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Tier B of the wasm-visor test plan: the compile-check lane can't catch runtime-only breakage in the browser edge (boot-glue regressions, carrier selection, /api dispatch). This job executes the actual compiled js/wasm binary headlessly:

  • scripts/wasm-headless/localdmsg — self-contained loopback dmsg server (unified TCP+WS, in-memory discovery); prints SEEDPK/SEEDWS/READY, serves until stdin closes.
  • scripts/wasm-headless/harness.mjs — Node ≥22 (global WebSocket is the only browser global the critical path needs) runs Go's wasm_exec.js + wasm-visor.wasm, calls skywireVisor.boot against the loopback seed, and asserts boot → ws dmsg session → dmsg_connected → in-wasm hypervisor /api core answering.
  • make test-wasm-headless + a new wasm-headless CI job (setup-go + node 22).

Validated locally: the real blob boots under Node, joins dmsg over ws, starts the in-process skychat app, and serves /apiPASS in ~30s, twice.

Together with #3637 (Tier A native harness + wss deployment probe) this gives the wasm visor a layered regression gate: native logic tests (fast, gating) → real-blob runtime smoke (this) → the live-deployment wss probe (scheduled).

…r Node (no browser)

The compile-check lane can't catch runtime-only breakage in the browser edge
(boot-glue regressions, carrier selection, /api dispatch). This runs the
actual compiled js/wasm binary headlessly:

- scripts/wasm-headless/localdmsg: self-contained loopback dmsg server
  (unified TCP+WS, in-memory discovery) printing SEEDPK/SEEDWS/READY and
  serving until stdin closes.
- scripts/wasm-headless/harness.mjs: Node (>=22, global WebSocket — the ONLY
  browser global the critical path needs) executes Go's wasm_exec.js +
  build/wasm-visor-go/wasm-visor.wasm, calls skywireVisor.boot against the
  loopback seed, and asserts boot → ws dmsg session → dmsg_connected → the
  in-wasm hypervisor /api core answering (/api/about).
- scripts/wasm-headless/run.sh + `make test-wasm-headless`: build-if-stale,
  start helper, run harness, reap deterministically.
- .github/workflows/test.yml: new `wasm-headless` job (setup-go + node 22).

Validated locally: the real blob boots under Node, joins dmsg over ws, starts
the in-process skychat app, and serves /api — PASS in ~30s.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzckVqHX624RpdEWcvVosA
@0pcom
0pcom merged commit 8abeb45 into skycoin:develop Jul 30, 2026
10 of 11 checks passed
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