diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db5589c..be718fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: # Owns the rev derivation, the rev-keyed tools cache, the # install, and the pins gate; conformance-ct::_ct-tools # recognizes the stamped install and does not repeat it. - uses: polymorph-components/polymorph-test/actions/setup@76c094576076284c1a7d0ea1b7bb724e9e7384a5 + uses: polymorph-components/polymorph-test/actions/setup@eabd159de34e38a6f2f32204ceb52392555f32d8 with: js-locks: | conformance/driver-ct/jco/package-lock.json @@ -161,7 +161,7 @@ jobs: # input polices the `uses:` refs against the pin. - name: Publish the conformance matrix if: always() && hashFiles('conformance/driver-ct/results/*.jsonl') != '' - uses: polymorph-components/polymorph-test/actions/aggregate@76c094576076284c1a7d0ea1b7bb724e9e7384a5 + uses: polymorph-components/polymorph-test/actions/aggregate@eabd159de34e38a6f2f32204ceb52392555f32d8 with: lock: conformance/guest-ct/tests.lock manifest: conformance/driver-ct/targets.toml @@ -176,7 +176,7 @@ jobs: - name: Publish the signing conformance matrix if: always() && hashFiles('conformance/driver-ct/results/*.jsonl') != '' - uses: polymorph-components/polymorph-test/actions/aggregate@76c094576076284c1a7d0ea1b7bb724e9e7384a5 + uses: polymorph-components/polymorph-test/actions/aggregate@eabd159de34e38a6f2f32204ceb52392555f32d8 with: lock: conformance/signing-guest-ct/tests.lock manifest: conformance/driver-ct/targets-signing.toml diff --git a/Cargo.lock b/Cargo.lock index ff1bf73..8298748 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -336,7 +336,7 @@ dependencies = [ [[package]] name = "component-test-core" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "arcstr", "serde", @@ -345,7 +345,7 @@ dependencies = [ [[package]] name = "component-test-formats" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "anyhow", "component-test-core", @@ -360,7 +360,7 @@ dependencies = [ [[package]] name = "component-test-results" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "anyhow", "component-test-core", @@ -371,7 +371,7 @@ dependencies = [ [[package]] name = "component-test-runner" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "anyhow", "component-test-core", @@ -387,7 +387,7 @@ dependencies = [ [[package]] name = "component-test-sdk" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "component-test-core", "component-test-sdk-macro", @@ -399,7 +399,7 @@ dependencies = [ [[package]] name = "component-test-sdk-macro" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-test?rev=76c094576076284c1a7d0ea1b7bb724e9e7384a5#76c094576076284c1a7d0ea1b7bb724e9e7384a5" +source = "git+https://github.com/polymorph-components/polymorph-test?rev=eabd159de34e38a6f2f32204ceb52392555f32d8#eabd159de34e38a6f2f32204ceb52392555f32d8" dependencies = [ "component-test-core", "proc-macro2", @@ -2457,7 +2457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix", "windows-sys 0.61.2", diff --git a/Cargo.toml b/Cargo.toml index edbe85d..639760c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,8 @@ resolver = "2" # override — see AGENTS.md "Build & run". Publishing component-test # to a registry retires this arrangement. [workspace.dependencies] -component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "76c094576076284c1a7d0ea1b7bb724e9e7384a5" } -component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "76c094576076284c1a7d0ea1b7bb724e9e7384a5" } +component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "eabd159de34e38a6f2f32204ceb52392555f32d8" } +component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "eabd159de34e38a6f2f32204ceb52392555f32d8" } # The mutation run's profile (`just mutants`): dependencies optimized — # wasmtime and the RustCrypto cores are compiled once, at baseline, and make diff --git a/conformance/driver-ct/jco/package-lock.json b/conformance/driver-ct/jco/package-lock.json index efc925e..ef767ba 100644 --- a/conformance/driver-ct/jco/package-lock.json +++ b/conformance/driver-ct/jco/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", "@bytecodealliance/preview2-shim": "0.17.9", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5", + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8", "playwright-core": "1.62.1" } }, @@ -451,8 +451,8 @@ }, "node_modules/@polymorph/component-test-js": { "version": "0.2.0", - "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#76c094576076284c1a7d0ea1b7bb724e9e7384a5", - "integrity": "sha512-nvkB8aRSsA/B+eQnIrH92Uj1v4qmzj5a9N7lylDhDMqc97IeWPox4eZqTtSX6mxl0lsiotZeU9z0u/BcLBVuqg==", + "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#eabd159de34e38a6f2f32204ceb52392555f32d8", + "integrity": "sha512-s0WkYdtIS1chajOwsrjC5vfpYY8bg4sQ9FGNKtWWU0D8ST7EpoZOBEYP1R9JrFzxp4MKLYxbu+GQeYW+Akh1Hw==", "license": "Apache-2.0 WITH LLVM-exception", "bin": { "component-test-jco-transpile": "js/jco-transpile.mjs" diff --git a/conformance/driver-ct/jco/package.json b/conformance/driver-ct/jco/package.json index dd9dfda..1c827a1 100644 --- a/conformance/driver-ct/jco/package.json +++ b/conformance/driver-ct/jco/package.json @@ -12,7 +12,7 @@ "dependencies": { "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", "@bytecodealliance/preview2-shim": "0.17.9", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5", + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8", "playwright-core": "1.62.1" } } diff --git a/conformance/driver-ct/jco/worker-node.mjs b/conformance/driver-ct/jco/worker-node.mjs index d2b8717..f2d2622 100644 --- a/conformance/driver-ct/jco/worker-node.mjs +++ b/conformance/driver-ct/jco/worker-node.mjs @@ -4,25 +4,20 @@ // suite-order index so the parent can restore suite order — back through // `parentPort`, then reporting the shard's counts. Workers inherit the // parent's execArgv, so `--experimental-wasm-jspi` carries over. -import { readFile, readdir } from "node:fs/promises"; import { fileURLToPath } from "node:url"; import { parentPort, workerData } from "node:worker_threads"; import { cli, clocks, io, random, filesystem } from "@bytecodealliance/preview2-shim"; import { inventoryLookup, runCases } from "@polymorph/component-test-js/harness"; +import { loadCoreModules } from "@polymorph/component-test-js/node-runner"; import { Context } from "../context.js"; import { instantiateSuite } from "./host-imports.mjs"; const { suite, missing, only, shard } = workerData; -const generatedDir = new URL("./generated/", import.meta.url); -const coreBytes = []; -const modules = new Map(); -for (const name of (await readdir(fileURLToPath(generatedDir))).sort()) { - if (!name.startsWith(`${suite}.core`) || !name.endsWith(".wasm")) continue; - const bytes = new Uint8Array(await readFile(new URL(`./generated/${name}`, import.meta.url))); - coreBytes.push(bytes); - modules.set(name, await WebAssembly.compile(bytes)); -} +const { modules, coreBytes } = await loadCoreModules( + fileURLToPath(new URL("./generated/", import.meta.url)), + suite, +); const tagsOf = inventoryLookup(coreBytes); const { instantiate } = await import(`./generated/${suite}.js`); const tests = await instantiateSuite({ diff --git a/examples/jco-demo/package-lock.json b/examples/jco-demo/package-lock.json index fa276b9..45a743f 100644 --- a/examples/jco-demo/package-lock.json +++ b/examples/jco-demo/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "devDependencies": { "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5" + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8" } }, "node_modules/@bytecodealliance/jco-transpile": { @@ -473,8 +473,8 @@ }, "node_modules/@polymorph/component-test-js": { "version": "0.2.0", - "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#76c094576076284c1a7d0ea1b7bb724e9e7384a5", - "integrity": "sha512-nvkB8aRSsA/B+eQnIrH92Uj1v4qmzj5a9N7lylDhDMqc97IeWPox4eZqTtSX6mxl0lsiotZeU9z0u/BcLBVuqg==", + "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#eabd159de34e38a6f2f32204ceb52392555f32d8", + "integrity": "sha512-s0WkYdtIS1chajOwsrjC5vfpYY8bg4sQ9FGNKtWWU0D8ST7EpoZOBEYP1R9JrFzxp4MKLYxbu+GQeYW+Akh1Hw==", "dev": true, "license": "Apache-2.0 WITH LLVM-exception", "bin": { diff --git a/examples/jco-demo/package.json b/examples/jco-demo/package.json index a299853..936988d 100644 --- a/examples/jco-demo/package.json +++ b/examples/jco-demo/package.json @@ -12,6 +12,6 @@ }, "devDependencies": { "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5" + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8" } } diff --git a/js/componentize/wpt/parity/package-lock.json b/js/componentize/wpt/parity/package-lock.json index 7460f74..add1582 100644 --- a/js/componentize/wpt/parity/package-lock.json +++ b/js/componentize/wpt/parity/package-lock.json @@ -10,7 +10,7 @@ "devDependencies": { "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", "@bytecodealliance/preview2-shim": "^0.19.0", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5", + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8", "playwright-core": "^1.62.1" } }, @@ -475,8 +475,8 @@ }, "node_modules/@polymorph/component-test-js": { "version": "0.2.0", - "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#76c094576076284c1a7d0ea1b7bb724e9e7384a5", - "integrity": "sha512-nvkB8aRSsA/B+eQnIrH92Uj1v4qmzj5a9N7lylDhDMqc97IeWPox4eZqTtSX6mxl0lsiotZeU9z0u/BcLBVuqg==", + "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#eabd159de34e38a6f2f32204ceb52392555f32d8", + "integrity": "sha512-s0WkYdtIS1chajOwsrjC5vfpYY8bg4sQ9FGNKtWWU0D8ST7EpoZOBEYP1R9JrFzxp4MKLYxbu+GQeYW+Akh1Hw==", "dev": true, "license": "Apache-2.0 WITH LLVM-exception", "bin": { diff --git a/js/componentize/wpt/parity/package.json b/js/componentize/wpt/parity/package.json index 57c585b..2057cba 100644 --- a/js/componentize/wpt/parity/package.json +++ b/js/componentize/wpt/parity/package.json @@ -18,6 +18,6 @@ "@bytecodealliance/jco-transpile": "https://github.com/lann/jco/releases/download/jco-transpile-0.6.2-fa6990d/bytecodealliance-jco-transpile-0.6.2.tgz", "@bytecodealliance/preview2-shim": "^0.19.0", "playwright-core": "^1.62.1", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5" + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8" } } diff --git a/js/jco/package-lock.json b/js/jco/package-lock.json index bbdb347..86c0cfb 100644 --- a/js/jco/package-lock.json +++ b/js/jco/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "devDependencies": { "@bytecodealliance/jco-transpile": "0.5.2", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5", + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8", "typescript": "^5.9.3" } }, @@ -467,8 +467,8 @@ }, "node_modules/@polymorph/component-test-js": { "version": "0.2.0", - "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#76c094576076284c1a7d0ea1b7bb724e9e7384a5", - "integrity": "sha512-nvkB8aRSsA/B+eQnIrH92Uj1v4qmzj5a9N7lylDhDMqc97IeWPox4eZqTtSX6mxl0lsiotZeU9z0u/BcLBVuqg==", + "resolved": "git+ssh://git@github.com/polymorph-components/polymorph-test.git#eabd159de34e38a6f2f32204ceb52392555f32d8", + "integrity": "sha512-s0WkYdtIS1chajOwsrjC5vfpYY8bg4sQ9FGNKtWWU0D8ST7EpoZOBEYP1R9JrFzxp4MKLYxbu+GQeYW+Akh1Hw==", "dev": true, "license": "Apache-2.0 WITH LLVM-exception", "bin": { diff --git a/js/jco/package.json b/js/jco/package.json index c25c157..9c447ed 100644 --- a/js/jco/package.json +++ b/js/jco/package.json @@ -13,6 +13,6 @@ "devDependencies": { "@bytecodealliance/jco-transpile": "0.5.2", "typescript": "^5.9.3", - "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#76c094576076284c1a7d0ea1b7bb724e9e7384a5" + "@polymorph/component-test-js": "github:polymorph-components/polymorph-test#eabd159de34e38a6f2f32204ceb52392555f32d8" } }