Skip to content

component-test-js: ship the jco-transpile CLI wrapper as a bin; export the shared runner glue (import binding, suite-name reconciliation) #58

Description

@lann

Continuation of #5's "one harness for every runner": the case loop moved upstream, but three categories of glue are still copied per consumer (umbrella on #14):

  1. scripts/jco-transpile.mjs — three copies (webcrypto 76 ln, websocket 78, webrtc 84; pairwise diffs of 8 lines), existing only because @bytecodealliance/jco-transpile publishes the library without the CLI. Ship it as a bin of @polymorph/component-test-js (npx component-test-jco-transpile transpile … -I async|--async-mode jspi --map … -o …), supporting both option styles currently in use.
  2. Import binding — websocket and webrtc conformance/driver-ct/jco/harness.mjs carry a near-identical bindImports/envInterface pair (bind both bare and versioned wasi 0.2 keys over the preview2-shim, explicit environment interface). Export it, parameterized on the SUT/extra imports.
  3. Suite-name reconciliation — every runner copy does suite.replaceAll("-","_") (lockfile identity is the wasm file stem while packages are kebab-case). That rule is harness-core knowledge and belongs next to envelope()/inventoryLookup(), not in consumers.

Explicitly out of scope: the full node/browser driver layer (worker pools vs sequential vs child-process two-party) — tracked as a design issue, since the three topologies differ for cause and a fourth consumer (tls, pending lann/jco#34/#35) is coming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolingCLI, lockfiles, composition helpers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions