Tri-runtime parity

ONE dist/isomorphic/module.wasm, THREE runtimes, IDENTICAL behavior:

  1. browser — real headless Chrome behind COOP/COEP (cross-origin isolated, SAB-capable), running the SDK browser WASI shim. Never jsdom — jsdom masks Illegal-invocation and threading realities.
  2. wasmedge — a native WasmEdge binary, version-locked to the pin.
  3. docker-wasmedge — a pinned Docker WasmEdge container.

Cross-runtime divergence is a P1 SDK defect, never a "platform quirk". "Works in X" is inadmissible as module evidence; module-touching work needs a parity receipt from this harness.

Running

bash
space-data-module parity \
  --wasm ./dist/isomorphic/module.wasm \
  --fixture ./fixtures/parity/sgp4-command.json \
  [--lanes browser,wasmedge,docker-wasmedge] [--json] [--timeout-sec N] \
  [--wasmedge-binary <bin>] [--chrome-binary <bin>] [--docker-platform <p>]

Programmatic API (Node): runParityHarness, diffParityRuns, normalizeParityFixture, loadWasmEdgePin from space-data-module-sdk/testing.

CI wiring in this repo:

The WasmEdge pin: ONE place

src/testing/wasmedgePin.json is the single source of truth:

json
{ "wasmedgeVersion": "0.16.4", "dockerImageRepository": "space-data-module-sdk/parity-wasmedge" }

Host and container WasmEdge versions therefore pin and bump TOGETHER by editing one string. Keep the pin aligned with the node host's embedded runtime (space-data-network scripts/install-wasmedge.sh, currently 0.16.4 — the verified runtime for the libwasmedge atomic-wait fixes).

Determinism contract

Every lane receives EXACTLY the same guest-observable inputs:

Fixtures

json
{
  "name": "sgp4-command-parity",
  "threadEnvVar": "SDM_PARITY_THREADS",
  "threadCounts": [1, 2, 4, 8],
  "cases": [
    {
      "id": "ingest-omm",
      "expect": "ok",
      "request": {
        "methodId": "ingest_omm",
        "inputs": [{ "portId": "omm", "payloadFile": "omm-25544.fb",
                     "typeRef": { "schemaName": "orbpro.sds.omm", "fileIdentifier": "$OMM" } }]
      }
    },
    { "id": "malformed-stdin", "stdinUtf8": "not a PIV frame" }
  ]
}

Scope and current limits (v1)

SDN Stack

Connected sites