Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
19 changes: 11 additions & 8 deletions js/runner-deltic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<shorthash>`, 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 `<next>-pre.g<shorthash>` 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/...@<version>`
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
Expand Down
2 changes: 1 addition & 1 deletion js/runner-deltic/bench-mint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions js/runner-deltic/browser-bundle-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
24 changes: 13 additions & 11 deletions js/runner-deltic/deno.json
Original file line number Diff line number Diff line change
@@ -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<shorthash>`, 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
// `<next>-pre.g<shorthash>` 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
Expand All @@ -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
Expand Down
40 changes: 20 additions & 20 deletions js/runner-deltic/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/runner-deltic/engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
};
Expand Down
4 changes: 2 additions & 2 deletions js/runner-deltic/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion js/viewer/deltic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
})();
Expand Down
2 changes: 1 addition & 1 deletion js/viewer/selftest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*@<hash> 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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
Loading