diff --git a/README.md b/README.md index 4ed0242..c642022 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,13 @@ canonical results format, aggregation, and CI packaging. Status: implemented and in active use (the M1 webcrypto-conformance migration runs on it); the WIT contract below is frozen, and design -history lives in the [issues](../../issues). Downstream consumption is -rev-pinned git dependencies for now — cargo for the crates, npm for the -JS runner core (the root `package.json` exports `js/viewer`'s -source-only modules; its stability policy until registry publishing is -*pinned rev or nothing*). How the pieces layer +history lives in the [issues](../../issues). Everything is **unstable** +(0.x), but [releases](../../releases) are **caret-honest**: within a +minor line they stay backward-compatible, and anything breaking bumps +the minor. Downstream consumption is pinned git dependencies — cargo +for the crates, npm for the JS runner core (the root `package.json` +exports `js/viewer`'s source-only modules) — pointed at a release's +commit and bumped deliberately. How the pieces layer together is described in [ARCHITECTURE.md](ARCHITECTURE.md). Layout: [`crates/`](crates/) (host-side Rust: core model, formats, results schema, guest SDK, CLI, host-embed runner), [`components/`](components/) diff --git a/js/runner-deltic/README.md b/js/runner-deltic/README.md index 33027db..de16893 100644 --- a/js/runner-deltic/README.md +++ b/js/runner-deltic/README.md @@ -6,7 +6,7 @@ the jco leg there is no transpile step, no generated tree, and no engine flag (the contract's async exports run on the callback ABI under stock Deno). Same runner-is-provider topology as `js/runner-node`: deltic's `runSuite` supplies `test-context` host-side and mirrors -`js/viewer/harness.mjs` case-loop semantics; `wasiShims()` serves the +`js/viewer/harness.mjs` case-loop semantics; `wasi()` serves the suites' `wasi:{cli,clocks,io,random,filesystem}` leaves. ```sh @@ -62,16 +62,19 @@ bundleUrl-loading defaults. ## Pinning -deltic is consumed from JSR as **exact-pinned unstable prereleases**: -every green deltic `main` commit publishes -`@deltic/{runtime,translator,wasi-shims,ct-runner}` as -`0.1.0-pre.g`, so one version names one upstream commit -(there is no stable line yet — hash versions are unordered and semver -ranges never resolve to prereleases). +deltic is consumed from JSR as **exact-pinned releases**: +`@deltic/{runtime,translator,wasi,ct-runner}` release in lockstep +from one upstream commit, and upstream is caret-honest (within a minor +line releases stay compatible; breaking changes bump the minor), so a +bump within a minor line is routine and a minor bump is a compatibility +review. The pin stays exact so the version is reviewable here and one +bump is one diff. Between releases every green deltic `main` commit +also publishes `-pre.g` prereleases (unordered hash +versions — pin exactly) for when a not-yet-released commit is needed. - `deno.json` — the import map holds the five `jsr:@deltic/...@` specifiers. `@deltic/runtime/embedder` is mapped because - `@deltic/wasi-shims` imports it by bare specifier. + `@deltic/wasi` imports it by bare specifier. `minimumDependencyAge` exempts the `@deltic` scope so same-day publishes resolve (Deno >= 2.9 for the wildcard exclude). - `deno.lock` — carries JSR package integrity for that graph and is diff --git a/js/runner-deltic/bench-mint.mjs b/js/runner-deltic/bench-mint.mjs index 66c1c7a..d33ae9c 100644 --- a/js/runner-deltic/bench-mint.mjs +++ b/js/runner-deltic/bench-mint.mjs @@ -82,7 +82,7 @@ console.log( for (const n of caseCounts) { const imports = { - ...deltic.wasiShims({ cli: { env: { BENCH_CASES: String(n) } } }), + ...deltic.wasi({ cli: { env: { BENCH_CASES: String(n) } } }), ...deltic.testContextImportRecord(), }; const warmup = Math.min(3, instances); diff --git a/js/runner-deltic/browser-bundle-entry.ts b/js/runner-deltic/browser-bundle-entry.ts index 706032f..f9e6930 100644 --- a/js/runner-deltic/browser-bundle-entry.ts +++ b/js/runner-deltic/browser-bundle-entry.ts @@ -14,5 +14,5 @@ export * from "@deltic/runtime/embedder"; export { Translator } from "@deltic/runtime/shim"; export * from "@deltic/ct-runner"; -export { wasiShims } from "@deltic/wasi-shims"; -export type { WasiShims, WasiShimsOptions } from "@deltic/wasi-shims"; +export { wasi } from "@deltic/wasi"; +export type { WasiImports, WasiOptions } from "@deltic/wasi"; diff --git a/js/runner-deltic/deno.json b/js/runner-deltic/deno.json index ac22263..8b14834 100644 --- a/js/runner-deltic/deno.json +++ b/js/runner-deltic/deno.json @@ -1,13 +1,15 @@ { - // MODULE IDENTITY — deltic is consumed from JSR as exact-pinned unstable - // prereleases: every green deltic `main` commit publishes - // `0.1.0-pre.g`, so the version below NAMES ONE upstream commit - // (there is no stable line yet; hash versions are unordered and semver - // ranges never resolve to prereleases, hence exact pins). All four + // MODULE IDENTITY — deltic is consumed from JSR as exact-pinned + // releases. Upstream is caret-honest (within a minor line releases stay + // compatible; breaking changes bump the minor); the pin stays exact so + // the version is reviewable here and one bump is one diff. Between + // releases every green deltic `main` commit also publishes + // `-pre.g` prereleases (unordered hash versions — pin + // exactly) for when a not-yet-released commit is needed. All four // packages must carry the SAME version — `just verify-deltic`'s pin gate // asserts that repo-wide. // - // `@deltic/runtime/embedder` is mapped because `@deltic/wasi-shims` + // `@deltic/runtime/embedder` is mapped because `@deltic/wasi` // imports it by bare specifier. `@deltic/translator` ships the translator // wasm built from the same commit: the Deno leg loads it through the // module graph (`defaultTranslator()`, permission-free) and the browser @@ -19,11 +21,11 @@ // re-run `deno install --entrypoint runner.ts browser-bundle-entry.ts` in // this directory, and commit the diff (see README.md "Pinning"). "imports": { - "@deltic/ct-runner": "jsr:@deltic/ct-runner@0.1.0-pre.g078aa15", - "@deltic/runtime/embedder": "jsr:@deltic/runtime@0.1.0-pre.g078aa15/embedder", - "@deltic/runtime/shim": "jsr:@deltic/runtime@0.1.0-pre.g078aa15/shim", - "@deltic/translator": "jsr:@deltic/translator@0.1.0-pre.g078aa15", - "@deltic/wasi-shims": "jsr:@deltic/wasi-shims@0.1.0-pre.g078aa15" + "@deltic/ct-runner": "jsr:@deltic/ct-runner@0.1.0", + "@deltic/runtime/embedder": "jsr:@deltic/runtime@0.1.0/embedder", + "@deltic/runtime/shim": "jsr:@deltic/runtime@0.1.0/shim", + "@deltic/translator": "jsr:@deltic/translator@0.1.0", + "@deltic/wasi": "jsr:@deltic/wasi@0.1.0" }, // Deno's supply-chain minimum-dependency-age gate (24h default) applies // even to exact prerelease pins; deltic publishes per commit, so the diff --git a/js/runner-deltic/deno.lock b/js/runner-deltic/deno.lock index 6407ece..dda4280 100644 --- a/js/runner-deltic/deno.lock +++ b/js/runner-deltic/deno.lock @@ -1,49 +1,49 @@ { "version": "5", "specifiers": { - "jsr:@deltic/ct-runner@0.1.0-pre.g078aa15": "0.1.0-pre.g078aa15", + "jsr:@deltic/ct-runner@0.1.0": "0.1.0", "jsr:@deltic/protocol@0.2": "0.2.0", - "jsr:@deltic/runtime@0.1.0-pre.g078aa15": "0.1.0-pre.g078aa15", - "jsr:@deltic/runtime@~0.1.0-pre.g078aa15": "0.1.0-pre.g078aa15", - "jsr:@deltic/translator@0.1.0-pre.g078aa15": "0.1.0-pre.g078aa15", - "jsr:@deltic/wasi-shims@0.1.0-pre.g078aa15": "0.1.0-pre.g078aa15" + "jsr:@deltic/runtime@0.1": "0.1.0", + "jsr:@deltic/runtime@0.1.0": "0.1.0", + "jsr:@deltic/translator@0.1.0": "0.1.0", + "jsr:@deltic/wasi@0.1.0": "0.1.0" }, "jsr": { - "@deltic/ct-runner@0.1.0-pre.g078aa15": { - "integrity": "d777a53e6be337d999a80de030628e1226ae7649ca62e49dd444e58d0973e6be", + "@deltic/ct-runner@0.1.0": { + "integrity": "cf642f22675d6733b6d13117cebdd2de95135884d2a1231764a3f7a4e3314982", "dependencies": [ - "jsr:@deltic/runtime@~0.1.0-pre.g078aa15" + "jsr:@deltic/runtime@0.1" ] }, "@deltic/protocol@0.2.0": { "integrity": "028be6a3623c5e910598aa7a199209b85e8931ae484ac7f6638d610ddb0e19fa" }, - "@deltic/runtime@0.1.0-pre.g078aa15": { - "integrity": "5e64f8dc6d32190ecd394d6ad9881eb0fa97b6598b1e7f2ef1d52cff4674287c", + "@deltic/runtime@0.1.0": { + "integrity": "8d3f52f1a336a2dd9aed28a5c34fd281612a2f55a1582b159be614dd678593b3", "dependencies": [ "jsr:@deltic/protocol" ] }, - "@deltic/translator@0.1.0-pre.g078aa15": { - "integrity": "7125f99ac46af4a69f1c432def2b7ea4be63509c3a7ebae83537357615ec33ef", + "@deltic/translator@0.1.0": { + "integrity": "c447f27a90d7637dd3d5709f3f25378ded0f4b985bedc890c3f6a8cb9ff1eb9f", "dependencies": [ - "jsr:@deltic/runtime@~0.1.0-pre.g078aa15" + "jsr:@deltic/runtime@0.1" ] }, - "@deltic/wasi-shims@0.1.0-pre.g078aa15": { - "integrity": "fba2081f804eaaccf95e31cdd634fd85a2d724f6be7f62578ddc26aef03524a1", + "@deltic/wasi@0.1.0": { + "integrity": "c35a19d139d684dafeca8ba200230a3eb1154627c80db298ae1393e3af938d68", "dependencies": [ "jsr:@deltic/protocol", - "jsr:@deltic/runtime@~0.1.0-pre.g078aa15" + "jsr:@deltic/runtime@0.1" ] } }, "workspace": { "dependencies": [ - "jsr:@deltic/ct-runner@0.1.0-pre.g078aa15", - "jsr:@deltic/runtime@0.1.0-pre.g078aa15", - "jsr:@deltic/translator@0.1.0-pre.g078aa15", - "jsr:@deltic/wasi-shims@0.1.0-pre.g078aa15" + "jsr:@deltic/ct-runner@0.1.0", + "jsr:@deltic/runtime@0.1.0", + "jsr:@deltic/translator@0.1.0", + "jsr:@deltic/wasi@0.1.0" ] } } diff --git a/js/runner-deltic/engine.mjs b/js/runner-deltic/engine.mjs index e812ea3..cf8c1fa 100644 --- a/js/runner-deltic/engine.mjs +++ b/js/runner-deltic/engine.mjs @@ -4,7 +4,7 @@ // component, and hand back exactly what harness.mjs `runCases` needs. // deltic is a runtime linker — the suite arrives as the COMPONENT wasm // (no transpiled module, no core files, no imports module; WASI comes -// from the bundle's wasiShims, test-context from its ct-runner glue). +// from the bundle's wasi(), test-context from its ct-runner glue). // // The Context handed to runCases MUST be the bundle's own Context class: // `testContextImportRecord()` registers that exact class as the @@ -33,7 +33,7 @@ export async function loadSuite( const artifacts = { plan, componentBytes: suiteBytes, adapters }; const imports = { - ...deltic.wasiShims({ cli: { env: Object.fromEntries(env) } }), + ...deltic.wasi({ cli: { env: Object.fromEntries(env) } }), ...deltic.testContextImportRecord(), ...hostImports, }; diff --git a/js/runner-deltic/runner.ts b/js/runner-deltic/runner.ts index a33cad1..8c60dd4 100644 --- a/js/runner-deltic/runner.ts +++ b/js/runner-deltic/runner.ts @@ -24,7 +24,7 @@ import { Translator } from "@deltic/runtime/shim"; import { defaultTranslator } from "@deltic/translator"; import { runSuite } from "@deltic/ct-runner"; -import { wasiShims } from "@deltic/wasi-shims"; +import { wasi } from "@deltic/wasi"; interface Cli { suitePath: string; @@ -122,7 +122,7 @@ async function main() { const lines: string[] = []; const counts = await runSuite({ plan, componentBytes, adapters }, { - imports: wasiShims(), + imports: wasi(), target: cli.target, suiteName: suiteNameFrom(cli.suitePath), missing: cli.missing, diff --git a/js/viewer/deltic.mjs b/js/viewer/deltic.mjs index 86eed65..bf89c78 100644 --- a/js/viewer/deltic.mjs +++ b/js/viewer/deltic.mjs @@ -44,7 +44,7 @@ export function aggregateEngine() { const { plan, adapters } = translator.translate(componentBytes); const inst = await deltic.instantiate( { plan, componentBytes, adapters }, - deltic.wasiShims(), + deltic.wasi(), ); return inst.exports.run; })(); diff --git a/js/viewer/selftest.mjs b/js/viewer/selftest.mjs index 3e4af4e..c2817c4 100644 --- a/js/viewer/selftest.mjs +++ b/js/viewer/selftest.mjs @@ -44,7 +44,7 @@ const componentBytes = new Uint8Array(readFileSync(aggregatePath)); const { plan, adapters } = translator.translate(componentBytes); const inst = await deltic.instantiate( { plan, componentBytes, adapters }, - deltic.wasiShims(), + deltic.wasi(), ); const aggregate = inst.exports.run; diff --git a/justfile b/justfile index e427b51..465b3d3 100644 --- a/justfile +++ b/justfile @@ -138,7 +138,7 @@ verify-cli: build # # CONTRACT: as of deltic pre-b297834 (A10), @deltic/protocol ships as a # stable, independently-versioned package (0.1.0, no per-commit prerelease -# hash) that @deltic/runtime/wasi-shims depend on transitively — it is not +# hash) that @deltic/{runtime,wasi} depend on transitively — it is not # named by any jsr:@deltic/*@ specifier in deno.json and isn't part # of the "one version names one commit" pin this gate polices. Excluded by # name rather than by pattern, so drift in any *other* @deltic package diff --git a/package.json b/package.json index f40a0b8..2c44344 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "@polymorph/component-test-js", - "version": "0.2.0", + "version": "0.1.0", "private": false, "type": "module", - "description": "The polymorph:test stack's JS runner core, consumable as a rev-pinned git dependency (npm git installs cannot select subdirectories, so this facade lives at the repo root). Source-only by design: the browser-safe harness (tag inventory, mark scheduling, the case loop), the test-context provider, and the shard workers (jco- and deltic-shaped). Built artifacts (the viewer-aggregate engine) are deliberately excluded - they wait for registry publishing. Stability policy until then: pinned rev or nothing.", + "description": "The polymorph:test stack's JS runner core, consumable as a pinned git dependency (npm git installs cannot select subdirectories, so this facade lives at the repo root). Source-only by design: the browser-safe harness (tag inventory, mark scheduling, the case loop), the test-context provider, and the shard workers (jco- and deltic-shaped). Built artifacts (the viewer-aggregate engine) are deliberately excluded - they wait for registry publishing. Stability policy: unstable 0.x, caret-honest releases (breaking changes bump the minor); pin a release's commit and bump deliberately.", "license": "Apache-2.0 WITH LLVM-exception", "repository": "github:polymorph-components/polymorph-test", "files": [