diff --git a/host-deltic/README.md b/host-deltic/README.md index 5b8fd3a..3878e53 100644 --- a/host-deltic/README.md +++ b/host-deltic/README.md @@ -83,7 +83,18 @@ diff. ## Module identity deltic's wasi-shims and the sibling deltic host modules import -`@deltic/runtime/embedder` by bare specifier internally; `deno.json` -maps that specifier once for the whole module graph, so there is exactly -one `WitError`/`Stream` module instance and `instanceof` holds across -every boundary. +`@deltic/runtime/embedder` by bare specifier internally. This config's +import map does NOT govern the sibling checkouts' files: a `.deps` +module under its own package-shaped `deno.json` (name + exports) +resolves its bare specifiers against THAT config — before the `.deps` +pins converged on JSR-consuming sibling revisions, the webcrypto module +silently rode a raw pinned-tag embedder while everything else used the +JSR one, and `instanceof WitError` did not hold across its boundary. +Identity therefore rests on every config in the graph — this one and +each pinned sibling's — naming the SAME `jsr:@deltic/*` version, so the +resolver dedupes to one `WitError`/`Stream` module instance. Two gates +in `just exam-deltic` keep it true: the pin grep (this repo's configs +agree) and `scripts/deltic-identity-gate.ts` (the RESOLVED run-endpoint +graph carries exactly one `@deltic/runtime` and no raw URLs). Bumping a +`.deps` pin to a sibling revision that consumes a different deltic +version trips the gate; converge the versions instead. diff --git a/host-deltic/deno.lock b/host-deltic/deno.lock index 37c8f41..02f7134 100644 --- a/host-deltic/deno.lock +++ b/host-deltic/deno.lock @@ -591,56 +591,6 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } }, - "remote": { - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/async_values.ts": "af1279d4e4db5b756268979aeff5b27c1cf6c0f021213655676ade90472f282b", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/context.ts": "b4b60891ef9d9e72b208636f6ba37f0b9b6962d307af6156ad3b5ad59a626902", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/flatten.ts": "6c980fe38d7adce349d5e028b819eb0ffbb92714f958c1d5daae8da3e7ed3889", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/float.ts": "0483e8c1aa8786eee4c6f6357fee6738555e4310650c474aba6cd811a80d7d36", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/handles.ts": "30510750261499f48a812bb8c349a8f88a3bb7239175e6f1d4e6d10c38571e5d", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/layout.ts": "8122141b39f4d8189c13d91fc1b37825ceead86988f879f3fa9351bbef96f8f2", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/lift.ts": "e4475a44a5618114f288025601b535bc04b97e9a37b3be21f51d3be092d419c8", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/load.ts": "c1d8ddb1b3b3c59afe30710a97ad6dd7ae1ecd59aa1d427a5eaf4552d3b1ea01", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/lower.ts": "916ef7476dc583783770f4c42de7a655350531b3763c81a92249cca96f5e4d80", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/memory.ts": "09728360d6413fb30a5a7bff1ba6abec1ac6474ff150d45f093b8ebe5e65cd51", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/mod.ts": "b79cf9e2bab2e837fee76fa61dc18bff66d941e08597f1b76de93811bd6d6008", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/store.ts": "97aaecfeb4dfbf5c3c132fb5eadf1f5677924936eee0c7fa75a266a00cd73634", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/strings.ts": "9589dda3857725792ae15ef6888449b48e973b9eb0f3058ed64e10bf4d39b793", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/trap.ts": "307d8b48806eeba30400b3d7db9370cee70a12298851c1c19053dd8ca0013e1c", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/types.ts": "d0392e8cdf2990a76c8a1f9b85795d3b7c19b8eb006c2b159b671d08c39b9535", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/cabi/values.ts": "9e6ddcc4192d05897b2cbea250db3fef0ad9bf6548ba87aff378ee14b7ab7022", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/casing.ts": "1e9083becfc08107c09015ce3db79c304b05c40085a3c899ea1c8ebe25fcd45f", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/errors.ts": "b0cac244526b92c052d165f2aee1d9492e5915a5a4cad114e1ab575ffe1587ba", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/imports.ts": "98cca003e4a1131c35854c91b458f109d6761a3e8f67c23730f7e9bc28bbad88", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/instantiate.ts": "ef330d0a8562932e38d3a8a38a155bbd66ddb9c5d1025a1d39b5ce567817f334", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/mod.ts": "0a4f42b8c569b528b4c3172c3394ad5f9ddafa33bcaf5eccd00e645e111da2b1", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/resources.ts": "d209e5f13545b9c0c095ac4e188b72370d97c9bd394ba7c8793ddd74f436b1ef", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/streams.ts": "4ef894a43da94b4cb01ee65798a108a8fb3f6b2dc6013c71881f63e0806df565", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/values.ts": "ed876f9103f4a4f34e8eb475934091156bee1447f5a029ea300644b8f3ee71eb", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/embedder/version.ts": "b1c589988e5fb88dce3a014846c9253399e286f12afb5fd92509c8d6090ad4bb", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/exec/boundary.ts": "1b4b7d6394a79b4048fb932219ea9420c6461106c30d1bd70b29b09e16cad20d", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/exec/executor.ts": "267a6e5542e0fef3a930a3e2242aa58c3c83aa25b174c7533a07b70960f74e5d", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/exec/host_streams.ts": "63f6b113806c401ae9895df82448da70a7745a97b6e2f04061fb5bc64e7d0acf", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/exec/mod.ts": "a46320977ece14342bcb72c9c9e36d65a1cd09d789591d0909d7d1185264010b", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/async_builtins.ts": "526795358da8908d54a483bb47eebc43e0a1ea59e69ece94d0c6890ad0fa8784", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/context.ts": "be93b23d127ff71d5c372781f89d1c3746c5d32a44e67ebbcd91f2b0f0807e93", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/errors.ts": "9d09fc1818b4dc98b238aa69008a9110d9d305b6a8e806604f3bd48fca1eebcb", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/fact_calls.ts": "aa0b0aef81b59cdcd8dc572c20e1f57a8f5592f75a0d5d666032851df9201229", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/mod.ts": "f9c095e561f5fbb51f70693b21f272f66241f2e8ff2e1a83cd4176bcd0104eb9", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/stream_builtins.ts": "bbc1e1ea0e4616026a46d790a68695aa70589a88b08a6275acdb525f0ab531ec", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/intrinsics/transcode.ts": "e3fcaeb7a60b6cbad999d9389d4bce59e305e6f54e035ba791f909e10d1f82c7", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/jspi/bridge.ts": "7cf3706d3bf34b503aea516a31918a8d930aba3dac7e94ec04caecd23fe6025e", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/jspi/mechanics.ts": "dc0fe4965b3ef8c0aff6674afd8bae2a38942ab934fa07fd2eb7db72b2462f17", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/jspi/mod.ts": "4d047b820b50c410ed946c62dc48286f8abe4787ce6ae5466cd0ae255d98943c", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/jspi/types.ts": "86929224733a764a148ac75a9d6b95d61ab4c8123a48fe956d998e97726a1432", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/plan/format.ts": "90e31bbc7137c2f80c0782e1431afb6f81827aab8d38dba1178b8761f1b3ea0a", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/plan/loader.ts": "107db77e724a7f74f161a5fd20e7110a6e6f182c46f18282eba650bc887dc876", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/mod.ts": "5decca8045dfd9743910e83d512258a7be3b0d0917954b8d9cdbac38e03f7dfb", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/scheduler.ts": "18a4404f620407bd867876115861ee0cf98f6f1ccd41c5f3c877ef90e429ef9c", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/streams.ts": "83b522a6393ba06fbdb87881bc6761f3fce9c03b85e9eda03d3befe7d2605a60", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/subtask.ts": "750b13a1318f62836bfd149f1b9144de5b017fd7a84adc8e2fb2151e63130fbc", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/thread.ts": "81fe38b37a1ec130803b478a24e428b19ee4e1ef8c0bae741395cd8d52751580", - "https://raw.githubusercontent.com/lann/deltic/pre-58b2404/runtime/src/task/waitable.ts": "5e1fc092e3d8f1fb4429d6a91d8886b3e474aa9ac6254e7924fd896c4929e1f9" - }, "workspace": { "dependencies": [ "jsr:@deltic/runtime@0.1.0-pre.ga67ee83", @@ -650,7 +600,11 @@ "npm:werift@0.22.2" ], "links": { - "jsr:@polymorph/webcrypto-deltic@0.0.0": {} + "jsr:@polymorph/webcrypto-deltic@0.0.0": { + "dependencies": [ + "jsr:@deltic/runtime@0.1.0-pre.ga67ee83" + ] + } } } } diff --git a/justfile b/justfile index 707c28e..e0c0d93 100644 --- a/justfile +++ b/justfile @@ -81,6 +81,11 @@ exam-deltic: build-components relay-build deltic-setup echo "deltic pin drift across deno.jsons: $v" >&2 exit 1 fi + # ...and the RESOLVED graph must agree: one embedder instance, no raw + # URLs (a sibling .deps module's own config can silently split module + # identity in a way no config grep catches; see the gate script). + deno info --json --config host-deltic/deno.json host-deltic/src/run-endpoint.ts \ + | deno run scripts/deltic-identity-gate.ts timeout 600 deno run -A --config host-deltic/deno.json --frozen \ host-deltic/src/run-endpoint.ts diff --git a/scripts/deltic-identity-gate.ts b/scripts/deltic-identity-gate.ts new file mode 100644 index 0000000..b19c4cc --- /dev/null +++ b/scripts/deltic-identity-gate.ts @@ -0,0 +1,34 @@ +// The deltic module-identity assert (host-deltic/README.md "Module +// identity"): the run-endpoint graph must contain exactly ONE +// @deltic/runtime version and ZERO raw.githubusercontent modules. +// +// The failure this guards (seen live before the .deps pins converged on +// JSR-consuming sibling revisions): a sibling host module's own +// package-shaped deno.json mapped @deltic/runtime/embedder to a raw +// pinned-tag URL, so the graph carried TWO embedder module instances and +// `instanceof WitError` silently stopped holding across that sibling's +// boundary. Config greps can't see this — only the resolved graph can — +// so the exam pipes `deno info --json` through this assert. +// +// deno info --json --config host-deltic/deno.json \ +// host-deltic/src/run-endpoint.ts | deno run scripts/deltic-identity-gate.ts +const g = JSON.parse(await new Response(Deno.stdin.readable).text()); +const raw = g.modules.filter((m: { specifier: string }) => + m.specifier.includes("raw.githubusercontent") +); +const vers = new Set( + g.modules + .map((m: { specifier: string }) => + m.specifier.match(/jsr\.io\/@deltic\/runtime\/([^/]+)\//)?.[1] + ) + .filter(Boolean), +); +if (raw.length || vers.size !== 1) { + console.error( + `deltic module identity violated: ${raw.length} raw-URL module(s), ` + + `@deltic/runtime versions=[${[...vers].join(", ")}] (want exactly one, no raw URLs)`, + ); + for (const m of raw.slice(0, 5)) console.error(` raw: ${m.specifier}`); + Deno.exit(1); +} +console.log(`deltic module identity: one runtime (${[...vers][0]}), no raw URLs`); diff --git a/scripts/setup.sh b/scripts/setup.sh index af0fbde..17aa453 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -16,11 +16,11 @@ JUST_VERSION="${JUST_VERSION:-1.54.0}" WAC_VERSION="${WAC_VERSION:-0.10.1}" WEBRTC_REPO=https://github.com/polymorph-components/polymorph-webrtc-datachannels.git -WEBRTC_PIN=13ddd6b4289e2503cb41fa7680758f2e3ddb08a8 +WEBRTC_PIN=5dc3d4184d2ab82b98aa0ff82a218f9ed1e080eb WEBCRYPTO_REPO=https://github.com/polymorph-components/polymorph-webcrypto.git -WEBCRYPTO_PIN=8a3de9cdaae901643d906b8d83f47bb797a2dd74 +WEBCRYPTO_PIN=a0c924d3f10cc598e9ea2e754dc4f13f162dc749 WEBSOCKET_REPO=https://github.com/polymorph-components/polymorph-websocket.git -WEBSOCKET_PIN=f8fdf6601d251186a42c66b83f228368415d16ff +WEBSOCKET_PIN=a3b7fb1d0231c110b0bebb493276d23308642537 IROH_REPO=https://github.com/n0-computer/iroh.git IROH_PIN=816dd70c056b813dcb5cbfb6a9a15e12d04b72b1 # v1.0.3 TLS_REPO=https://github.com/polymorph-components/polymorph-tls.git