From 47e0156449e0cd6c760f4387e666f9d94f0a36cc Mon Sep 17 00:00:00 2001 From: Lann Martin Date: Fri, 21 Aug 2026 23:13:20 -0400 Subject: [PATCH] polyengine 0.3.0 (the deltic rename); @polymorph/webrtc-datachannels 0.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The engine renamed deltic -> polyengine (@deltic/* -> @polyengine/* on JSR) and cut 0.3.0; the runner core @polymorph/test cut 0.2.0. Full rename here: deltic-impl -> polyengine-impl, conformance/driver-ct/ deltic -> polyengine (incl. the browser subconfig), the pin/extract scripts, the Rust orchestrator's driver kinds (polyengine-deno/ polyengine-browser), targets*.toml ids and matrix docs. Pins: exact jsr:@polyengine/*@0.3.0 (conformance), caret ^0.3.0 in the published package (bumped 0.2.0 -> 0.3.0); @jsr/polymorph__test@0.2.0; all four locks regenerated. The Rust component-test-* pins bump to 38bfedf2 (the 0.2.0 release rev) per the bump-together contract, with conformance.yml action refs. Gates: polyengine-impl check + tests (13/13), driver-ct check + browser bundle, both pin gates, cargo check/test, build-suites/driver/composed, lock-check, run-composed (37/37) — green locally; network/browser legs to CI. --- .github/justfile | 10 +- .github/workflows/conformance.yml | 38 +++--- .github/workflows/copilot-setup-steps.yml | 2 +- .github/workflows/jsr-publish.yml | 4 +- AGENTS.md | 42 +++--- Cargo.lock | 24 ++-- Cargo.toml | 12 +- README.md | 20 +-- conformance/README.md | 10 +- .../deltic/browser/browser-bundle-entry.ts | 13 -- .../driver-ct/deltic/browser/deno.json | 13 -- .../driver-ct/deltic/browser/deno.lock | 41 ------ conformance/driver-ct/deltic/deno.json | 18 --- conformance/driver-ct/deltic/package.json | 10 -- conformance/driver-ct/matrix-interop.md | 14 +- conformance/driver-ct/matrix.md | 6 +- .../driver-ct/{deltic => polyengine}/.npmrc | 0 .../{deltic => polyengine}/README.md | 46 +++---- .../browser/browser-bundle-entry.ts | 13 ++ .../driver-ct/polyengine/browser/deno.json | 13 ++ .../driver-ct/polyengine/browser/deno.lock | 41 ++++++ .../browser/page-entry.ts | 8 +- .../{deltic => polyengine}/browser/stub.ts | 2 +- conformance/driver-ct/polyengine/deno.json | 18 +++ .../{deltic => polyengine}/deno.lock | 123 ++++++++---------- .../{deltic => polyengine}/package-lock.json | 12 +- conformance/driver-ct/polyengine/package.json | 10 ++ .../{deltic => polyengine}/run-browser.mjs | 28 ++-- .../driver-ct/{deltic => polyengine}/run.ts | 34 ++--- .../{deltic => polyengine}/signaling.ts | 8 +- conformance/driver-ct/src/main.rs | 20 +-- conformance/driver-ct/src/orchestrate.rs | 4 +- conformance/driver-ct/targets-interop.toml | 12 +- conformance/driver-ct/targets.toml | 10 +- conformance/justfile | 78 +++++------ deltic-impl/deno.json | 22 ---- examples/README.md | 2 +- examples/echo-demo/src/lib.rs | 2 +- justfile | 20 +-- {deltic-impl => polyengine-impl}/README.md | 30 ++--- polyengine-impl/deno.json | 22 ++++ {deltic-impl => polyengine-impl}/deno.lock | 16 +-- {deltic-impl => polyengine-impl}/src/types.ts | 2 +- .../src/webrtc.ts | 10 +- .../tests/webrtc_test.ts | 4 +- scripts/check-deltic-pin.sh | 31 ----- scripts/check-polyengine-pin.sh | 31 +++++ scripts/check-runner-js-pin.sh | 14 +- ...or.py => extract-polyengine-translator.py} | 14 +- scripts/setup.sh | 6 +- wasip3-impl/README.md | 2 +- wasip3-impl/src/lib.rs | 2 +- 52 files changed, 487 insertions(+), 500 deletions(-) delete mode 100644 conformance/driver-ct/deltic/browser/browser-bundle-entry.ts delete mode 100644 conformance/driver-ct/deltic/browser/deno.json delete mode 100644 conformance/driver-ct/deltic/browser/deno.lock delete mode 100644 conformance/driver-ct/deltic/deno.json delete mode 100644 conformance/driver-ct/deltic/package.json rename conformance/driver-ct/{deltic => polyengine}/.npmrc (100%) rename conformance/driver-ct/{deltic => polyengine}/README.md (56%) create mode 100644 conformance/driver-ct/polyengine/browser/browser-bundle-entry.ts create mode 100644 conformance/driver-ct/polyengine/browser/deno.json create mode 100644 conformance/driver-ct/polyengine/browser/deno.lock rename conformance/driver-ct/{deltic => polyengine}/browser/page-entry.ts (92%) rename conformance/driver-ct/{deltic => polyengine}/browser/stub.ts (84%) create mode 100644 conformance/driver-ct/polyengine/deno.json rename conformance/driver-ct/{deltic => polyengine}/deno.lock (83%) rename conformance/driver-ct/{deltic => polyengine}/package-lock.json (68%) create mode 100644 conformance/driver-ct/polyengine/package.json rename conformance/driver-ct/{deltic => polyengine}/run-browser.mjs (82%) rename conformance/driver-ct/{deltic => polyengine}/run.ts (83%) rename conformance/driver-ct/{deltic => polyengine}/signaling.ts (93%) delete mode 100644 deltic-impl/deno.json rename {deltic-impl => polyengine-impl}/README.md (55%) create mode 100644 polyengine-impl/deno.json rename {deltic-impl => polyengine-impl}/deno.lock (98%) rename {deltic-impl => polyengine-impl}/src/types.ts (97%) rename {deltic-impl => polyengine-impl}/src/webrtc.ts (99%) rename {deltic-impl => polyengine-impl}/tests/webrtc_test.ts (99%) delete mode 100755 scripts/check-deltic-pin.sh create mode 100755 scripts/check-polyengine-pin.sh rename scripts/{extract-deltic-translator.py => extract-polyengine-translator.py} (76%) diff --git a/.github/justfile b/.github/justfile index 76e1645..0d1ee5f 100644 --- a/.github/justfile +++ b/.github/justfile @@ -38,19 +38,19 @@ conformance-build: @just gha::_step conformance::build @just gha::_step conformance::_ct-tools -# The loopback targets (wasmtime, composed, deltic-deno, deltic-browser) +# The loopback targets (wasmtime, composed, polyengine-deno, polyengine-browser) # and the interop directions, aggregated against both committed # lockfiles, then gated against both committed matrices. In CI the # artifacts arrive prebuilt from the build job; locally -# `just gha::conformance-build` produces them. deltic-check needs only +# `just gha::conformance-build` produces them. polyengine-check needs only # Deno + network, so it rides this job too. conformance-matrix: @just gha::_step conformance::lock-check - @just gha::_step deltic-check + @just gha::_step polyengine-check @just gha::_step conformance::run-wasmtime @just gha::_step conformance::run-composed - @just gha::_step conformance::run-deltic - @just gha::_step conformance::run-deltic-browser + @just gha::_step conformance::run-polyengine + @just gha::_step conformance::run-polyengine-browser @just gha::_step conformance::run-interop @just gha::_step conformance::aggregate @just gha::_step conformance::matrix-check diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 7aad1a0..24dca48 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -9,7 +9,7 @@ name: Conformance # and cached — exactly once per run. # # The `matrix` job runs the loopback targets (wasmtime, composed, -# deltic-deno, deltic-browser — the full solo+pair suite each) and the +# polyengine-deno, polyengine-browser — the full solo+pair suite each) and the # interop directions (every implementation against the libwebrtc # reference peer in both orders, the reference self-pair, and the direct # implementation pairs — the pair-only suite), aggregates every stream @@ -64,7 +64,7 @@ jobs: # Owns the rev derivation, the rev-keyed tools cache, the # install, and the pins gate; conformance::_ct-tools recognizes # the stamped install and does not repeat it. - uses: polymorph-components/polymorph-test/actions/setup@b4444a25a22106ad4128549bdc9e579552e62210 + uses: polymorph-components/polymorph-test/actions/setup@38bfedf2b989522b82ddce5320fc1557a2f61461 with: tools: component-test-cli @@ -105,24 +105,24 @@ jobs: - name: Checkout code uses: actions/checkout@v5 - # The deltic-browser leg's page driver runs under Node (playwright + # The polyengine-browser leg's page driver runs under Node (playwright # against the runner image's Chrome; no engine flag anywhere). - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "24" cache: npm - cache-dependency-path: conformance/driver-ct/deltic/package-lock.json + cache-dependency-path: conformance/driver-ct/polyengine/package-lock.json - # The deltic legs run the suite runtime-linked — deltic-deno under - # stock Deno, deltic-browser inside Chromium — no engine flag (see - # conformance/driver-ct/deltic/README.md). - - name: Set up Deno (the deltic legs; stock, no flags) + # The polyengine legs run the suite runtime-linked — polyengine-deno under + # stock Deno, polyengine-browser inside Chromium — no engine flag (see + # conformance/driver-ct/polyengine/README.md). + - name: Set up Deno (the polyengine legs; stock, no flags) uses: denoland/setup-deno@v2 with: deno-version: "2.9.5" - # Runtime dependencies only (the deltic legs' module graphs and npm + # Runtime dependencies only (the polyengine legs' module graphs and npm # trees are materialized by their own just recipes). The netns lab # never runs in CI, so its apt packages are skipped. - name: Install dependencies @@ -149,22 +149,22 @@ jobs: # against the pin. - name: Publish the conformance matrix if: always() && hashFiles('conformance/driver-ct/results/*.jsonl') != '' - uses: polymorph-components/polymorph-test/actions/aggregate@b4444a25a22106ad4128549bdc9e579552e62210 + uses: polymorph-components/polymorph-test/actions/aggregate@38bfedf2b989522b82ddce5320fc1557a2f61461 with: lock: conformance/guest-ct/tests.lock manifest: conformance/driver-ct/targets.toml results: | wasmtime=conformance/driver-ct/results/wasmtime.jsonl composed=conformance/driver-ct/results/composed.jsonl - deltic-deno=conformance/driver-ct/results/deltic-deno.jsonl - deltic-browser=conformance/driver-ct/results/deltic-browser.jsonl + polyengine-deno=conformance/driver-ct/results/polyengine-deno.jsonl + polyengine-browser=conformance/driver-ct/results/polyengine-browser.jsonl summary-title: Conformance matrix cli: target/ct-tools/bin/component-test cargo-lock: Cargo.lock - name: Publish the interop conformance matrix if: always() && hashFiles('conformance/driver-ct/results/*.jsonl') != '' - uses: polymorph-components/polymorph-test/actions/aggregate@b4444a25a22106ad4128549bdc9e579552e62210 + uses: polymorph-components/polymorph-test/actions/aggregate@38bfedf2b989522b82ddce5320fc1557a2f61461 with: lock: conformance/guest-pair-ct/tests.lock manifest: conformance/driver-ct/targets-interop.toml @@ -172,14 +172,14 @@ jobs: reference=conformance/driver-ct/results/reference.jsonl wasmtime-x-reference=conformance/driver-ct/results/wasmtime-x-reference.jsonl reference-x-wasmtime=conformance/driver-ct/results/reference-x-wasmtime.jsonl - deltic-deno-x-reference=conformance/driver-ct/results/deltic-deno-x-reference.jsonl - reference-x-deltic-deno=conformance/driver-ct/results/reference-x-deltic-deno.jsonl - deltic-browser-x-reference=conformance/driver-ct/results/deltic-browser-x-reference.jsonl - reference-x-deltic-browser=conformance/driver-ct/results/reference-x-deltic-browser.jsonl + polyengine-deno-x-reference=conformance/driver-ct/results/polyengine-deno-x-reference.jsonl + reference-x-polyengine-deno=conformance/driver-ct/results/reference-x-polyengine-deno.jsonl + polyengine-browser-x-reference=conformance/driver-ct/results/polyengine-browser-x-reference.jsonl + reference-x-polyengine-browser=conformance/driver-ct/results/reference-x-polyengine-browser.jsonl wasip3-guest-x-reference=conformance/driver-ct/results/wasip3-guest-x-reference.jsonl reference-x-wasip3-guest=conformance/driver-ct/results/reference-x-wasip3-guest.jsonl - wasmtime-x-deltic-deno=conformance/driver-ct/results/wasmtime-x-deltic-deno.jsonl - deltic-deno-x-wasmtime=conformance/driver-ct/results/deltic-deno-x-wasmtime.jsonl + wasmtime-x-polyengine-deno=conformance/driver-ct/results/wasmtime-x-polyengine-deno.jsonl + polyengine-deno-x-wasmtime=conformance/driver-ct/results/polyengine-deno-x-wasmtime.jsonl wasmtime-x-wasip3-guest=conformance/driver-ct/results/wasmtime-x-wasip3-guest.jsonl wasip3-guest-x-wasmtime=conformance/driver-ct/results/wasip3-guest-x-wasmtime.jsonl summary-title: Interop conformance matrix diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index f59e0d2..6b5ace0 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -36,7 +36,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - # Node 24+ for the deltic browser page drivers (plain node, no + # Node 24+ for the polyengine browser page drivers (plain node, no # engine flag). node-version: "24" diff --git a/.github/workflows/jsr-publish.yml b/.github/workflows/jsr-publish.yml index 033ca9c..e429fd4 100644 --- a/.github/workflows/jsr-publish.yml +++ b/.github/workflows/jsr-publish.yml @@ -1,4 +1,4 @@ -# Publish @polymorph/webrtc-datachannels (deltic-impl) to JSR. +# Publish @polymorph/webrtc-datachannels (polyengine-impl) to JSR. # # Auth is GitHub Actions OIDC: the package's GitHub-repository link on # jsr.io authorizes runs from this repository — no tokens. Dispatch @@ -20,4 +20,4 @@ jobs: with: deno-version: "2.9.5" - run: deno publish - working-directory: deltic-impl + working-directory: polyengine-impl diff --git a/AGENTS.md b/AGENTS.md index 8401831..eab01a6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Guidance for automated agents (and humans) working in this repository. `polymorph:webrtc-datachannels`: a WIT interface plus multiple implementations that run the *same* guest component over a real WebRTC data channel: two hosts -(Wasmtime and deltic) and one in-guest component (`wasip3-impl`). It is +(Wasmtime and polyengine) and one in-guest component (`wasip3-impl`). It is intentionally small — prefer clarity and correctness over features, and keep the implementations behaviourally in sync (asserted by the conformance suite under [`conformance/`](conformance)). See [`README.md`](README.md) for the findings @@ -47,12 +47,12 @@ wasmtime-impl/ # Wasmtime host crate (webrtc-rs), # modeled after wasmtime_wasi_http::p3; # add_to_linker + WebrtcView (types + connections.data-channel-options/data-channel); # crate name: wasmtime-webrtc-datachannels -deltic-impl/ # deltic-native host module (stock Deno, +polyengine-impl/ # polyengine-native host module (stock Deno, # runtime-linked; node-datachannel-backed): - # deltic's ports/webrtc reference-host port, - # upstreamed per lann/deltic#14; pinned to a - # deltic prerelease via JSR import maps (see - # deltic-impl/README.md) + # polyengine's ports/webrtc reference-host port, + # upstreamed per polymorph-components/polyengine#14; pinned to a + # polyengine prerelease via JSR import maps (see + # polyengine-impl/README.md) wasip3-impl/ # wasm COMPONENT on `rtc` 0.21: runs the # sans-I/O stack in-guest (SansIoPeer core # + a wasi:sockets/clocks runtime driver) @@ -87,8 +87,8 @@ conformance/ # cross-implementation conformance suite, driver-ct/ # rtc-ct-driver (child exec mode + loopback/ # interop/shadow/netns orchestrators, the # pair fold, the ported netns topology and - # Shadow syscall shim), the deltic - # children (deltic/), + # Shadow syscall shim), the polyengine + # children (polyengine/), # targets*.toml manifests, and the # committed matrix.md + matrix-interop.md reference/ # the non-wasm reference peer (libwebrtc via @@ -146,15 +146,15 @@ updating the consumers that name them as strings: `deps/polymorph-webrtc-datachannels` symlink), - the Wasmtime host bindings in `examples/wasmtime-demo/src/main.rs`, - the conformance suite bodies and driver under `conformance/`, and -- the deltic import-record assembly in `deltic-impl/src/webrtc.ts` (the +- the polyengine import-record assembly in `polyengine-impl/src/webrtc.ts` (the interface keys and error-class wiring the conformance children and any embedder use). ## Build & run Prerequisites: Rust with the `wasm32-unknown-unknown` target, `wasm-tools`, -Deno 2.x for the deltic paths (`deltic-impl/` and the deltic conformance -legs; stock Deno, no flags), and Node 24+ for the deltic browser page +Deno 2.x for the polyengine paths (`polyengine-impl/` and the polyengine conformance +legs; stock Deno, no flags), and Node 24+ for the polyengine browser page drivers (plain `node`, no engine flag). ### One-shot dependency setup: `scripts/setup.sh` @@ -174,7 +174,7 @@ It adds the `wasm32-unknown-unknown` and `wasm32-wasip2` Rust targets; installs `wasm-tools`, `just`, `cargo-nextest`, `wac`, and `wasmtime` (each skipped if already on `PATH`; versions pinned via `*_VERSION` variables); installs the netns-lab tools (iproute2, nftables, coturn; skip with `SKIP_NETNS_LAB=1`). -The deltic legs' runtime dependencies are not installed here: their just +The polyengine legs' runtime dependencies are not installed here: their just recipes materialize the pinned module graph and npm trees on first run. It does **not** install the Shadow network simulator (see below). CI is kept in sync by calling this same script rather than duplicating the install steps. @@ -193,11 +193,11 @@ missing when the lab runs. # Guest component (produces examples/echo-demo/build/echo-demo.component.wasm): just examples::build-component -# deltic (runtime-linked JS) host — the conformance legs are the maintained +# polyengine (runtime-linked JS) host — the conformance legs are the maintained # entry points (stock Deno; headless Chromium for the browser leg, which is # also the CI check for the browser path; set CHROME_PATH to override): -just conformance::run-deltic -just conformance::run-deltic-browser +just conformance::run-polyengine +just conformance::run-polyengine-browser # Wasmtime (native) host (defaults: 1000 messages of 4096 bytes): just examples::demo-wasmtime # or: just examples::demo-wasmtime 1000 4096 @@ -215,7 +215,7 @@ just test # Cross-implementation conformance suite: builds the two suite # components, runs every loopback target (wasmtime, composed, -# deltic-deno, deltic-browser) and every interop direction (every +# polyengine-deno, polyengine-browser) and every interop direction (every # implementation against the non-wasm reference peer in both orders, the # reference self-pair, and the direct implementation pairs), aggregates # against the committed lockfiles + manifests, and diffs the committed @@ -268,7 +268,7 @@ in doubt about whether a recipe's scope is touched, run it. | `just examples::build-component` | the `echo-demo` guest or its WIT. | | `just examples::test-webrtc-composed` | the `wasip3-impl` provider component, the `webrtc-consumer`, or the `connections` WIT (composes them with `wac plug` and runs the round trip under `wasmtime`). | | `just examples::test-echo-remote-composed` | the `echo-remote` guest, `rendezvous-http`, the `wasip3-impl` provider, or the `rendezvous`/`remote` WIT (composes the fully in-guest peer and connects two `wasmtime run` processes over a signaling server). | -| `just deltic-check` | the deltic host module (`deltic-impl/`) or the deltic conformance leg's TS (`conformance/driver-ct/deltic/`): type-checks both and runs the `deltic-impl` unit tests. Behavior changes also need `just conformance` (the `deltic-deno` target). | +| `just polyengine-check` | the polyengine host module (`polyengine-impl/`) or the polyengine conformance leg's TS (`conformance/driver-ct/polyengine/`): type-checks both and runs the `polyengine-impl` unit tests. Behavior changes also need `just conformance` (the `polyengine-deno` target). | | `just conformance` | any host/guest behavior the suite asserts — the WIT surface, a host implementation, the suite bodies, the driver, or the manifests (CI runs it in `.github/workflows/conformance.yml`). Intentional case changes also need `just conformance::lock-update`; intentional behavior changes, `just conformance::matrix-update` — commit the diffs. | | `just check` | broad Rust/WIT changes — the quick gate for most commits. | | `just ci` | anything broad — reproduces CI locally: the rust checks and the full conformance suite; the Shadow lab runs separately (`just gha::shadow-lab`, needs the shadow binary). | @@ -334,7 +334,7 @@ documented at its use site): | Variable | Read by | Effect | | --- | --- | --- | | `WEBRTC_UDP_BIND_ADDR` | `wasip3-impl` provider | IP address the in-guest `peer-connection` binds its UDP socket to (and derives its host candidate from); default IPv4 loopback. An unparsable value constructs dead connections (methods fail `closed`; the cause is printed to stderr). | -| `WEBRTC_MAX_INBOUND_BUFFER_BYTES` | all three implementations, but only the `wasip3-impl` guest reads it directly (the env var is its only channel); the host libraries read no ambient state — the Wasmtime hosts (demo binaries, conformance adapter) wire the variable through `WebrtcCtx`, and the deltic children wire it through `deltic-impl`'s exported `setMaxInboundBufferBytes` hook (embedders call the hook directly; there is no `globalThis` channel) | Overrides the 8 MiB inbound buffer bound; primarily a test knob (the conformance overflow probe shrinks it). Set-but-invalid values fail loud. | +| `WEBRTC_MAX_INBOUND_BUFFER_BYTES` | all three implementations, but only the `wasip3-impl` guest reads it directly (the env var is its only channel); the host libraries read no ambient state — the Wasmtime hosts (demo binaries, conformance adapter) wire the variable through `WebrtcCtx`, and the polyengine children wire it through `polyengine-impl`'s exported `setMaxInboundBufferBytes` hook (embedders call the hook directly; there is no `globalThis` channel) | Overrides the 8 MiB inbound buffer bound; primarily a test knob (the conformance overflow probe shrinks it). Set-but-invalid values fail loud. | | `WEBRTC_INCLUDE_LOOPBACK` | the `wasmtime-demo` binaries | Enables loopback ICE candidates so same-host peers can pair. | | `CONFORMANCE_SHADOW_SYSCALL_SHIM` | `rtc-ct-driver` | Arms the Shadow syscall shim; set only by the Shadow executor on simulated wasmtime-kind peers. | | `RTC_CT_ROLE`, `RTC_CT_SIGNALING_URL`, `RTC_CT_RUN_ID` | the conformance suites (via the store environment) | The pair-instance channel: which half this instance drives, the mailbox base URL, and the room-derivation seed. Set by `rtc-ct-driver` on the children it spawns; never set by hand. | @@ -344,7 +344,7 @@ documented at its use site): Every env var is an undeclared API each deployer must discover, and this table is its only registry — so add no new implementation-level env var without first considering the proper channel: `WebrtcCtx` on the Wasmtime -host, an exported configure hook for the deltic host module (a module-level +host, an exported configure hook for the polyengine host module (a module-level knob captured at channel creation), or the WIT surface itself (as `peer-connection-config` demonstrates for in-guest configuration). `WEBRTC_UDP_BIND_ADDR` is environment-shaped on purpose: the bind address is @@ -364,8 +364,8 @@ exist: - the Wasmtime demo host implements it natively (the `echo-remote` binary in `examples/wasmtime-demo`; `just examples::demo-remote`), -- the conformance deltic children implement the same mailbox protocol over - `fetch` (`conformance/driver-ct/deltic/signaling.ts`), and +- the conformance polyengine children implement the same mailbox protocol over + `fetch` (`conformance/driver-ct/polyengine/signaling.ts`), and - [`examples/rendezvous-http`](examples/rendezvous-http) is a **component** implementing it over in-guest `wasi:http@0.3`, composable under the guest so a plain `wasmtime run -S http` provisions it (the fully in-guest path below). diff --git a/Cargo.lock b/Cargo.lock index 9972653..9ffe5db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -572,8 +572,8 @@ dependencies = [ [[package]] name = "component-test-core" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "arcstr", "serde", @@ -581,8 +581,8 @@ dependencies = [ [[package]] name = "component-test-formats" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "anyhow", "component-test-core", @@ -596,8 +596,8 @@ dependencies = [ [[package]] name = "component-test-results" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "anyhow", "component-test-core", @@ -607,8 +607,8 @@ dependencies = [ [[package]] name = "component-test-runner" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "anyhow", "component-test-core", @@ -623,8 +623,8 @@ dependencies = [ [[package]] name = "component-test-sdk" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "component-test-core", "component-test-sdk-macro", @@ -635,8 +635,8 @@ dependencies = [ [[package]] name = "component-test-sdk-macro" -version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=b4444a25a22106ad4128549bdc9e579552e62210#b4444a25a22106ad4128549bdc9e579552e62210" +version = "0.1.1" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=38bfedf2b989522b82ddce5320fc1557a2f61461#38bfedf2b989522b82ddce5320fc1557a2f61461" dependencies = [ "component-test-core", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index b493eef..73305b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,17 +54,17 @@ webrtc = { git = "https://github.com/lann/webrtc.git", rev = "15755c6b99458ea5a4 # the crates here are rev-pinned (no registry release yet), and the JS # runner core is jsr:@polymorph/test's npm-compat package # (@jsr/polymorph__test, resolved through npm.jsr.io per -# conformance/driver-ct/deltic/.npmrc), version-pinned in that tree's +# conformance/driver-ct/polyengine/.npmrc), version-pinned in that tree's # package.json/package-lock.json. Bump the cargo side with # `component-test pins bump --cargo-toml Cargo.toml --workflow # .github/workflows/conformance.yml`, then the follow-ups it prints # (`cargo update`); bump the JS side by setting the matching release -# version on conformance/driver-ct/deltic/package.json's +# version on conformance/driver-ct/polyengine/package.json's # @jsr/polymorph__test dependency and running `npm install` there. The # cargo pins gate (conformance::_ct-tools), the JS runner-js pin gate # (scripts/check-runner-js-pin.sh), and the actions' own ref checks fail # on skew. -component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" } -component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" } -component-test-formats = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" } -component-test-results = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" } +component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "38bfedf2b989522b82ddce5320fc1557a2f61461" } +component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "38bfedf2b989522b82ddce5320fc1557a2f61461" } +component-test-formats = { git = "https://github.com/polymorph-components/polymorph-test", rev = "38bfedf2b989522b82ddce5320fc1557a2f61461" } +component-test-results = { git = "https://github.com/polymorph-components/polymorph-test", rev = "38bfedf2b989522b82ddce5320fc1557a2f61461" } diff --git a/README.md b/README.md index ba38907..a35f0c4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ with a *single* guest component binary running unchanged against very different stacks: - a **native Rust** host ([Wasmtime] + [`webrtc-rs`]), -- a **runtime-linked JS** host ([`deltic`] on stock Deno — and inside a real +- a **runtime-linked JS** host ([`polyengine`] on stock Deno — and inside a real browser — backed by [`node-datachannel`] or the native `RTCPeerConnection`; no transpile step, no engine flag), and - an **in-guest** component ([`wasip3-impl`](wasip3-impl)) that runs the whole @@ -20,7 +20,7 @@ they behave compatibly. [`node-datachannel`]: https://github.com/murat-dogan/node-datachannel [Wasmtime]: https://github.com/bytecodealliance/wasmtime [`webrtc-rs`]: https://github.com/webrtc-rs/webrtc -[`deltic`]: https://github.com/lann/deltic +[`polyengine`]: https://github.com/polymorph-components/polyengine ## Releases @@ -28,7 +28,7 @@ Everything here is **unstable** (0.x), but [releases](../../releases) are **caret-honest**: within a minor line they stay backward-compatible, and anything breaking bumps the minor. Consumption is pinned at a release's commit — cargo git dependencies, vendored WIT, the release-pinned -deltic/JSR graph — and bumped deliberately. +polyengine/JSR graph — and bumped deliberately. ## What's here @@ -37,12 +37,12 @@ deltic/JSR graph — and bumped deliberately. | [`wit/`](wit) | The streaming **WIT interface**, the `polymorph:webrtc-datachannels@0.1.0` package. Each demo component keeps its own demo-only WIT and symlinks this package in as a dependency. | | [`examples/echo-demo`](examples/echo-demo) | A **Rust example component** exercising a data channel one message at a time. | | [`wasmtime-impl`](wasmtime-impl) | The **Wasmtime host crate** (webrtc-rs), modeled after `wasmtime_wasi_http::p3`. Provides `add_to_linker` + `WebrtcView` for the `types` interface and the `data-channel` resource of `connections` (the `peer-connection` resource is unimplemented). Crate name: `wasmtime-webrtc-datachannels`. | -| [`deltic-impl`](deltic-impl) | The **runtime-linked JS host module** ([deltic](https://github.com/lann/deltic) on stock Deno or in the browser, node-datachannel/RTCPeerConnection-backed): the browser-first reference host (`jco-impl/webrtc.js`, retired with the jco legs — see git history) ported to deltic's embedder conventions, upstreamed from deltic's `ports/webrtc`. | +| [`polyengine-impl`](polyengine-impl) | The **runtime-linked JS host module** ([polyengine](https://github.com/polymorph-components/polyengine) on stock Deno or in the browser, node-datachannel/RTCPeerConnection-backed): the browser-first reference host (`jco-impl/webrtc.js`, retired with the jco legs — see git history) ported to polyengine's embedder conventions, upstreamed from polyengine's `ports/webrtc`. | | [`examples/wasmtime-demo`](examples/wasmtime-demo) | The **native Rust host** (Wasmtime + webrtc-rs): demo binaries built on `wasmtime-impl`. | | [`examples/cli-signaling`](examples/cli-signaling) | The **manual-signaling CLI guest component** (Rust), driving `connections.peer-connection` with guest-side vanilla ICE. | | [`examples/webrtc-consumer`](examples/webrtc-consumer) | A **minimal consumer component** that imports `connections`. Composed (`wac plug`) with `wasip3-impl` for the in-guest round-trip integration test (`just examples::test-webrtc-composed`). | | [`wasip3-impl`](wasip3-impl) | The **third implementation**: a wasm **component** (built for `wasm32-wasip2`) that runs the sans-I/O `rtc` 0.21 WebRTC stack *in-guest* — importing only `wasi:sockets`/`wasi:clocks` — and **exports** `polymorph:webrtc-datachannels/connections`. Its `SansIoPeer` core is driven over `wasi:sockets` UDP and WASI timers by an in-guest runtime pump. Composable via `wac plug`. Crate name: `wasip3-webrtc-datachannels`. | -| [`conformance/`](conformance) | The **cross-implementation conformance suite**, on the [`polymorph:test`](https://github.com/polymorph-components/polymorph-test) harness: two suite components (full and pair-only) run against every target (wasmtime, the composed wasip3 stack, deltic under stock Deno and inside headless Chromium), an interop matrix pairing every implementation with a non-wasm reference peer (Google's libwebrtc via LiveKit's Rust bindings), a netns lab, and a Shadow lab. `just conformance`; see [`conformance/README.md`](conformance/README.md). | +| [`conformance/`](conformance) | The **cross-implementation conformance suite**, on the [`polymorph:test`](https://github.com/polymorph-components/polymorph-test) harness: two suite components (full and pair-only) run against every target (wasmtime, the composed wasip3 stack, polyengine under stock Deno and inside headless Chromium), an interop matrix pairing every implementation with a non-wasm reference peer (Google's libwebrtc via LiveKit's Rust bindings), a netns lab, and a Shadow lab. `just conformance`; see [`conformance/README.md`](conformance/README.md). | | [`AGENTS.md`](AGENTS.md) | Orientation for agents/contributors, linking the `lann/wasm-component-starter` knowledge base. | ## The interface @@ -131,22 +131,22 @@ world webrtc-echo-demo { ## Running it Prerequisites: Rust (with the `wasm32-unknown-unknown` target), -[`wasm-tools`], Deno 2.x (the deltic host), and Node 24+ (the deltic +[`wasm-tools`], Deno 2.x (the polyengine host), and Node 24+ (the polyengine browser drivers — plain `node`, no engine flag). [`wasm-tools`]: https://github.com/bytecodealliance/wasm-tools -### deltic (runtime-linked JS) host +### polyengine (runtime-linked JS) host The conformance legs are the maintained entry points — the component is runtime-linked at load time, so there is nothing to transpile or stage: ```sh -just conformance::run-deltic # the full suite under stock Deno -just conformance::run-deltic-browser # the same suite inside headless Chromium +just conformance::run-polyengine # the full suite under stock Deno +just conformance::run-polyengine-browser # the same suite inside headless Chromium ``` -The host module (`deltic-impl/src/webrtc.ts`) is environment-portable: it +The host module (`polyengine-impl/src/webrtc.ts`) is environment-portable: it resolves `RTCPeerConnection` from the browser global when present and falls back to `node-datachannel` under Deno. diff --git a/conformance/README.md b/conformance/README.md index 26b9626..6e8619e 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -19,9 +19,9 @@ binary, and `wac` required; see [`AGENTS.md`](../AGENTS.md) for setup). | [`suite-body/`](suite-body) | The case bodies and SUT bindings, shared by both suite components: the incumbent guest's assertions re-plumbed for the harness (config via the store environment, per-case rooms). | | [`guest-ct/`](guest-ct) | The full suite component. The name hierarchy is the execution topology: `solo/*` cases run in one instance (two in-process peer connections, or a lone peer for the error probes); `pair/*` cases run as two role-paired instances of the same binary sharing a signaling room. The committed `tests.lock` is the corpus inventory. | | [`guest-pair-ct/`](guest-pair-ct) | The pair-only sibling suite: the `pair/*` subset as its own artifact with its own `tests.lock` — the corpus the interop directions and the network labs run (their targets never execute `solo/*` cases). | -| [`driver-ct/`](driver-ct) | The legs. `rtc-ct-driver`'s child mode (`exec`) runs one suite instance's stream — a role, a selection, a linker profile — on the component-test runner (fresh instance per case, budgets, the wire format). Its orchestrator modes provision the signaling server, spawn one child stream per instance, fold the two sides of each pair case (worst status wins, details role-labelled), and emit one stream per target. `deltic/` holds the [deltic](https://github.com/lann/deltic) children (stock Deno and headless Chromium, runtime-linked — no transpile step or engine flag). `targets*.toml` are the per-matrix manifests; `matrix.md` and `matrix-interop.md` are the committed review surfaces. | +| [`driver-ct/`](driver-ct) | The legs. `rtc-ct-driver`'s child mode (`exec`) runs one suite instance's stream — a role, a selection, a linker profile — on the component-test runner (fresh instance per case, budgets, the wire format). Its orchestrator modes provision the signaling server, spawn one child stream per instance, fold the two sides of each pair case (worst status wins, details role-labelled), and emit one stream per target. `polyengine/` holds the [polyengine](https://github.com/polymorph-components/polyengine) children (stock Deno and headless Chromium, runtime-linked — no transpile step or engine flag). `targets*.toml` are the per-matrix manifests; `matrix.md` and `matrix-interop.md` are the committed review surfaces. | | [`reference/`](reference) | The non-wasm reference peer: a native binary driving Google's libwebrtc (via LiveKit's Rust bindings), the suite's wire-level anchor. One process per case; the orchestrator synthesizes its stream and pairs it against any suite target. | -| [`signaling/`](signaling) | `conformance-signalingd`, the suite-owned HTTP mailbox (see `signaling/PROTOCOL.md`). The guest never speaks HTTP: it imports `conformance:signaling/mailbox`, served natively by the driver, by `fetch` in the deltic legs (`driver-ct/deltic/signaling.ts`), and by the in-guest `wasi:http` client ([`wasip3-mailbox/`](wasip3-mailbox)) in the composed artifacts. | +| [`signaling/`](signaling) | `conformance-signalingd`, the suite-owned HTTP mailbox (see `signaling/PROTOCOL.md`). The guest never speaks HTTP: it imports `conformance:signaling/mailbox`, served natively by the driver, by `fetch` in the polyengine legs (`driver-ct/polyengine/signaling.ts`), and by the in-guest `wasi:http` client ([`wasip3-mailbox/`](wasip3-mailbox)) in the composed artifacts. | | [`wit/`](wit) | The suite world (`sut-imports`): only the surface under test and the mailbox — the export surface comes from the component-test SDK. The `polymorph:webrtc-datachannels` package arrives through the `deps` symlink, never a copy. | ### Pairing @@ -43,9 +43,9 @@ close) keep both halves. per implementation — `wasmtime` (native webrtc-rs host), `composed` (the suite `wac plug`ged with the `wasip3-impl` provider and the in-guest mailbox client: the whole WebRTC stack in wasm over - `wasi:sockets`), `deltic-deno` (the deltic-native host, - `deltic-impl/`, runtime-linked under stock Deno — no transpile step, - no engine flag), and `deltic-browser` (the same deltic host module + `wasi:sockets`), `polyengine-deno` (the polyengine-native host, + `polyengine-impl/`, runtime-linked under stock Deno — no transpile step, + no engine flag), and `polyengine-browser` (the same polyengine host module over the browser's native `RTCPeerConnection` in headless Chromium, served as one deno-bundled page module). - **Interop** (`targets-interop.toml`, committed `matrix-interop.md`): diff --git a/conformance/driver-ct/deltic/browser/browser-bundle-entry.ts b/conformance/driver-ct/deltic/browser/browser-bundle-entry.ts deleted file mode 100644 index c682772..0000000 --- a/conformance/driver-ct/deltic/browser/browser-bundle-entry.ts +++ /dev/null @@ -1,13 +0,0 @@ -// The local replacement for the retired `@deltic/release-bundle-entry` -// raw-URL import: this is upstream tools/release-bundle/entry.ts's exact -// public surface, re-exported from the pinned JSR packages so `deno -// bundle` can produce one flat module for the page (see -// ../../../../conformance/justfile's `_deltic-browser-bundle` recipe). -// The worker/page protocol is unchanged; only the source of these -// exports moved from a sha-pinned GitHub release asset to the -// exact-pinned JSR graph (see ../README.md's pin section). -export * from "@deltic/runtime/embedder"; -export { Translator } from "@deltic/runtime/shim"; -export * from "@deltic/ct-runner"; -export { wasi } from "@deltic/wasi"; -export type { WasiImports, WasiOptions } from "@deltic/wasi"; diff --git a/conformance/driver-ct/deltic/browser/deno.json b/conformance/driver-ct/deltic/browser/deno.json deleted file mode 100644 index 31001dd..0000000 --- a/conformance/driver-ct/deltic/browser/deno.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "//": "The browser-bundle import map: identical deltic pins to ../deno.json, with the npm WebRTC backends mapped to ./stub.ts (never executed in a page; see stub.ts). deltic ships as exact-pinned JSR prereleases; the pin gate (`just deltic-check`) asserts one version repo-wide.", - "minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@deltic/*"] }, - "imports": { - "@deltic/ct-runner": "jsr:@deltic/ct-runner@0.2.0", - "@deltic/runtime/embedder": "jsr:@deltic/runtime@0.2.0/embedder", - "@deltic/runtime/shim": "jsr:@deltic/runtime@0.2.0/shim", - "@deltic/wasi": "jsr:@deltic/wasi@0.2.0", - "node-datachannel": "./stub.ts", - "node-datachannel/polyfill": "./stub.ts", - "werift": "./stub.ts" - } -} \ No newline at end of file diff --git a/conformance/driver-ct/deltic/browser/deno.lock b/conformance/driver-ct/deltic/browser/deno.lock deleted file mode 100644 index 0b0d27f..0000000 --- a/conformance/driver-ct/deltic/browser/deno.lock +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "5", - "specifiers": { - "jsr:@deltic/ct-runner@0.2.0": "0.2.0", - "jsr:@deltic/protocol@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2.0": "0.2.0", - "jsr:@deltic/wasi@0.2.0": "0.2.0" - }, - "jsr": { - "@deltic/ct-runner@0.2.0": { - "integrity": "810eec021dc07dbc7efe00e0e7df900f557c5b30bd11f077195eeb44bcce81b4", - "dependencies": [ - "jsr:@deltic/runtime@0.2" - ] - }, - "@deltic/protocol@0.2.0": { - "integrity": "028be6a3623c5e910598aa7a199209b85e8931ae484ac7f6638d610ddb0e19fa" - }, - "@deltic/runtime@0.2.0": { - "integrity": "cf8b0bdd9e6bc4488ba78cc91661103bfcbd78f5a5c4ff99132799618a9db4bb", - "dependencies": [ - "jsr:@deltic/protocol" - ] - }, - "@deltic/wasi@0.2.0": { - "integrity": "82c76d4fda0a1c9238a91f8ebc7fdbac952a03aa06d4a2a820213df2654f5c24", - "dependencies": [ - "jsr:@deltic/protocol", - "jsr:@deltic/runtime@0.2" - ] - } - }, - "workspace": { - "dependencies": [ - "jsr:@deltic/ct-runner@0.2.0", - "jsr:@deltic/runtime@0.2.0", - "jsr:@deltic/wasi@0.2.0" - ] - } -} diff --git a/conformance/driver-ct/deltic/deno.json b/conformance/driver-ct/deltic/deno.json deleted file mode 100644 index 19955d6..0000000 --- a/conformance/driver-ct/deltic/deno.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "//": "MODULE-IDENTITY CONSTRAINT: deltic's wasi module imports @deltic/runtime/embedder by bare specifier internally. Every config in this repo (this file AND deltic-impl/deno.json AND browser/deno.json) must map that specifier to the IDENTICAL exact-pinned JSR version, or the embedder module loads twice and `instanceof ComponentException` stops holding across the module boundary. deltic ships as exact-pinned JSR releases (caret-honest upstream; per-commit `-pre.g` prereleases exist between releases — pin exactly); the lock carries integrity and --frozen enforces it; the pin gate (`just deltic-check`) asserts one version repo-wide. The npm mappings mirror deltic-impl/deno.json: the host module's bare `node-datachannel/polyfill` / `werift` specifiers resolve against THIS config when run.ts is the entry module.", - "nodeModulesDir": "auto", - "minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@deltic/*", "npm:@jsr/*"] }, - "imports": { - "@deltic/ct-runner": "jsr:@deltic/ct-runner@0.2.0", - "@deltic/runtime/embedder": "jsr:@deltic/runtime@0.2.0/embedder", - "@deltic/runtime/shim": "jsr:@deltic/runtime@0.2.0/shim", - "@deltic/wasi": "jsr:@deltic/wasi@0.2.0", - "@deltic/translator": "jsr:@deltic/translator@0.2.0", - "node-datachannel": "npm:node-datachannel@0.32.3", - "node-datachannel/polyfill": "npm:node-datachannel@0.32.3/polyfill", - "werift": "npm:werift@0.22.2" - }, - "tasks": { - "check": "deno check run.ts signaling.ts browser/page-entry.ts" - } -} \ No newline at end of file diff --git a/conformance/driver-ct/deltic/package.json b/conformance/driver-ct/deltic/package.json deleted file mode 100644 index e7e9ac6..0000000 --- a/conformance/driver-ct/deltic/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@polymorph/webrtc-conformance-deltic-browser", - "private": true, - "type": "module", - "description": "Node driver for the deltic-browser child of rtc-ct-driver: playwright + the upstream page harness serving the deno-bundled deltic page (deltic-impl over the browser's RTCPeerConnection).", - "dependencies": { - "@jsr/polymorph__test": "0.1.1", - "playwright-core": "^1.61.1" - } -} diff --git a/conformance/driver-ct/matrix-interop.md b/conformance/driver-ct/matrix-interop.md index f75ac37..c824135 100644 --- a/conformance/driver-ct/matrix-interop.md +++ b/conformance/driver-ct/matrix-interop.md @@ -1,6 +1,6 @@ # Test matrix -| Case | deltic-browser-x-reference | deltic-deno-x-reference | deltic-deno-x-wasmtime | reference | reference-x-deltic-browser | reference-x-deltic-deno | reference-x-wasip3-guest | reference-x-wasmtime | wasip3-guest-x-reference | wasip3-guest-x-wasmtime | wasmtime-x-deltic-deno | wasmtime-x-reference | wasmtime-x-wasip3-guest | +| Case | polyengine-browser-x-reference | polyengine-deno-x-reference | polyengine-deno-x-wasmtime | reference | reference-x-polyengine-browser | reference-x-polyengine-deno | reference-x-wasip3-guest | reference-x-wasmtime | wasip3-guest-x-reference | wasip3-guest-x-wasmtime | wasmtime-x-polyengine-deno | wasmtime-x-reference | wasmtime-x-wasip3-guest | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | pair (12 cases) | pass | pass | pass | pass | pass | pass | pass | pass | 11 pass, 1 xfail | pass | pass | pass | pass | @@ -14,16 +14,16 @@ None. ## Summary -- `deltic-browser-x-reference`: 12 pass (12 total) -- `deltic-deno-x-reference`: 12 pass (12 total) -- `deltic-deno-x-wasmtime`: 12 pass (12 total) +- `polyengine-browser-x-reference`: 12 pass (12 total) +- `polyengine-deno-x-reference`: 12 pass (12 total) +- `polyengine-deno-x-wasmtime`: 12 pass (12 total) - `reference`: 12 pass (12 total) -- `reference-x-deltic-browser`: 12 pass (12 total) -- `reference-x-deltic-deno`: 12 pass (12 total) +- `reference-x-polyengine-browser`: 12 pass (12 total) +- `reference-x-polyengine-deno`: 12 pass (12 total) - `reference-x-wasip3-guest`: 12 pass (12 total) - `reference-x-wasmtime`: 12 pass (12 total) - `wasip3-guest-x-reference`: 11 pass, 1 xfail (12 total) - `wasip3-guest-x-wasmtime`: 12 pass (12 total) -- `wasmtime-x-deltic-deno`: 12 pass (12 total) +- `wasmtime-x-polyengine-deno`: 12 pass (12 total) - `wasmtime-x-reference`: 12 pass (12 total) - `wasmtime-x-wasip3-guest`: 12 pass (12 total) diff --git a/conformance/driver-ct/matrix.md b/conformance/driver-ct/matrix.md index 79aa3da..24fe9eb 100644 --- a/conformance/driver-ct/matrix.md +++ b/conformance/driver-ct/matrix.md @@ -1,6 +1,6 @@ # Test matrix -| Case | composed | deltic-browser | deltic-deno | wasmtime | +| Case | composed | polyengine-browser | polyengine-deno | wasmtime | | --- | --- | --- | --- | --- | | pair (12 cases) | pass | pass | pass | pass | | solo (25 cases) | pass | pass | pass | pass | @@ -12,6 +12,6 @@ None. ## Summary - `composed`: 37 pass (37 total) -- `deltic-browser`: 37 pass (37 total) -- `deltic-deno`: 37 pass (37 total) +- `polyengine-browser`: 37 pass (37 total) +- `polyengine-deno`: 37 pass (37 total) - `wasmtime`: 37 pass (37 total) diff --git a/conformance/driver-ct/deltic/.npmrc b/conformance/driver-ct/polyengine/.npmrc similarity index 100% rename from conformance/driver-ct/deltic/.npmrc rename to conformance/driver-ct/polyengine/.npmrc diff --git a/conformance/driver-ct/deltic/README.md b/conformance/driver-ct/polyengine/README.md similarity index 56% rename from conformance/driver-ct/deltic/README.md rename to conformance/driver-ct/polyengine/README.md index cdaf90f..c95bbff 100644 --- a/conformance/driver-ct/deltic/README.md +++ b/conformance/driver-ct/polyengine/README.md @@ -1,10 +1,10 @@ -# `conformance/driver-ct/deltic` — the deltic-native conformance leg +# `conformance/driver-ct/polyengine` — the polyengine-native conformance leg -The `deltic-deno` target in the loopback conformance matrix: the suite +The `polyengine-deno` target in the loopback conformance matrix: the suite runs runtime-linked under stock Deno — no transpile step, no generated tree, no engine flag (the WIT contract's async exports run on the callback ABI) — against -[`deltic-impl/src/webrtc.ts`](../../../deltic-impl/src/webrtc.ts) and the +[`polyengine-impl/src/webrtc.ts`](../../../polyengine-impl/src/webrtc.ts) and the fetch mailbox ([`signaling.ts`](signaling.ts)). These children carry the same child contract the retired jco legs did (see git history) under `rtc-ct-driver`'s loopback orchestration (a solo stream over @@ -22,33 +22,33 @@ cannot confine anyway. ## Running it ```sh -just conformance::run-deltic +just conformance::run-polyengine ``` which installs the leg's pinned module graph + the `node-datachannel` -addon (`just conformance::deltic-deps`, idempotent) and runs the +addon (`just conformance::polyengine-deps`, idempotent) and runs the loopback leg through the driver, writing -`conformance/driver-ct/results/deltic-deno.jsonl`. The translator shim -comes from the pinned `@deltic/translator` JSR package through the +`conformance/driver-ct/results/polyengine-deno.jsonl`. The translator shim +comes from the pinned `@polyengine/translator` JSR package through the module graph — no fetch step, no network. ## The pin -deltic ships as exact-pinned JSR prereleases (one per green upstream -commit; the hash in the version names the commit — see the [deltic +polyengine ships as exact-pinned JSR prereleases (one per green upstream +commit; the hash in the version names the commit — see the [polyengine README's "Consuming the unstable -prereleases"](https://github.com/lann/deltic#readme)). The version is -pinned in **three** places, cross-checked by `just deltic-check`'s pin -gate (`../../../scripts/check-deltic-pin.sh`): +prereleases"](https://github.com/polymorph-components/polyengine#readme)). The version is +pinned in **three** places, cross-checked by `just polyengine-check`'s pin +gate (`../../../scripts/check-polyengine-pin.sh`): - `deno.json` (this directory) — import-map versions - (`jsr:@deltic/@`) for `@deltic/ct-runner`, - `@deltic/runtime/embedder`, `@deltic/runtime/shim`, - `@deltic/wasi-shims`, `@deltic/translator`. `deno.lock` carries + (`jsr:@polyengine/@`) for `@polyengine/ct-runner`, + `@polyengine/runtime/embedder`, `@polyengine/runtime/shim`, + `@polyengine/wasi-shims`, `@polyengine/translator`. `deno.lock` carries integrity hashes for that module graph, enforced with `--frozen`. -- [`../../../deltic-impl/deno.json`](../../../deltic-impl/deno.json) — - the SAME `@deltic/runtime/embedder` version (the module-identity - constraint: deltic's `wasi-shims` imports that specifier by bare name +- [`../../../polyengine-impl/deno.json`](../../../polyengine-impl/deno.json) — + the SAME `@polyengine/runtime/embedder` version (the module-identity + constraint: polyengine's `wasi-shims` imports that specifier by bare name internally, so every config resolving it must agree, or the embedder module loads twice and `instanceof ComponentException` stops holding across the boundary). @@ -56,17 +56,17 @@ gate (`../../../scripts/check-deltic-pin.sh`): the npm WebRTC backends stubbed out (never executed in a page). Each `deno.json` also carries a -`"minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@deltic/*"] }` +`"minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@polyengine/*"] }` stanza: the JSR prereleases are typically published well under 24h before consumption, and without the exclude the default supply-chain age gate blocks resolution. To bump: update the version in all three `deno.json` files, delete all three `deno.lock` files (this directory, `browser/`, and -`deltic-impl/`), re-run +`polyengine-impl/`), re-run `deno install --frozen --allow-scripts=npm:node-datachannel` in this -directory and in `deltic-impl/`, and `deno install` in `browser/`, to -regenerate the locks (`just deltic-check` also does the first two -installs). Then re-run `just conformance::run-deltic` and commit the +directory and in `polyengine-impl/`, and `deno install` in `browser/`, to +regenerate the locks (`just polyengine-check` also does the first two +installs). Then re-run `just conformance::run-polyengine` and commit the diff (including the regenerated `matrix.md`, via `just conformance::matrix-update`, if behavior changed). diff --git a/conformance/driver-ct/polyengine/browser/browser-bundle-entry.ts b/conformance/driver-ct/polyengine/browser/browser-bundle-entry.ts new file mode 100644 index 0000000..1f86257 --- /dev/null +++ b/conformance/driver-ct/polyengine/browser/browser-bundle-entry.ts @@ -0,0 +1,13 @@ +// The local replacement for the retired `@polyengine/release-bundle-entry` +// raw-URL import: this is upstream tools/release-bundle/entry.ts's exact +// public surface, re-exported from the pinned JSR packages so `deno +// bundle` can produce one flat module for the page (see +// ../../../../conformance/justfile's `_polyengine-browser-bundle` recipe). +// The worker/page protocol is unchanged; only the source of these +// exports moved from a sha-pinned GitHub release asset to the +// exact-pinned JSR graph (see ../README.md's pin section). +export * from "@polyengine/runtime/embedder"; +export { Translator } from "@polyengine/runtime/shim"; +export * from "@polyengine/ct-runner"; +export { wasi } from "@polyengine/wasi"; +export type { WasiImports, WasiOptions } from "@polyengine/wasi"; diff --git a/conformance/driver-ct/polyengine/browser/deno.json b/conformance/driver-ct/polyengine/browser/deno.json new file mode 100644 index 0000000..170a6eb --- /dev/null +++ b/conformance/driver-ct/polyengine/browser/deno.json @@ -0,0 +1,13 @@ +{ + "//": "The browser-bundle import map: identical polyengine pins to ../deno.json, with the npm WebRTC backends mapped to ./stub.ts (never executed in a page; see stub.ts). polyengine ships as exact-pinned JSR prereleases; the pin gate (`just polyengine-check`) asserts one version repo-wide.", + "minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@polyengine/*"] }, + "imports": { + "@polyengine/ct-runner": "jsr:@polyengine/ct-runner@0.3.0", + "@polyengine/runtime/embedder": "jsr:@polyengine/runtime@0.3.0/embedder", + "@polyengine/runtime/shim": "jsr:@polyengine/runtime@0.3.0/shim", + "@polyengine/wasi": "jsr:@polyengine/wasi@0.3.0", + "node-datachannel": "./stub.ts", + "node-datachannel/polyfill": "./stub.ts", + "werift": "./stub.ts" + } +} \ No newline at end of file diff --git a/conformance/driver-ct/polyengine/browser/deno.lock b/conformance/driver-ct/polyengine/browser/deno.lock new file mode 100644 index 0000000..4eca676 --- /dev/null +++ b/conformance/driver-ct/polyengine/browser/deno.lock @@ -0,0 +1,41 @@ +{ + "version": "5", + "specifiers": { + "jsr:@polyengine/ct-runner@0.3.0": "0.3.0", + "jsr:@polyengine/protocol@0.1": "0.1.0", + "jsr:@polyengine/runtime@0.3": "0.3.0", + "jsr:@polyengine/runtime@0.3.0": "0.3.0", + "jsr:@polyengine/wasi@0.3.0": "0.3.0" + }, + "jsr": { + "@polyengine/ct-runner@0.3.0": { + "integrity": "d58720da80bf29cb6a975e4750a53bbe9b75ab6e3bde1340299ed69726702174", + "dependencies": [ + "jsr:@polyengine/runtime@0.3" + ] + }, + "@polyengine/protocol@0.1.0": { + "integrity": "0c97f34166f22ba55e7b084148df96e47aebe47cd9dd13930057759c9161bb1c" + }, + "@polyengine/runtime@0.3.0": { + "integrity": "97d7648c104dd0f08b4d10e1ed0117ab0cb5243db68c139f1f3df25755ed4e60", + "dependencies": [ + "jsr:@polyengine/protocol" + ] + }, + "@polyengine/wasi@0.3.0": { + "integrity": "991adfdd39f795f94bba91a523322b88d45ff42800669b5b472356676e3c97e7", + "dependencies": [ + "jsr:@polyengine/protocol", + "jsr:@polyengine/runtime@0.3" + ] + } + }, + "workspace": { + "dependencies": [ + "jsr:@polyengine/ct-runner@0.3.0", + "jsr:@polyengine/runtime@0.3.0", + "jsr:@polyengine/wasi@0.3.0" + ] + } +} diff --git a/conformance/driver-ct/deltic/browser/page-entry.ts b/conformance/driver-ct/polyengine/browser/page-entry.ts similarity index 92% rename from conformance/driver-ct/deltic/browser/page-entry.ts rename to conformance/driver-ct/polyengine/browser/page-entry.ts index 1a5202b..9b8033a 100644 --- a/conformance/driver-ct/deltic/browser/page-entry.ts +++ b/conformance/driver-ct/polyengine/browser/page-entry.ts @@ -1,10 +1,10 @@ -// The deltic-browser page: the endpoint of one browser child of +// The polyengine-browser page: the endpoint of one browser child of // rtc-ct-driver — the suite COMPONENT runtime-linked against this repo's -// deltic host module (deltic-impl over the browser's native +// polyengine host module (polyengine-impl over the browser's native // RTCPeerConnection) and the fetch mailbox, for one selection and (for // pair runs) one role. RTCPeerConnection is a Window-only API, so the run // happens here in the page; this module is served as ONE deno-bundled -// file (deltic engine + host module + mailbox in a single graph, so +// file (polyengine engine + host module + mailbox in a single graph, so // exactly one embedder module instance exists) and needs no import map. // // The page's mailbox fetches are same-origin (`/rooms/*`, `/healthz`); @@ -14,7 +14,7 @@ import { runSuite, wasi } from "./browser-bundle-entry.ts"; import { Translator } from "./browser-bundle-entry.ts"; -import { setMaxInboundBufferBytes, webrtcImports } from "../../../../deltic-impl/src/webrtc.ts"; +import { setMaxInboundBufferBytes, webrtcImports } from "../../../../polyengine-impl/src/webrtc.ts"; import { mailboxImports } from "../signaling.ts"; interface PageConfig { diff --git a/conformance/driver-ct/deltic/browser/stub.ts b/conformance/driver-ct/polyengine/browser/stub.ts similarity index 84% rename from conformance/driver-ct/deltic/browser/stub.ts rename to conformance/driver-ct/polyengine/browser/stub.ts index 19c3015..1c2feb7 100644 --- a/conformance/driver-ct/deltic/browser/stub.ts +++ b/conformance/driver-ct/polyengine/browser/stub.ts @@ -1,5 +1,5 @@ // Browser-bundle stub for the npm WebRTC backends: in the page, -// deltic-impl's isomorphic resolution takes `globalThis.RTCPeerConnection` +// polyengine-impl's isomorphic resolution takes `globalThis.RTCPeerConnection` // and the dynamic backend imports are never executed — this stub exists so // `deno bundle --platform browser` (browser/deno.json maps the specifiers // here) does not inline node-datachannel's Node-API graph and its `node:*` diff --git a/conformance/driver-ct/polyengine/deno.json b/conformance/driver-ct/polyengine/deno.json new file mode 100644 index 0000000..a479138 --- /dev/null +++ b/conformance/driver-ct/polyengine/deno.json @@ -0,0 +1,18 @@ +{ + "//": "MODULE-IDENTITY CONSTRAINT: polyengine's wasi module imports @polyengine/runtime/embedder by bare specifier internally. Every config in this repo (this file AND polyengine-impl/deno.json AND browser/deno.json) must map that specifier to the IDENTICAL exact-pinned JSR version, or the embedder module loads twice and `instanceof ComponentException` stops holding across the module boundary. polyengine ships as exact-pinned JSR releases (caret-honest upstream; per-commit `-pre.g` prereleases exist between releases — pin exactly); the lock carries integrity and --frozen enforces it; the pin gate (`just polyengine-check`) asserts one version repo-wide. The npm mappings mirror polyengine-impl/deno.json: the host module's bare `node-datachannel/polyfill` / `werift` specifiers resolve against THIS config when run.ts is the entry module.", + "nodeModulesDir": "auto", + "minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@polyengine/*", "npm:@jsr/*"] }, + "imports": { + "@polyengine/ct-runner": "jsr:@polyengine/ct-runner@0.3.0", + "@polyengine/runtime/embedder": "jsr:@polyengine/runtime@0.3.0/embedder", + "@polyengine/runtime/shim": "jsr:@polyengine/runtime@0.3.0/shim", + "@polyengine/wasi": "jsr:@polyengine/wasi@0.3.0", + "@polyengine/translator": "jsr:@polyengine/translator@0.3.0", + "node-datachannel": "npm:node-datachannel@0.32.3", + "node-datachannel/polyfill": "npm:node-datachannel@0.32.3/polyfill", + "werift": "npm:werift@0.22.2" + }, + "tasks": { + "check": "deno check run.ts signaling.ts browser/page-entry.ts" + } +} \ No newline at end of file diff --git a/conformance/driver-ct/deltic/deno.lock b/conformance/driver-ct/polyengine/deno.lock similarity index 83% rename from conformance/driver-ct/deltic/deno.lock rename to conformance/driver-ct/polyengine/deno.lock index b334173..1642b99 100644 --- a/conformance/driver-ct/deltic/deno.lock +++ b/conformance/driver-ct/polyengine/deno.lock @@ -1,44 +1,44 @@ { "version": "5", "specifiers": { - "jsr:@deltic/ct-runner@0.2.0": "0.2.0", - "jsr:@deltic/protocol@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2.0": "0.2.0", - "jsr:@deltic/translator@0.2.0": "0.2.0", - "jsr:@deltic/wasi@0.2.0": "0.2.0", - "npm:@jsr/polymorph__test@0.1.1": "0.1.1", + "jsr:@polyengine/ct-runner@0.3.0": "0.3.0", + "jsr:@polyengine/protocol@0.1": "0.1.0", + "jsr:@polyengine/runtime@0.3": "0.3.0", + "jsr:@polyengine/runtime@0.3.0": "0.3.0", + "jsr:@polyengine/translator@0.3.0": "0.3.0", + "jsr:@polyengine/wasi@0.3.0": "0.3.0", + "npm:@jsr/polymorph__test@0.2.0": "0.2.0", "npm:node-datachannel@0.32.3": "0.32.3", "npm:playwright-core@^1.61.1": "1.62.1", "npm:werift@0.22.2": "0.22.2" }, "jsr": { - "@deltic/ct-runner@0.2.0": { - "integrity": "810eec021dc07dbc7efe00e0e7df900f557c5b30bd11f077195eeb44bcce81b4", + "@polyengine/ct-runner@0.3.0": { + "integrity": "d58720da80bf29cb6a975e4750a53bbe9b75ab6e3bde1340299ed69726702174", "dependencies": [ - "jsr:@deltic/runtime@0.2" + "jsr:@polyengine/runtime@0.3" ] }, - "@deltic/protocol@0.2.0": { - "integrity": "028be6a3623c5e910598aa7a199209b85e8931ae484ac7f6638d610ddb0e19fa" + "@polyengine/protocol@0.1.0": { + "integrity": "0c97f34166f22ba55e7b084148df96e47aebe47cd9dd13930057759c9161bb1c" }, - "@deltic/runtime@0.2.0": { - "integrity": "cf8b0bdd9e6bc4488ba78cc91661103bfcbd78f5a5c4ff99132799618a9db4bb", + "@polyengine/runtime@0.3.0": { + "integrity": "97d7648c104dd0f08b4d10e1ed0117ab0cb5243db68c139f1f3df25755ed4e60", "dependencies": [ - "jsr:@deltic/protocol" + "jsr:@polyengine/protocol" ] }, - "@deltic/translator@0.2.0": { - "integrity": "8104b54e2acdccfd75f5ddc941d72b581e7defbbe31c05bbc66598d2df7a34f9", + "@polyengine/translator@0.3.0": { + "integrity": "1d9fcd09d360850bc08927ed1cf8124d50a0fed09ed8c80f354a6d3aedfcad25", "dependencies": [ - "jsr:@deltic/runtime@0.2" + "jsr:@polyengine/runtime@0.3" ] }, - "@deltic/wasi@0.2.0": { - "integrity": "82c76d4fda0a1c9238a91f8ebc7fdbac952a03aa06d4a2a820213df2654f5c24", + "@polyengine/wasi@0.3.0": { + "integrity": "991adfdd39f795f94bba91a523322b88d45ff42800669b5b472356676e3c97e7", "dependencies": [ - "jsr:@deltic/protocol", - "jsr:@deltic/runtime@0.2" + "jsr:@polyengine/protocol", + "jsr:@polyengine/runtime@0.3" ] } }, @@ -53,9 +53,9 @@ "tweetnacl" ] }, - "@jsr/polymorph__test@0.1.1": { - "integrity": "sha512-bu0jE52btthChm83f04rQo+twOLszJ/JN7nLGl/5W/66cZb8tQrlZG+Lnd4/XierTlBgy0PpW75bjbqQBY2nDg==", - "tarball": "https://npm.jsr.io/~/11/@jsr/polymorph__test/0.1.1.tgz" + "@jsr/polymorph__test@0.2.0": { + "integrity": "sha512-fM1IYIy4HnBJm2IlZn/3Gk0d9AmQZz9Kg6JkY0E+fPAhFb2hrAW+4G7TCRQsJ4PStl0rzuBqF9VI6w30f7xCMA==", + "tarball": "https://npm.jsr.io/~/11/@jsr/polymorph__test/0.2.0.tgz" }, "@leichtgewicht/ip-codec@2.0.5": { "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" @@ -72,8 +72,8 @@ "@noble/hashes@1.8.0": { "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==" }, - "@peculiar/asn1-cms@2.8.0": { - "integrity": "sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA==", + "@peculiar/asn1-cms@2.9.4": { + "integrity": "sha512-cben7oxmQsUGZqotus7yt0srYdncOT6RNWcTQ77T2RFOXejYVYkXadrfePdRcrVpO9K95IRLKKglG2k38jKXuw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -82,8 +82,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-csr@2.8.0": { - "integrity": "sha512-akbF8+uvleHs8sejNPQxwmVFuInAg6FMNHOwMILXfP518YfFJwdR3jr6oNUPOaEJfuEhn/vkNOCIT6ASUd4mbg==", + "@peculiar/asn1-csr@2.9.4": { + "integrity": "sha512-xd4YN4vpRjkDAQWVfZZkeu12IEND7DOpkqaHSIHxZl1uggUNa9Ju0QxY2jHvDAS9pP0zhRBytg8ifsnGo3V0jw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -91,8 +91,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-ecc@2.8.0": { - "integrity": "sha512-ohwlk+u9Rv2NOAY1c6MfHj45ATVF8R1DUN/WCgABiRtLi2ZftlZWZX7KvpAbU8v9xPcmoILfELeEABj/rn18AQ==", + "@peculiar/asn1-ecc@2.9.4": { + "integrity": "sha512-JJXefFshRAuVAjWQo/39bkg1ywc1VaiO44S8RRC+Ykvf/u2KDmYffoDb0ZBPCR5uJy4AGKQhl8mX+Q8ShcWaXQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -100,8 +100,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pfx@2.8.0": { - "integrity": "sha512-5yof1ytoB++RQtaFbqSUJ8pxDJtZT6vbVqZ8XoJ61ph7UjNVvfFwAilnCodqkNsAodpy13gDhoxZXw00pghnyg==", + "@peculiar/asn1-pfx@2.9.4": { + "integrity": "sha512-khuGzHTzNzk4GDlIBEILyIs6Lce0yn0ZBdoI9v93kmNncfZRhD+AQ5ODFqdhvoE8cMJF/JMTQ8yA+t1D14kqCw==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pkcs8", @@ -111,8 +111,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs8@2.8.0": { - "integrity": "sha512-qAKXtLpBEw9LqhKpjw3ajZSXlBur+ipW+y2ivVBQAG6F6qRx94yO+1ZR4mvw+YaCfKSaOzLeYEzsPaBp4SJELA==", + "@peculiar/asn1-pkcs8@2.9.4": { + "integrity": "sha512-duRdotlUx9eDZe6QrQpQKl61RbWykCHBCkKayP8V8XdEFwlKHZ8qGGDMyS6Pye7OX7nLFttTTpRkJeet78ckwQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -120,8 +120,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs9@2.8.0": { - "integrity": "sha512-b5nDWCnkV60+cQ141D6sVVwK9nz64R5n3zSVnklGd+ECdkW2Ol3U1a6yYFlalpSOaD557yuJB64A+q42jG7lUQ==", + "@peculiar/asn1-pkcs9@2.9.4": { + "integrity": "sha512-kaL4cNxBpdQE2dKlyZBqz4ygCrwffO+8wfoxTEqM1Z8RadvCeELBRzcv0dzM8aY9azHMwODO5nxU65zXmhToOQ==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pfx", @@ -133,8 +133,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-rsa@2.8.0": { - "integrity": "sha512-zHEUlCqB2mk7x2lxDwHHJy7hWZOPdGHVlsmITWKB5/PbQo61atbu9PJ/0r9dQNMwFzbKPXZ8uK8/91eUhRznSg==", + "@peculiar/asn1-rsa@2.9.4": { + "integrity": "sha512-pZ96eD1PptovcWQ/GSmuNFXd/7EQJNlKfDaNCyE2rx3W0v6QFelkzquVqRSRyyDXXCYD69ZXJDzZ8GhIiQzKoA==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -142,16 +142,16 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-schema@2.8.0": { - "integrity": "sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q==", + "@peculiar/asn1-schema@2.9.4": { + "integrity": "sha512-GjzePcT9Iw8NzeOPf73iNS9xM+TBhd/FilAfP+RQGkTMQJTVWtytN3JHJACCjf/ABNau5S7mS3g+DcuxmRgYEg==", "dependencies": [ "@peculiar/utils", "asn1js", "tslib@2.8.1" ] }, - "@peculiar/asn1-x509-attr@2.8.0": { - "integrity": "sha512-tHjkfS/qhMnmrlB2J9NhflQlQ7In3khO3CfmVrriOlpTeErY9ZIKOso1hQ5JQiyrJ7ShvqVPk7E5fQmbclkSKA==", + "@peculiar/asn1-x509-attr@2.9.4": { + "integrity": "sha512-ehQXbpQaQYycgu8OrvigwSPTFfVRcu0ECNYCWw+yzBp02Lw5paRqzzhUpfOgO2K38+WfFZuEz/0RPtam5g0OMg==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -159,8 +159,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-x509@2.8.0": { - "integrity": "sha512-N0CMuhWUzsWEVq6F1q9X6+VKUnWzSW+cSVg+aPaGGwDdbFoFWTYgin5MHwXgpWd6y9COMBxnfy/Qc+Xc7F0Zwg==", + "@peculiar/asn1-x509@2.9.4": { + "integrity": "sha512-CxhBo/RdEbMMob7T31ZdQjGuoyRFLVwrDzTn25bihzBasRg9kRm/0IxIPvhgQtcK/9dNcO1XQL2fuPugwELL0Q==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/utils", @@ -332,8 +332,8 @@ "lodash@4.18.1": { "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==" }, - "mediabunny@1.53.0": { - "integrity": "sha512-RjWe9yJr9MPvb6kX4gSu54fZD2w1yf6RyCS0Jmgaml+fFSqEr7+XuASXoRxSqJxgc+wIe+7TujXWcyj3evJ3Bg==", + "mediabunny@1.55.1": { + "integrity": "sha512-JDdTEUOw9g6Ey8eWc2Ei63GmRGtGTJoE56SE7CHikwzS8i9xpsWcve4bEiUw47d4j49L3r7MXDFsH/5oZIhjBw==", "dependencies": [ "@types/dom-mediacapture-transform", "@types/dom-webcodecs" @@ -390,9 +390,6 @@ "wrappy" ] }, - "p-cancelable@2.1.1": { - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, "playwright-core@1.62.1": { "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", "bin": true @@ -453,9 +450,6 @@ "reflect-metadata@0.2.2": { "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "rx.mini@1.4.0": { - "integrity": "sha512-8w5cSc1mwNja7fl465DXOkVvIOkpvh2GW4jo31nAIvX4WTXCsRnKJGUfiDBzWtYRInEcHAUYIZfzusjIrea8gA==" - }, "safe-buffer@5.2.1": { "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, @@ -554,18 +548,11 @@ "tweetnacl" ] }, - "werift-ice@0.2.2": { - "integrity": "sha512-td52pHp+JmFnUn5jfDr/SSNO0dMCbknhuPdN1tFp9cfRj5jaktN63qnAdUuZC20QCC3ETWdsOthcm+RalHpFCQ==", + "werift-ice@0.2.3": { + "integrity": "sha512-k000fIaw8w2D4Xv5EvW6b5h4faJx8p4D8HPuDzRiGTx6UrLv2BuvUkC60LNqxlDf9o3zh90Hx1WZoHbhuw9keA==", "dependencies": [ - "@shinyoshiaki/jspack", - "buffer-crc32", "debug", - "int64-buffer", - "ip", - "lodash", - "multicast-dns", - "p-cancelable", - "rx.mini" + "multicast-dns" ] }, "werift-rtp@0.8.9": { @@ -618,16 +605,16 @@ }, "workspace": { "dependencies": [ - "jsr:@deltic/ct-runner@0.2.0", - "jsr:@deltic/runtime@0.2.0", - "jsr:@deltic/translator@0.2.0", - "jsr:@deltic/wasi@0.2.0", + "jsr:@polyengine/ct-runner@0.3.0", + "jsr:@polyengine/runtime@0.3.0", + "jsr:@polyengine/translator@0.3.0", + "jsr:@polyengine/wasi@0.3.0", "npm:node-datachannel@0.32.3", "npm:werift@0.22.2" ], "packageJson": { "dependencies": [ - "npm:@jsr/polymorph__test@0.1.1", + "npm:@jsr/polymorph__test@0.2.0", "npm:playwright-core@^1.61.1" ] } diff --git a/conformance/driver-ct/deltic/package-lock.json b/conformance/driver-ct/polyengine/package-lock.json similarity index 68% rename from conformance/driver-ct/deltic/package-lock.json rename to conformance/driver-ct/polyengine/package-lock.json index 6198e84..fd5eacf 100644 --- a/conformance/driver-ct/deltic/package-lock.json +++ b/conformance/driver-ct/polyengine/package-lock.json @@ -1,19 +1,19 @@ { - "name": "@polymorph/webrtc-conformance-deltic-browser", + "name": "@polymorph/webrtc-conformance-polyengine-browser", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@polymorph/webrtc-conformance-deltic-browser", + "name": "@polymorph/webrtc-conformance-polyengine-browser", "dependencies": { - "@jsr/polymorph__test": "0.1.1", + "@jsr/polymorph__test": "0.2.0", "playwright-core": "^1.61.1" } }, "node_modules/@jsr/polymorph__test": { - "version": "0.1.1", - "resolved": "https://npm.jsr.io/~/11/@jsr/polymorph__test/0.1.1.tgz", - "integrity": "sha512-bu0jE52btthChm83f04rQo+twOLszJ/JN7nLGl/5W/66cZb8tQrlZG+Lnd4/XierTlBgy0PpW75bjbqQBY2nDg==" + "version": "0.2.0", + "resolved": "https://npm.jsr.io/~/11/@jsr/polymorph__test/0.2.0.tgz", + "integrity": "sha512-fM1IYIy4HnBJm2IlZn/3Gk0d9AmQZz9Kg6JkY0E+fPAhFb2hrAW+4G7TCRQsJ4PStl0rzuBqF9VI6w30f7xCMA==" }, "node_modules/playwright-core": { "version": "1.62.1", diff --git a/conformance/driver-ct/polyengine/package.json b/conformance/driver-ct/polyengine/package.json new file mode 100644 index 0000000..b042d65 --- /dev/null +++ b/conformance/driver-ct/polyengine/package.json @@ -0,0 +1,10 @@ +{ + "name": "@polymorph/webrtc-conformance-polyengine-browser", + "private": true, + "type": "module", + "description": "Node driver for the polyengine-browser child of rtc-ct-driver: playwright + the upstream page harness serving the deno-bundled polyengine page (polyengine-impl over the browser's RTCPeerConnection).", + "dependencies": { + "@jsr/polymorph__test": "0.2.0", + "playwright-core": "^1.61.1" + } +} diff --git a/conformance/driver-ct/deltic/run-browser.mjs b/conformance/driver-ct/polyengine/run-browser.mjs similarity index 82% rename from conformance/driver-ct/deltic/run-browser.mjs rename to conformance/driver-ct/polyengine/run-browser.mjs index f463fdc..9fb905d 100644 --- a/conformance/driver-ct/deltic/run-browser.mjs +++ b/conformance/driver-ct/polyengine/run-browser.mjs @@ -1,18 +1,18 @@ -// The deltic browser child of rtc-ct-driver: the suite COMPONENT -// runtime-linked against this repo's deltic host module (deltic-impl +// The polyengine browser child of rtc-ct-driver: the suite COMPONENT +// runtime-linked against this repo's polyengine host module (polyengine-impl // over the browser's native RTCPeerConnection in a real headless // Chromium) for one selection and (for pair runs) one role. Emits // component-test results JSONL on stdout; the driver folds and merges. // The server, launch, stall watchdog, and Chrome ladder live in the // upstream browser driver; the run itself happens in the page -// (../../../target/deltic-browser/webrtc-page.mjs, one deno-bundled +// (../../../target/polyengine-browser/webrtc-page.mjs, one deno-bundled // module — RTCPeerConnection is Window-only, so no Web Worker pool, and // the bundle needs no import map). This file is the frame: the // signaling reverse-proxy, the role environment, target configuration, // and the stdout contract — the browser sibling of ./run.ts (the retired // jco legs carried the same sibling split; see git history). // -// deltic is a runtime linker: no transpile step, no generated tree, no +// polyengine is a runtime linker: no transpile step, no generated tree, no // engine flag (the callback ABI runs on stock Chromium). import { access } from "node:fs/promises"; import { dirname, resolve } from "node:path"; @@ -24,13 +24,13 @@ import { runPageHarness, } from "@jsr/polymorph__test/browser-driver"; -const DELTIC_DIR = dirname(fileURLToPath(import.meta.url)); -const REPO_ROOT = resolve(DELTIC_DIR, "..", "..", ".."); +const POLYENGINE_DIR = dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = resolve(POLYENGINE_DIR, "..", "..", ".."); // The bundle + translator asset live in a version-free directory: the -// deno.lock files own the deltic version now (no tag to keep in sync -// here; see justfile's `_deltic-browser-bundle` recipe). -const PAGE_URL = "/target/deltic-browser/webrtc-page.mjs"; -const TRANSLATOR_URL = "/target/deltic-browser/deltic-translator-shim.wasm"; +// deno.lock files own the polyengine version now (no tag to keep in sync +// here; see justfile's `_polyengine-browser-bundle` recipe). +const PAGE_URL = "/target/polyengine-browser/webrtc-page.mjs"; +const TRANSLATOR_URL = "/target/polyengine-browser/polyengine-translator-shim.wasm"; const MAX_INBOUND_BUFFER_BYTES = 512 * 1024; // The single-attempt wall bound per case, matching the wasmtime leg. const CASE_TIMEOUT_MS = 90_000; @@ -45,7 +45,7 @@ const { values } = parseArgs({ default: "/target/wasm32-wasip2/release/conformance_guest_ct.wasm", }, name: { type: "string", default: "conformance-guest-ct" }, - target: { type: "string", default: "deltic-browser" }, + target: { type: "string", default: "polyengine-browser" }, select: { type: "string", default: "" }, }, }); @@ -79,8 +79,8 @@ async function proxy(req, res, signalingBase) { async function main() { for (const [what, rel] of [ - ["bundled page (run `just conformance::run-deltic-browser`)", PAGE_URL], - ["translator asset (run `just conformance::run-deltic-browser`)", TRANSLATOR_URL], + ["bundled page (run `just conformance::run-polyengine-browser`)", PAGE_URL], + ["translator asset (run `just conformance::run-polyengine-browser`)", TRANSLATOR_URL], ["suite component (run `just conformance::build-suites`)", values.suite], ]) { try { @@ -113,7 +113,7 @@ async function main() { }; const html = ` -conformance-ct deltic browser leg +conformance-ct polyengine browser leg