diff --git a/.github/workflows/npm-conformance.yml b/.github/workflows/npm-conformance.yml index e5414cd25..098172395 100644 --- a/.github/workflows/npm-conformance.yml +++ b/.github/workflows/npm-conformance.yml @@ -8,7 +8,10 @@ name: npm conformance # # A runtime joins by adding its shim to sdk/npm/conformance/runtimes.json and a # step to the suite job that writes results/.json; `matrix --check` refuses -# a registered runtime with no results. +# a registered runtime with no results. The Rust column (the DK-42 shim) is a +# receipt keyed by the content identity of its inputs: the suite job builds the +# shim only when no main push has measured those inputs. The unit tests that need +# every registered runtime run there; the OS matrix skips those three. on: pull_request: @@ -22,6 +25,12 @@ on: - sdk/npm/spec/schemas/verdict/** - sdk/npm/spec/test/json-schema.mjs - docs/adr/015-dual-digests.md + # The Rust runtime's shim and what it calls. + - crates/conformance/runtime/** + - crates/conformance/src/bin/prism-conformance-shim.rs + - crates/prismpm/src/inspect/** + - Cargo.lock + - rust-toolchain.toml - COMPLIANCE.md - .github/workflows/npm-conformance.yml push: @@ -35,6 +44,12 @@ on: - sdk/npm/spec/schemas/verdict/** - sdk/npm/spec/test/json-schema.mjs - docs/adr/015-dual-digests.md + # The Rust runtime's shim and what it calls. + - crates/conformance/runtime/** + - crates/conformance/src/bin/prism-conformance-shim.rs + - crates/prismpm/src/inspect/** + - Cargo.lock + - rust-toolchain.toml - COMPLIANCE.md - .github/workflows/npm-conformance.yml @@ -93,9 +108,13 @@ jobs: rm pack.json suite: - name: prism-code passes, and COMPLIANCE.md is current + name: prism-code and the Rust shim pass, and COMPLIANCE.md is current runs-on: ubuntu-24.04 - timeout-minutes: 15 + timeout-minutes: 30 + permissions: + contents: read + # To find and download the Rust receipt of an earlier main push. + actions: read steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -103,11 +122,60 @@ jobs: - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 with: node-version: '24' - - name: Run the suite against the JavaScript runtime + # The Rust column is a Factory receipt: results/rust.json keyed by the content identity of everything that + # decides it (the git blob ids of the Rust sources, vendored crates, lockfile, toolchain pin, the suite and this + # workflow). A main push that measured the same identity left it as an artifact, so an unchanged Rust input + # set is never rebuilt. Only receipts from this repository's main pushes are trusted. + - name: Identify the Rust runtime's inputs + id: rust + shell: bash + run: | + set -euo pipefail + kappa=$(git ls-files -s -- crates vendor Cargo.toml Cargo.lock rust-toolchain.toml .cargo sdk/npm/conformance \ + .github/workflows/npm-conformance.yml | sha256sum | cut -c1-64) + echo "receipt=conformance-rust-$kappa" >> "$GITHUB_OUTPUT" + - name: Reuse the receipt for those inputs + id: receipt shell: bash + env: + GH_TOKEN: ${{ github.token }} + NAME: ${{ steps.rust.outputs.receipt }} run: | set -euo pipefail mkdir -p target/conformance/results + run=$(gh api "repos/$GITHUB_REPOSITORY/actions/artifacts?name=$NAME&per_page=20" --jq '[.artifacts[] + | select(.expired == false and .workflow_run.head_branch == "main" + and .workflow_run.head_repository_id == .workflow_run.repository_id)][0].workflow_run.id // empty') + if [ -n "$run" ] && gh run download "$run" -n "$NAME" -D target/conformance/results; then + echo "hit=true" >> "$GITHUB_OUTPUT" + echo "Rust results reused from run $run ($NAME)" + else + echo "hit=false" >> "$GITHUB_OUTPUT" + fi + # rust-toolchain.toml pins the toolchain; rustup installs it on first use. + - name: Build the Rust runtime's shim and run the suite against it + if: steps.receipt.outputs.hit != 'true' + shell: bash + run: | + set -euo pipefail + cargo build --locked -p repo-conformance --bin prism-conformance-shim + node sdk/npm/conformance/bin/prism-conformance.mjs run --runtime rust \ + --out target/conformance/results/rust.json | tee target/conformance/rust.txt + - name: Keep the Rust results as the receipt for those inputs + if: steps.receipt.outputs.hit != 'true' && github.event_name == 'push' + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: ${{ steps.rust.outputs.receipt }} + path: target/conformance/results/rust.json + if-no-files-found: error + retention-days: 90 + - name: Unit tests that need every registered runtime + working-directory: sdk/npm/conformance + run: node --test test/matrix.test.mjs + - name: Run the suite against the JavaScript runtime + shell: bash + run: | + set -euo pipefail node sdk/npm/conformance/bin/prism-conformance.mjs run --runtime js \ --out target/conformance/results/js.json | tee target/conformance/js.txt - name: Regenerate the matrix from those results @@ -127,8 +195,10 @@ jobs: if [ -f target/conformance/COMPLIANCE.md ]; then sed -n '/^## Features/,/^## Checks/p' target/conformance/COMPLIANCE.md | sed '$d' >> "$GITHUB_STEP_SUMMARY" fi - if [ -f target/conformance/js.txt ]; then - tail -n 2 target/conformance/js.txt >> "$GITHUB_STEP_SUMMARY" - fi + for runtime in js rust; do + if [ -f "target/conformance/$runtime.txt" ]; then + tail -n 2 "target/conformance/$runtime.txt" >> "$GITHUB_STEP_SUMMARY" + fi + done - name: The committed COMPLIANCE.md is the one the suite just generated run: node sdk/npm/conformance/bin/prism-conformance.mjs matrix --results target/conformance/results --check diff --git a/CHANGELOG.md b/CHANGELOG.md index 16dfee48a..d6f7f5ab4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ To move to 1.0, read the [migration guide](docs/site/migration/to-1-0.md). ## [Unreleased] ### Features Added +- `COMPLIANCE.md` shows the Rust runtime (#449, #298): `sdk/npm/conformance/runtimes.json` registers `prism-conformance-shim`, the npm conformance suite job builds it and runs the suite against it beside prism-code, and the matrix shows both runtimes passing all 24 `verify` checks. `prism.verify.pullClosure` makes every trust decision a pull needs, and signing moves to `auth` (`auth.identities.from`), so the pending `auth.mjs` to `attest.mjs` cut in `model/modules.toml` is made; see the prism-code CHANGELOG. - `prismpm generate --lang --out ` (#289, experimental): the Rust CLI writes the same bindings and typed client as `prism-code generate`, byte for byte apart from the generator each file header names, beside the same `prism-generate.json` record, and a run whose record and files are in place writes nothing. Every decision is the LexLean model `bindings/src/Foundation/Bindings/V1`: the new `Source.lex.tex` reads the WIT world and the model document into the code model (the WIT subset, the world's exports and memory, the application's class name, the numeric profile's operations), and `Generate.lex.tex` joins it to the JS, Python and Rust writers. `cargo xtask bindings-package` exports the three roots and vendors them into the crate, so the published `prismpm` carries them and the unpublished `prism-bindings` crate is gone. A holo generate cannot bind is `PP3201`; an output directory holding a file generate did not write is `PP3202`. - `prismpm verify` writes the proof statement of a verified application (#266, #582): `proof-statement.json` in the verified directory, an unsigned in-toto statement with the predicate `https://uor.foundation/prism/proof/v1`. Its subject is the guest; it lists every theorem of the model with its verdict and axiom audit, the verifier, the model's identities, the named TCB and the evidence digests. The statement is the output of a LexLean model, `bindings/src/Foundation/Proof/V1/Statement.lex.tex`, exported by `cargo xtask bindings-package` into the `prismpm` crate; it writes the calculator statement of `docs/proposals/266-proof-predicate.md` byte for byte. A model with no theorem, or a project with no `prismpm.lock`, gets no statement and a line on stderr that says why. `prism-code attest --statement` signs it into the holo. - `prismpm verify` names each stage it enters on stderr as `prismpm: stage ` when `PRISMPM_PROGRESS` is set (#585): every process it runs (Lean export, Rust, WebAssembly, the acceptance run), the Lean proof and the holo. Without the variable it prints nothing new. The guided journey sets it, so `prism_build` reports the running stage in `latest` instead of one line for the whole build. diff --git a/COMPLIANCE.md b/COMPLIANCE.md index b01ea7d92..8d7ffe915 100644 --- a/COMPLIANCE.md +++ b/COMPLIANCE.md @@ -15,15 +15,15 @@ Which Prism runtime passes which part of the runtime contract, from the results | Feature | Checks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| Registry logins and signing identities (`auth`) | 16 | + | N/A | N/A | -| Capabilities, deny by default (`capabilities`) | 25 | + | N/A | N/A | -| Dual digests (`digests`) | 18 | + | N/A | N/A | -| Dispatch through the guest (`dispatch`) | 7 | + | N/A | N/A | -| Typed errors (`errors`) | 8 | + | N/A | N/A | -| Load a holo (`load`) | 21 | + | N/A | N/A | -| Histories and replay (`replay`) | 5 | + | N/A | N/A | -| Verify a holo (`verify`) | 24 | + | N/A | N/A | -| The world contract (`world`) | 16 | + | N/A | N/A | +| Registry logins and signing identities (`auth`) | 16 | + | - | N/A | +| Capabilities, deny by default (`capabilities`) | 25 | + | - | N/A | +| Dual digests (`digests`) | 18 | + | + | N/A | +| Dispatch through the guest (`dispatch`) | 7 | + | - | N/A | +| Typed errors (`errors`) | 8 | + | - | N/A | +| Load a holo (`load`) | 21 | + | - | N/A | +| Histories and replay (`replay`) | 5 | + | - | N/A | +| Verify a holo (`verify`) | 24 | + | + | N/A | +| The world contract (`world`) | 16 | + | - | N/A | ## Checks @@ -31,187 +31,264 @@ Which Prism runtime passes which part of the runtime contract, from the results | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `auth.login.docker-config-entry` | A login with no helper configured writes the entry Docker writes. | + | N/A | N/A | -| `auth.login.keeps-the-config` | A login keeps everything else in the config and replaces older spellings of the registry. | + | N/A | N/A | -| `auth.login.docker-hub-by-default` | A login that names no registry is to Docker Hub, under Docker's key. | + | N/A | N/A | -| `auth.login.username-with-colon` | A username with a colon is refused: Docker's entry could not be read back. | + | N/A | N/A | -| `auth.login.registry-with-a-scheme` | A registry is a host name, not a URL. | + | N/A | N/A | -| `auth.login.config-not-json` | A config that does not parse is refused, not overwritten. | + | N/A | N/A | -| `auth.login.helper-not-installed` | A login that a configured helper cannot store fails: it never appears to work. | + | N/A | N/A | -| `auth.logout.removes-every-spelling` | A logout removes the registry under every key Docker may file it by, and leaves the others. | + | N/A | N/A | -| `auth.logout.nothing-there` | A logout with nothing to remove says so and is not an error. | + | N/A | N/A | -| `auth.logout.names-the-ambient-token` | A logout says which variable still gives ghcr.io a token, because it cannot clear one. | + | N/A | N/A | -| `auth.inspect.password` | Inspect reports a password credential's type, username and store. | + | N/A | N/A | -| `auth.inspect.identity-token` | Inspect reports an identity token by its type alone. | + | N/A | N/A | -| `auth.inspect.nothing-there` | Inspect of a registry with no credential is null. | + | N/A | N/A | -| `auth.stores.helper-for-a-registry` | A login goes to the registry's helper before the default one, and to the config when there is neither. | + | N/A | N/A | -| `auth.identities.unreadable-key` | A signing key that cannot be read is a signing error about the key. | + | N/A | N/A | -| `auth.identities.empty-token` | An empty identity token is a signing error about the identity. | + | N/A | N/A | +| `auth.login.docker-config-entry` | A login with no helper configured writes the entry Docker writes. | + | - | N/A | +| `auth.login.keeps-the-config` | A login keeps everything else in the config and replaces older spellings of the registry. | + | - | N/A | +| `auth.login.docker-hub-by-default` | A login that names no registry is to Docker Hub, under Docker's key. | + | - | N/A | +| `auth.login.username-with-colon` | A username with a colon is refused: Docker's entry could not be read back. | + | - | N/A | +| `auth.login.registry-with-a-scheme` | A registry is a host name, not a URL. | + | - | N/A | +| `auth.login.config-not-json` | A config that does not parse is refused, not overwritten. | + | - | N/A | +| `auth.login.helper-not-installed` | A login that a configured helper cannot store fails: it never appears to work. | + | - | N/A | +| `auth.logout.removes-every-spelling` | A logout removes the registry under every key Docker may file it by, and leaves the others. | + | - | N/A | +| `auth.logout.nothing-there` | A logout with nothing to remove says so and is not an error. | + | - | N/A | +| `auth.logout.names-the-ambient-token` | A logout says which variable still gives ghcr.io a token, because it cannot clear one. | + | - | N/A | +| `auth.inspect.password` | Inspect reports a password credential's type, username and store. | + | - | N/A | +| `auth.inspect.identity-token` | Inspect reports an identity token by its type alone. | + | - | N/A | +| `auth.inspect.nothing-there` | Inspect of a registry with no credential is null. | + | - | N/A | +| `auth.stores.helper-for-a-registry` | A login goes to the registry's helper before the default one, and to the config when there is neither. | + | - | N/A | +| `auth.identities.unreadable-key` | A signing key that cannot be read is a signing error about the key. | + | - | N/A | +| `auth.identities.empty-token` | An empty identity token is a signing error about the identity. | + | - | N/A | ### Capabilities, deny by default | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `capabilities.none.denies-everything` | With no capability file, every kind is denied, wildcard resources included. | + | N/A | N/A | -| `capabilities.none.load-grants-nothing` | A load with no capability file names no set, and the reference holo still opens. | + | N/A | N/A | -| `capabilities.empty.default-set-denies` | An empty default set grants nothing. | + | N/A | N/A | -| `capabilities.empty.deny-only-denies` | A set of deny entries alone grants nothing. | + | N/A | N/A | -| `capabilities.allow.exact-names` | An allow entry grants exactly what it names, for each kind. | + | N/A | N/A | -| `capabilities.outbound.exact-match` | An outbound host entry matches on scheme, host and port, and ignores the path. | + | N/A | N/A | -| `capabilities.outbound.wildcards` | Subdomain, port and scheme wildcards match what they say and no further. | + | N/A | N/A | -| `capabilities.deny.wins-over-allow` | A deny entry wins over an allow entry, including a specific deny under a wildcard allow. | + | N/A | N/A | -| `capabilities.deny.same-entry-on-both-lists` | The same entry on both lists is denied. | + | N/A | N/A | -| `capabilities.set.default-applies` | A named set grants nothing until it is asked for. | + | N/A | N/A | -| `capabilities.set.named-applies` | A named set applies when it is asked for. | + | N/A | N/A | -| `capabilities.set.load-names-the-set` | A load under a named set reports that set. | + | N/A | N/A | -| `capabilities.set.missing-is-an-error` | A set the file does not hold is an error, never an empty grant. | + | N/A | N/A | -| `capabilities.set.named-without-a-file` | Naming a set with no file is an error, never an empty grant. | + | N/A | N/A | -| `capabilities.invalid.unknown-member` | A misspelled member is an error, so a typo cannot widen or narrow a grant silently. | + | N/A | N/A | -| `capabilities.invalid.no-default-set` | A file with no default set is an error. | + | N/A | N/A | -| `capabilities.invalid.wrong-schema` | Another schema version is an error. | + | N/A | N/A | -| `capabilities.invalid.malformed-entry` | A host entry with a path is an error. | + | N/A | N/A | -| `capabilities.invalid.repeated-entry` | A repeated entry is an error. | + | N/A | N/A | -| `capabilities.invalid.not-json` | A file that is not JSON is an error. | + | N/A | N/A | -| `capabilities.import.denied-with-no-file` | A guest import is denied at load when no capability file is given. | + | N/A | N/A | -| `capabilities.import.denied-under-a-full-grant` | A guest import is denied at load even when the file grants every resource, because the world lists no imports. | + | N/A | N/A | -| `capabilities.kind.unknown` | Asking about a kind that does not exist is an error, not a denial. | + | N/A | N/A | -| `capabilities.policy.invalid-grant` | A verify policy whose grant is malformed is an invalid policy. | + | N/A | N/A | -| `capabilities.policy.within-grant` | A world that imports nothing is within every grant. | + | N/A | N/A | +| `capabilities.none.denies-everything` | With no capability file, every kind is denied, wildcard resources included. | + | - | N/A | +| `capabilities.none.load-grants-nothing` | A load with no capability file names no set, and the reference holo still opens. | + | - | N/A | +| `capabilities.empty.default-set-denies` | An empty default set grants nothing. | + | - | N/A | +| `capabilities.empty.deny-only-denies` | A set of deny entries alone grants nothing. | + | - | N/A | +| `capabilities.allow.exact-names` | An allow entry grants exactly what it names, for each kind. | + | - | N/A | +| `capabilities.outbound.exact-match` | An outbound host entry matches on scheme, host and port, and ignores the path. | + | - | N/A | +| `capabilities.outbound.wildcards` | Subdomain, port and scheme wildcards match what they say and no further. | + | - | N/A | +| `capabilities.deny.wins-over-allow` | A deny entry wins over an allow entry, including a specific deny under a wildcard allow. | + | - | N/A | +| `capabilities.deny.same-entry-on-both-lists` | The same entry on both lists is denied. | + | - | N/A | +| `capabilities.set.default-applies` | A named set grants nothing until it is asked for. | + | - | N/A | +| `capabilities.set.named-applies` | A named set applies when it is asked for. | + | - | N/A | +| `capabilities.set.load-names-the-set` | A load under a named set reports that set. | + | - | N/A | +| `capabilities.set.missing-is-an-error` | A set the file does not hold is an error, never an empty grant. | + | - | N/A | +| `capabilities.set.named-without-a-file` | Naming a set with no file is an error, never an empty grant. | + | - | N/A | +| `capabilities.invalid.unknown-member` | A misspelled member is an error, so a typo cannot widen or narrow a grant silently. | + | - | N/A | +| `capabilities.invalid.no-default-set` | A file with no default set is an error. | + | - | N/A | +| `capabilities.invalid.wrong-schema` | Another schema version is an error. | + | - | N/A | +| `capabilities.invalid.malformed-entry` | A host entry with a path is an error. | + | - | N/A | +| `capabilities.invalid.repeated-entry` | A repeated entry is an error. | + | - | N/A | +| `capabilities.invalid.not-json` | A file that is not JSON is an error. | + | - | N/A | +| `capabilities.import.denied-with-no-file` | A guest import is denied at load when no capability file is given. | + | - | N/A | +| `capabilities.import.denied-under-a-full-grant` | A guest import is denied at load even when the file grants every resource, because the world lists no imports. | + | - | N/A | +| `capabilities.kind.unknown` | Asking about a kind that does not exist is an error, not a denial. | + | - | N/A | +| `capabilities.policy.invalid-grant` | A verify policy whose grant is malformed is an invalid policy. | + | + | N/A | +| `capabilities.policy.within-grant` | A world that imports nothing is within every grant. | + | + | N/A | ### Dual digests | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `digests.archive.dual` | The archive is reported under both algorithms, over the whole file, as ADR-015 pins them. | + | N/A | N/A | -| `digests.footer.not-the-file-hash` | The footer is the BLAKE3 of the body, reported apart from the file's BLAKE3. | + | N/A | N/A | -| `digests.verdict.names-the-footer` | A verdict addresses the holo by its archive fingerprint. | + | N/A | N/A | -| `digests.blob.guest` | The guest's content is reported under both algorithms, and its label is the BLAKE3. | + | N/A | N/A | -| `digests.blob.model` | The model document's content is reported under both algorithms. | + | N/A | N/A | -| `digests.blob.view` | The view's content is reported under both algorithms. | + | N/A | N/A | -| `digests.blob.capability-set` | The capability set's content is reported under both algorithms. | + | N/A | N/A | -| `digests.section.covers-its-table-bytes` | A section's digest covers exactly its table bytes, label included. | + | N/A | N/A | -| `digests.damage.footer-reported` | A wrong footer is reported, and the labels stay good. | + | N/A | N/A | -| `digests.damage.label-reported` | A blob that differs from its label is reported under a correct footer. | + | N/A | N/A | -| `digests.pin.match` | Pins that hold under both algorithms pass. | + | N/A | N/A | -| `digests.pin.sha256-mismatch` | A sha256 pin that does not hold fails the policy and withholds no level. | + | N/A | N/A | -| `digests.pin.blake3-mismatch` | A blake3 pin that does not hold fails the policy. | + | N/A | N/A | -| `digests.pin.one-of-two-wrong` | Two pins on one target must both hold, so checking one algorithm is not enough. | + | N/A | N/A | -| `digests.pin.invalid-hex` | A pin that is not 64 lowercase hex characters is an invalid policy. | + | N/A | N/A | -| `digests.pin.unknown-algorithm` | A pin under an algorithm other than sha256 and blake3 is an invalid policy. | + | N/A | N/A | -| `digests.pin.unknown-target` | A pin on a part that does not exist is an invalid policy. | + | N/A | N/A | -| `digests.pin.empty` | A pin that names no digest is an invalid policy, not a pass. | + | N/A | N/A | +| `digests.archive.dual` | The archive is reported under both algorithms, over the whole file, as ADR-015 pins them. | + | + | N/A | +| `digests.footer.not-the-file-hash` | The footer is the BLAKE3 of the body, reported apart from the file's BLAKE3. | + | + | N/A | +| `digests.verdict.names-the-footer` | A verdict addresses the holo by its archive fingerprint. | + | + | N/A | +| `digests.blob.guest` | The guest's content is reported under both algorithms, and its label is the BLAKE3. | + | + | N/A | +| `digests.blob.model` | The model document's content is reported under both algorithms. | + | + | N/A | +| `digests.blob.view` | The view's content is reported under both algorithms. | + | + | N/A | +| `digests.blob.capability-set` | The capability set's content is reported under both algorithms. | + | + | N/A | +| `digests.section.covers-its-table-bytes` | A section's digest covers exactly its table bytes, label included. | + | + | N/A | +| `digests.damage.footer-reported` | A wrong footer is reported, and the labels stay good. | + | + | N/A | +| `digests.damage.label-reported` | A blob that differs from its label is reported under a correct footer. | + | + | N/A | +| `digests.pin.match` | Pins that hold under both algorithms pass. | + | + | N/A | +| `digests.pin.sha256-mismatch` | A sha256 pin that does not hold fails the policy and withholds no level. | + | + | N/A | +| `digests.pin.blake3-mismatch` | A blake3 pin that does not hold fails the policy. | + | + | N/A | +| `digests.pin.one-of-two-wrong` | Two pins on one target must both hold, so checking one algorithm is not enough. | + | + | N/A | +| `digests.pin.invalid-hex` | A pin that is not 64 lowercase hex characters is an invalid policy. | + | + | N/A | +| `digests.pin.unknown-algorithm` | A pin under an algorithm other than sha256 and blake3 is an invalid policy. | + | + | N/A | +| `digests.pin.unknown-target` | A pin on a part that does not exist is an invalid policy. | + | + | N/A | +| `digests.pin.empty` | A pin that names no digest is an invalid policy, not a pass. | + | + | N/A | ### Dispatch through the guest | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `dispatch.vectors.reference` | Every acceptance vector of the reference holo answers byte for byte, with the vectors given by this suite and not read from the holo. | + | N/A | N/A | -| `dispatch.acceptance.reference` | The runtime's own replay of the holo's vectors passes all of them. | + | N/A | N/A | -| `dispatch.fresh-instance.repeat` | The same request answers the same bytes every time, in one process. | + | N/A | N/A | -| `dispatch.fresh-instance.no-state-between-requests` | A failed request changes nothing about the next one. | + | N/A | N/A | -| `dispatch.limits.over-the-request-maximum` | A request above the model's maximum reaches the guest and is answered as malformed. | + | N/A | N/A | -| `dispatch.limits.at-the-allocation-maximum` | A request of exactly the guest allocation maximum is dispatched. | + | N/A | N/A | -| `dispatch.limits.over-the-allocation-maximum` | A request above the guest allocation maximum is refused before the guest runs. | + | N/A | N/A | +| `dispatch.vectors.reference` | Every acceptance vector of the reference holo answers byte for byte, with the vectors given by this suite and not read from the holo. | + | - | N/A | +| `dispatch.acceptance.reference` | The runtime's own replay of the holo's vectors passes all of them. | + | - | N/A | +| `dispatch.fresh-instance.repeat` | The same request answers the same bytes every time, in one process. | + | - | N/A | +| `dispatch.fresh-instance.no-state-between-requests` | A failed request changes nothing about the next one. | + | - | N/A | +| `dispatch.limits.over-the-request-maximum` | A request above the model's maximum reaches the guest and is answered as malformed. | + | - | N/A | +| `dispatch.limits.at-the-allocation-maximum` | A request of exactly the guest allocation maximum is dispatched. | + | - | N/A | +| `dispatch.limits.over-the-allocation-maximum` | A request above the guest allocation maximum is refused before the guest runs. | + | - | N/A | ### Typed errors | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `errors.verify.passed-does-not-throw` | Asking for an error on failure raises nothing when the verdict passes. | + | N/A | N/A | -| `errors.verify.level-shortfall` | A level below the policy is a verification error that carries the whole verdict. | + | N/A | N/A | -| `errors.verify.integrity` | A failed integrity check is a verification error naming the check. | + | N/A | N/A | -| `errors.verify.pinned-digest-first` | A digest the caller pinned explains the failure before a missing level does. | + | N/A | N/A | -| `errors.world.contract` | A guest that differs from its world is a world mismatch, not a generic failure. | + | N/A | N/A | -| `errors.world.pin` | A world hash the caller pinned and the holo broke is a world mismatch. | + | N/A | N/A | -| `errors.capability.denied-import` | A guest import nothing links is a capability denial at load, naming the import. | + | N/A | N/A | -| `errors.capability.denied-resource` | A denied resource is a capability denial naming the kind, the resource and the set. | + | N/A | N/A | +| `errors.verify.passed-does-not-throw` | Asking for an error on failure raises nothing when the verdict passes. | + | + | N/A | +| `errors.verify.level-shortfall` | A level below the policy is a verification error that carries the whole verdict. | + | + | N/A | +| `errors.verify.integrity` | A failed integrity check is a verification error naming the check. | + | + | N/A | +| `errors.verify.pinned-digest-first` | A digest the caller pinned explains the failure before a missing level does. | + | + | N/A | +| `errors.world.contract` | A guest that differs from its world is a world mismatch, not a generic failure. | + | + | N/A | +| `errors.world.pin` | A world hash the caller pinned and the holo broke is a world mismatch. | + | + | N/A | +| `errors.capability.denied-import` | A guest import nothing links is a capability denial at load, naming the import. | + | - | N/A | +| `errors.capability.denied-resource` | A denied resource is a capability denial naming the kind, the resource and the set. | + | - | N/A | ### Load a holo | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `load.reference.opens` | The reference holo opens, with its name, limits, vector count and identities verified. | + | N/A | N/A | -| `load.refuse.empty` | An empty file is refused. | + | N/A | N/A | -| `load.refuse.too-short` | A file shorter than a header and a footer is refused. | + | N/A | N/A | -| `load.refuse.bad-magic` | A file that does not start with HOLO is refused. | + | N/A | N/A | -| `load.refuse.bad-version` | A physical version other than 4 is refused. | + | N/A | N/A | -| `load.refuse.bad-flags` | Non-zero flags are refused. | + | N/A | N/A | -| `load.refuse.truncated-table` | A section table that overruns the file is refused. | + | N/A | N/A | -| `load.refuse.section-overrun` | A section that overruns the body is refused, even under a correct footer. | + | N/A | N/A | -| `load.refuse.unknown-kind` | An unknown section kind is refused, even under a correct footer. | + | N/A | N/A | -| `load.refuse.manifest-uri` | An application manifest with the wrong URI is refused. | + | N/A | N/A | -| `load.refuse.label-not-a-blob` | A directory that names a blob the archive does not hold is refused. | + | N/A | N/A | -| `load.refuse.undecodable-guest` | A guest that does not compile is refused. | + | N/A | N/A | -| `load.refuse.undecodable-view` | A HOLOVIEW bundle that does not decode is refused. | + | N/A | N/A | -| `load.refuse.undecodable-model` | A model document with no application is refused. | + | N/A | N/A | -| `load.damage.footer-refused` | A wrong footer is refused: an altered holo does not open by default. | + | N/A | N/A | -| `load.damage.guest-label-refused` | A guest whose bytes differ from its label is refused, even under a correct footer. | + | N/A | N/A | -| `load.damage.footer-allowed` | Asked to open an altered holo, a runtime opens it and reports its identities unverified. | + | N/A | N/A | -| `load.damage.guest-label-allowed` | Asked to open a holo whose guest differs from its label, a runtime opens it and reports it unverified. | + | N/A | N/A | -| `load.attestation.tolerated` | An attestation section as the last row does not stop a load or change the identities. | + | N/A | N/A | -| `load.attestation.not-last` | An attestation section that is not the last row is refused. | + | N/A | N/A | -| `load.attestation.duplicate` | Two attestation sections are refused. | + | N/A | N/A | +| `load.reference.opens` | The reference holo opens, with its name, limits, vector count and identities verified. | + | - | N/A | +| `load.refuse.empty` | An empty file is refused. | + | - | N/A | +| `load.refuse.too-short` | A file shorter than a header and a footer is refused. | + | - | N/A | +| `load.refuse.bad-magic` | A file that does not start with HOLO is refused. | + | - | N/A | +| `load.refuse.bad-version` | A physical version other than 4 is refused. | + | - | N/A | +| `load.refuse.bad-flags` | Non-zero flags are refused. | + | - | N/A | +| `load.refuse.truncated-table` | A section table that overruns the file is refused. | + | - | N/A | +| `load.refuse.section-overrun` | A section that overruns the body is refused, even under a correct footer. | + | - | N/A | +| `load.refuse.unknown-kind` | An unknown section kind is refused, even under a correct footer. | + | - | N/A | +| `load.refuse.manifest-uri` | An application manifest with the wrong URI is refused. | + | - | N/A | +| `load.refuse.label-not-a-blob` | A directory that names a blob the archive does not hold is refused. | + | - | N/A | +| `load.refuse.undecodable-guest` | A guest that does not compile is refused. | + | - | N/A | +| `load.refuse.undecodable-view` | A HOLOVIEW bundle that does not decode is refused. | + | - | N/A | +| `load.refuse.undecodable-model` | A model document with no application is refused. | + | - | N/A | +| `load.damage.footer-refused` | A wrong footer is refused: an altered holo does not open by default. | + | - | N/A | +| `load.damage.guest-label-refused` | A guest whose bytes differ from its label is refused, even under a correct footer. | + | - | N/A | +| `load.damage.footer-allowed` | Asked to open an altered holo, a runtime opens it and reports its identities unverified. | + | - | N/A | +| `load.damage.guest-label-allowed` | Asked to open a holo whose guest differs from its label, a runtime opens it and reports it unverified. | + | - | N/A | +| `load.attestation.tolerated` | An attestation section as the last row does not stop a load or change the identities. | + | - | N/A | +| `load.attestation.not-last` | An attestation section that is not the last row is refused. | + | - | N/A | +| `load.attestation.duplicate` | Two attestation sections are refused. | + | - | N/A | ### Histories and replay | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `replay.history.unchanged` | Replaying a recorded history against the same holo finds no divergence. | + | N/A | N/A | -| `replay.history.divergence` | Replaying against a changed model is a determinism violation (determinism_violation). | + | N/A | N/A | -| `replay.history.malformed` | A history that does not read is a replay error (replay_failed), not a divergence. | + | N/A | N/A | -| `replay.recorder.round-trip` | Dispatches recorded into prism/history/1 replay unchanged, refusals included. | + | N/A | N/A | -| `replay.statement.written` | A replay writes a prism/replay/v1 statement that names the guest and every history by dual digest. | + | N/A | N/A | +| `replay.history.unchanged` | Replaying a recorded history against the same holo finds no divergence. | + | - | N/A | +| `replay.history.divergence` | Replaying against a changed model is a determinism violation (determinism_violation). | + | - | N/A | +| `replay.history.malformed` | A history that does not read is a replay error (replay_failed), not a divergence. | + | - | N/A | +| `replay.recorder.round-trip` | Dispatches recorded into prism/history/1 replay unchanged, refusals included. | + | - | N/A | +| `replay.statement.written` | A replay writes a prism/replay/v1 statement that names the guest and every history by dual digest. | + | - | N/A | ### Verify a holo | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `verify.reference.default-policy` | The default policy fails the reference holo at P0, and names every missing statement. | + | N/A | N/A | -| `verify.reference.minimum-p0` | A P0 policy accepts the reference holo. | + | N/A | N/A | -| `verify.level.not-raised-by-policy` | A policy that asks for P3 does not raise the level. | + | N/A | N/A | -| `verify.level.unsigned-claim-not-believed` | An unsigned statement that claims P3 never raises the level: the holo is P0, or it gets no verdict. | + | N/A | N/A | -| `verify.policy.name-echoed` | The verdict names the policy it was judged against. | + | N/A | N/A | -| `verify.damage.footer` | A wrong footer is a failed integrity check that withholds P1. | + | N/A | N/A | -| `verify.damage.guest-label` | A guest that differs from its label fails integrity even under a correct footer. | + | N/A | N/A | -| `verify.damage.label` | A forged blob label is a table the Wire codec refuses: no verdict. | + | N/A | N/A | -| `verify.damage.model-document` | A damaged model document fails integrity and the document check. | + | N/A | N/A | -| `verify.damage.manifest` | A damaged application manifest is not the Wire template, which the codec refuses: no verdict. | + | N/A | N/A | -| `verify.damage.p0-has-no-requirement` | P0 asks nothing of a holo, so damage is reported and the P0 policy still passes. | + | N/A | N/A | -| `verify.no-verdict.empty` | An empty file gets no verdict. | + | N/A | N/A | -| `verify.no-verdict.bad-magic` | A file that is not a holo gets no verdict. | + | N/A | N/A | -| `verify.no-verdict.bad-version` | An unknown physical version gets no verdict. | + | N/A | N/A | -| `verify.no-verdict.bad-flags` | Non-zero flags get no verdict. | + | N/A | N/A | -| `verify.no-verdict.truncated-table` | A truncated table gets no verdict. | + | N/A | N/A | -| `verify.no-verdict.section-overrun` | A section that overruns the body gets no verdict. | + | N/A | N/A | -| `verify.no-verdict.unknown-kind` | A section kind the Wire codec does not put in that row gets no verdict. | + | N/A | N/A | -| `verify.policy.unknown-level` | A minimum level that does not exist is an invalid policy, not a verdict. | + | N/A | N/A | -| `verify.policy.unknown-member` | A policy member nobody defined is an invalid policy, not ignored. | + | N/A | N/A | -| `verify.policy.statements-refused` | A policy cannot carry statements or claim their signature was checked: a level comes from the holo, never from an option. | + | N/A | N/A | -| `verify.env.sets-minimum` | PRISM_MINIMUM_LEVEL sets the minimum when the call names none. | + | N/A | N/A | -| `verify.env.call-wins` | A minimum named by the call replaces PRISM_MINIMUM_LEVEL. | + | N/A | N/A | -| `verify.env.invalid` | A PRISM_MINIMUM_LEVEL that names no level is an invalid policy. | + | N/A | N/A | +| `verify.reference.default-policy` | The default policy fails the reference holo at P0, and names every missing statement. | + | + | N/A | +| `verify.reference.minimum-p0` | A P0 policy accepts the reference holo. | + | + | N/A | +| `verify.level.not-raised-by-policy` | A policy that asks for P3 does not raise the level. | + | + | N/A | +| `verify.level.unsigned-claim-not-believed` | An unsigned statement that claims P3 never raises the level: the holo is P0, or it gets no verdict. | + | + | N/A | +| `verify.policy.name-echoed` | The verdict names the policy it was judged against. | + | + | N/A | +| `verify.damage.footer` | A wrong footer is a failed integrity check that withholds P1. | + | + | N/A | +| `verify.damage.guest-label` | A guest that differs from its label fails integrity even under a correct footer. | + | + | N/A | +| `verify.damage.label` | A forged blob label is a table the Wire codec refuses: no verdict. | + | + | N/A | +| `verify.damage.model-document` | A damaged model document fails integrity and the document check. | + | + | N/A | +| `verify.damage.manifest` | A damaged application manifest is not the Wire template, which the codec refuses: no verdict. | + | + | N/A | +| `verify.damage.p0-has-no-requirement` | P0 asks nothing of a holo, so damage is reported and the P0 policy still passes. | + | + | N/A | +| `verify.no-verdict.empty` | An empty file gets no verdict. | + | + | N/A | +| `verify.no-verdict.bad-magic` | A file that is not a holo gets no verdict. | + | + | N/A | +| `verify.no-verdict.bad-version` | An unknown physical version gets no verdict. | + | + | N/A | +| `verify.no-verdict.bad-flags` | Non-zero flags get no verdict. | + | + | N/A | +| `verify.no-verdict.truncated-table` | A truncated table gets no verdict. | + | + | N/A | +| `verify.no-verdict.section-overrun` | A section that overruns the body gets no verdict. | + | + | N/A | +| `verify.no-verdict.unknown-kind` | A section kind the Wire codec does not put in that row gets no verdict. | + | + | N/A | +| `verify.policy.unknown-level` | A minimum level that does not exist is an invalid policy, not a verdict. | + | + | N/A | +| `verify.policy.unknown-member` | A policy member nobody defined is an invalid policy, not ignored. | + | + | N/A | +| `verify.policy.statements-refused` | A policy cannot carry statements or claim their signature was checked: a level comes from the holo, never from an option. | + | + | N/A | +| `verify.env.sets-minimum` | PRISM_MINIMUM_LEVEL sets the minimum when the call names none. | + | + | N/A | +| `verify.env.call-wins` | A minimum named by the call replaces PRISM_MINIMUM_LEVEL. | + | + | N/A | +| `verify.env.invalid` | A PRISM_MINIMUM_LEVEL that names no level is an invalid policy. | + | + | N/A | ### The world contract | Check | Asks | JavaScript | Rust | Python | | --- | --- | --- | --- | --- | -| `world.reference.inspected` | Inspection names the world, its digests and its interface, and says the guest conforms. | + | N/A | N/A | -| `world.reference.loaded` | A load reports the world within the grant and pure, with no capability file. | + | N/A | N/A | -| `world.mismatch.extra-import` | A guest with an import the world does not declare fails the contract and withholds P1. | + | N/A | N/A | -| `world.mismatch.extra-export` | A guest with an export the world does not declare fails the contract. | + | N/A | N/A | -| `world.mismatch.renamed-export` | A guest missing an export the world declares fails the contract. | + | N/A | N/A | -| `world.mismatch.changed-signature` | A guest export with another signature fails the contract. | + | N/A | N/A | -| `world.mismatch.changed-kind` | A guest export of another kind fails the contract. | + | N/A | N/A | -| `world.mismatch.inspected` | Inspection reports that a changed guest does not conform, with every fingerprint correct. | + | N/A | N/A | -| `world.load.refuses-wrong-exports` | A load refuses a guest whose export names differ from the contract. | + | N/A | N/A | -| `world.pin.match` | A world pin that holds passes. | + | N/A | N/A | -| `world.pin.hash-mismatch` | A world hash that differs fails the policy and withholds no level. | + | N/A | N/A | -| `world.pin.contract-mismatch` | A pin on another contract fails the policy. | + | N/A | N/A | -| `world.pin.null` | A null pin fails the policy instead of passing silently. | + | N/A | N/A | -| `world.pin.invalid` | A world pin that is not hex is an invalid policy. | + | N/A | N/A | -| `world.effects.pure-passes` | A pure world passes a policy that allows no effects. | + | N/A | N/A | -| `world.effects.invalid` | An effect nobody defined is an invalid policy. | + | N/A | N/A | +| `world.reference.inspected` | Inspection names the world, its digests and its interface, and says the guest conforms. | + | + | N/A | +| `world.reference.loaded` | A load reports the world within the grant and pure, with no capability file. | + | - | N/A | +| `world.mismatch.extra-import` | A guest with an import the world does not declare fails the contract and withholds P1. | + | + | N/A | +| `world.mismatch.extra-export` | A guest with an export the world does not declare fails the contract. | + | + | N/A | +| `world.mismatch.renamed-export` | A guest missing an export the world declares fails the contract. | + | + | N/A | +| `world.mismatch.changed-signature` | A guest export with another signature fails the contract. | + | + | N/A | +| `world.mismatch.changed-kind` | A guest export of another kind fails the contract. | + | + | N/A | +| `world.mismatch.inspected` | Inspection reports that a changed guest does not conform, with every fingerprint correct. | + | + | N/A | +| `world.load.refuses-wrong-exports` | A load refuses a guest whose export names differ from the contract. | + | - | N/A | +| `world.pin.match` | A world pin that holds passes. | + | + | N/A | +| `world.pin.hash-mismatch` | A world hash that differs fails the policy and withholds no level. | + | + | N/A | +| `world.pin.contract-mismatch` | A pin on another contract fails the policy. | + | + | N/A | +| `world.pin.null` | A null pin fails the policy instead of passing silently. | + | + | N/A | +| `world.pin.invalid` | A world pin that is not hex is an invalid policy. | + | + | N/A | +| `world.effects.pure-passes` | A pure world passes a policy that allows no effects. | + | + | N/A | +| `world.effects.invalid` | An effect nobody defined is an invalid policy. | + | + | N/A | ## Expected failures -None. +| Runtime | Check | Why | +| --- | --- | --- | +| Rust | `auth.login.docker-config-entry` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.keeps-the-config` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.docker-hub-by-default` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.username-with-colon` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.registry-with-a-scheme` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.config-not-json` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.login.helper-not-installed` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.logout.removes-every-spelling` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.logout.nothing-there` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.logout.names-the-ambient-token` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.inspect.password` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.inspect.identity-token` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.inspect.nothing-there` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.stores.helper-for-a-registry` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.identities.unreadable-key` | The Rust runtime has no auth operation yet (#298). | +| Rust | `auth.identities.empty-token` | The Rust runtime has no auth operation yet (#298). | +| Rust | `capabilities.none.denies-everything` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.none.load-grants-nothing` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.empty.default-set-denies` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.empty.deny-only-denies` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.allow.exact-names` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.outbound.exact-match` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.outbound.wildcards` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.deny.wins-over-allow` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.deny.same-entry-on-both-lists` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.set.default-applies` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.set.named-applies` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.set.load-names-the-set` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.set.missing-is-an-error` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.set.named-without-a-file` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.invalid.unknown-member` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.invalid.no-default-set` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.invalid.wrong-schema` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.invalid.malformed-entry` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.invalid.repeated-entry` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.invalid.not-json` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `capabilities.import.denied-with-no-file` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.import.denied-under-a-full-grant` | The Rust runtime has no load operation yet (#298). | +| Rust | `capabilities.kind.unknown` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `dispatch.vectors.reference` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `dispatch.acceptance.reference` | The Rust runtime has no acceptance operation yet (#298). | +| Rust | `dispatch.fresh-instance.repeat` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `dispatch.fresh-instance.no-state-between-requests` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `dispatch.limits.over-the-request-maximum` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `dispatch.limits.at-the-allocation-maximum` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `dispatch.limits.over-the-allocation-maximum` | The Rust runtime has no dispatch operation yet (#298). | +| Rust | `errors.capability.denied-import` | The Rust runtime has no load operation yet (#298). | +| Rust | `errors.capability.denied-resource` | The Rust runtime has no capabilities operation yet (#298). | +| Rust | `load.reference.opens` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.empty` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.too-short` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.bad-magic` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.bad-version` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.bad-flags` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.truncated-table` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.section-overrun` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.unknown-kind` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.manifest-uri` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.label-not-a-blob` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.undecodable-guest` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.undecodable-view` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.refuse.undecodable-model` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.damage.footer-refused` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.damage.guest-label-refused` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.damage.footer-allowed` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.damage.guest-label-allowed` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.attestation.tolerated` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.attestation.not-last` | The Rust runtime has no load operation yet (#298). | +| Rust | `load.attestation.duplicate` | The Rust runtime has no load operation yet (#298). | +| Rust | `replay.history.unchanged` | The Rust runtime has no replay operation yet (#298). | +| Rust | `replay.history.divergence` | The Rust runtime has no replay operation yet (#298). | +| Rust | `replay.history.malformed` | The Rust runtime has no replay operation yet (#298). | +| Rust | `replay.recorder.round-trip` | The Rust runtime has no replay operation yet (#298). | +| Rust | `replay.statement.written` | The Rust runtime has no replay operation yet (#298). | +| Rust | `world.reference.loaded` | The Rust runtime has no load operation yet (#298). | +| Rust | `world.load.refuses-wrong-exports` | The Rust runtime has no load operation yet (#298). | diff --git a/model/modules.toml b/model/modules.toml index 4d550716c..85546f977 100644 --- a/model/modules.toml +++ b/model/modules.toml @@ -320,6 +320,10 @@ module = "verify" path = "sdk/npm/prism-code/src/attest-cli.mjs" module = "images" +[[owner]] +path = "sdk/npm/prism-code/src/attest-write.mjs" +module = "images" + [[owner]] path = "sdk/npm/prism-code/src/attest.mjs" module = "verify" @@ -540,6 +544,10 @@ module = "client" path = "sdk/npm/prism-code/src/sha256.mjs" module = "verify" +[[owner]] +path = "sdk/npm/prism-code/src/signing.mjs" +module = "auth" + [[owner]] path = "sdk/npm/prism-code/src/studio/" module = "client" @@ -568,6 +576,10 @@ module = "errors" path = "sdk/npm/prism-code/src/vendor/verify.mjs" module = "verify" +[[owner]] +path = "sdk/npm/prism-code/src/verify-closure.mjs" +module = "verify" + [[owner]] path = "sdk/npm/prism-code/src/verify.mjs" module = "verify" @@ -666,11 +678,6 @@ from = "crates/prismpm/src/sdk.rs" to = "crates/prismpm/src/verification.rs" cut = "Process helpers move to verify" -[[pending]] -from = "sdk/npm/prism-code/src/auth.mjs" -to = "sdk/npm/prism-code/src/attest.mjs" -cut = "Signing parts of attest move to auth" - # One member per line, so that removing one merges cleanly. [legacy_cycle] members = [ diff --git a/sdk/npm/conformance/runtimes.json b/sdk/npm/conformance/runtimes.json index 9b53bfca7..5a373ff99 100644 --- a/sdk/npm/conformance/runtimes.json +++ b/sdk/npm/conformance/runtimes.json @@ -7,8 +7,8 @@ }, "rust": { "title": "Rust", - "command": null, - "declaration": null + "command": ["target/debug/prism-conformance-shim"], + "declaration": "crates/conformance/runtime/declaration.json" }, "python": { "title": "Python", diff --git a/sdk/npm/conformance/test/matrix.test.mjs b/sdk/npm/conformance/test/matrix.test.mjs index bfaa4a72d..8ecdfd027 100644 --- a/sdk/npm/conformance/test/matrix.test.mjs +++ b/sdk/npm/conformance/test/matrix.test.mjs @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import { spawnSync } from 'node:child_process'; -import { mkdtempSync, readFileSync, writeFileSync } from 'node:fs'; +import { copyFileSync, existsSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -10,6 +10,13 @@ import { allChecks, loadScenarios, renderMatrix, sameMatrix, RESULTS_SCHEMA } fr const BIN = fileURLToPath(new URL('../bin/prism-conformance.mjs', import.meta.url)); const COMPLIANCE = fileURLToPath(new URL('../../../../COMPLIANCE.md', import.meta.url)); +const JS_SHIM = fileURLToPath(new URL('../../prism-code/conformance/shim.mjs', import.meta.url)); +// The Rust column comes from the shim runtimes.json registers, or from the results the npm-conformance suite job +// placed for this exact Rust input identity (its receipt). Where neither is here, a test that needs every +// registered runtime cannot run, and says why. +const RUST_SHIM = fileURLToPath(new URL('../../../../target/debug/prism-conformance-shim', import.meta.url)); +const RUST_RESULTS = fileURLToPath(new URL('../../../../target/conformance/results/rust.json', import.meta.url)); +const everyRuntime = existsSync(RUST_RESULTS) || existsSync(RUST_SHIM) ? {} : { skip: 'no Rust results: cargo build -p repo-conformance --bin prism-conformance-shim' }; const features = [ { @@ -85,8 +92,22 @@ test('line endings do not make the file stale, and any other difference does', ( const cli = (...args) => spawnSync(process.execPath, [BIN, ...args], { encoding: 'utf8' }); -test('the committed COMPLIANCE.md is what the suite generates today, and it names all three runtimes', () => { - const check = cli('matrix', '--check'); +/** Put the Rust results in `dir`: the receipt's when there is one, else a run of the built shim. */ +function rustInto(dir) { + if (existsSync(RUST_RESULTS)) copyFileSync(RUST_RESULTS, join(dir, 'rust.json')); + else assert.equal(cli('run', '--runtime', 'rust', '--out', join(dir, 'rust.json')).status, 0); +} + +/** A results directory with every registered runtime measured. */ +function measured() { + const dir = mkdtempSync(join(tmpdir(), 'prism-conformance-measured-')); + assert.equal(cli('run', '--runtime', 'js', '--out', join(dir, 'js.json')).status, 0); + rustInto(dir); + return dir; +} + +test('the committed COMPLIANCE.md is what the suite generates today, and it names all three runtimes', everyRuntime, () => { + const check = cli('matrix', '--check', '--results', measured()); assert.equal(check.status, 0, check.stdout + check.stderr); const text = readFileSync(COMPLIANCE, 'utf8').replace(/\r\n/g, '\n'); assert.match(text, /^