Skip to content

feat(prism-code): trust decisions in verify, signing in auth (Part of #449) - #623

Merged
afflom merged 5 commits into
mainfrom
claude/v05-verify
Nov 12, 2026
Merged

afflom merged 5 commits into
mainfrom
claude/v05-verify

Conversation

@afflom

@afflom afflom commented Nov 12, 2026

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Part of #449 (prism.verify) and the signing cut of #447 (prism.auth). This is v0.5 workstream WS5.

Why

#449's done-when says every trust decision about an image is made in verify and nowhere else, and that pull gets its answer only from there. On main, push-pull.mjs (owned by images) made those decisions itself: verifyHolo, judge, checkAttestations, aboutThisHolo and checkSigner. Signing was the other half of the problem. model/modules.toml still listed the pending cut "Signing parts of attest move to auth", and push-pull.mjs and attest.mjs called signStatement directly.

What

  • src/verify-closure.mjs (verify) now holds steps 4 to 8 of the push/pull design: the BLAKE3 claims, the attestation subjects, the verdict under policy, and the signer policy over in-holo and referrer bundles. It also holds push's step 1 integrity check (verifyOutgoing). images passes it plain facts (the bytes, the manifest digest, the annotation claims, the asked fingerprint, the referrer lines) and gets back a verdict or a typed refusal. The checks, error classes and check ids are the same as before. prism.verify.pullClosure exposes it, and it is loaded lazily, so the namespace stays browser-safe at load.
  • src/push-pull.mjs only fetches and writes now.
  • src/signing.mjs (auth) holds the Sigstore signing code that was in attest.mjs, and it depends only on errors. auth.identities.from(options) turns the flat signer options into an identity. attest, signStatements and push all sign through it, so every signature gets auth's secret scrubbing. A keyless failure that happens before any token was read keeps its cause, as it did before.
  • src/attest-write.mjs (images) holds experimental_attest and experimental_signStatements. They build statements over the holo's blobs and sign them with an auth identity. Both are still exported unchanged from prism-code/node. attest.mjs keeps only verification.
  • model/modules.toml gets owners for the three new files, and the pending auth→attest row is removed. cargo xtask check-modules reports 14 pending, down from 15.
  • Conformance: sdk/npm/conformance/runtimes.json registers the Rust shim (prism-conformance-shim, DK-42). The npm-conformance suite job builds it once (cargo build --locked -p repo-conformance --bin prism-conformance-shim), runs the matrix unit tests and both runtimes, and checks COMPLIANCE.md. The regenerated matrix shows Rust and JavaScript both passing all 24 verify checks. Rust is 64 pass and 76 declared xfail; JS is 140 of 140. The three unit tests that run every registered runtime skip on the OS matrix, with a message saying why. They run in the suite job, so no runner is added.
  • Package: +9.7 KiB. That is one allowance file of 8 KiB, under the per-file ledger from ci(prism-code): sum the package cap from one allowance file per change (Part of #441) #618.

Merge order

This PR needs #618 (the package allowance ledger). Until #618 merges, package.test.mjs fails on the cap. I'll rebase onto main once #618 lands.

Test


Generated by Claude Code

…449)

- verify-closure.mjs (verify) makes every trust decision push and pull need:
  the claims about the pulled bytes, the attestation subjects, the verdict
  and the signer policy, and push's outgoing integrity check. push-pull.mjs
  only fetches and writes. prism.verify.pullClosure exposes it.
- signing.mjs (auth) holds the Sigstore signing code that was in attest.mjs.
  Every signature goes through an auth identity; auth.identities.from turns
  the flat signer options into one. attest-write.mjs (images) writes signed
  statements; attest.mjs keeps only verification.
- model/modules.toml: owners for the three files, and the pending
  "Signing parts of attest move to auth" cut is made.
- runtimes.json registers the Rust shim (DK-42); the npm conformance suite
  job builds and runs it, and COMPLIANCE.md shows Rust and JavaScript both
  passing all 24 verify checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3Mf94yL5KHxQf3uUBS
…lowance covers 9.7 KiB (Part of #449)

The suite job builds prism-conformance-shim only when no main push has
measured the same content identity (git blob ids of the Rust sources,
vendored crates, lockfile, toolchain pin, the suite and this workflow).
Only receipts from this repository's main pushes are trusted. The matrix
unit tests read that receipt or the built shim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3Mf94yL5KHxQf3uUBS

afflom commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

The npm-prism-code jobs fail on one test only: test/package.test.mjs. The error is Unpacked package is 1629029 bytes; cap is 1622016. The other 865 tests pass on every OS. The cap comes from the allowance ledger in #618, which is not merged yet. This PR already carries its allowance (scripts/package-allowances/verify-trust-auth-signing.json, 10 KiB). The check turns green once #618 lands and this branch is rebased onto main, which I will do then. This failure is a merge-order dependency, so no code fix is needed here.


Generated by Claude Code

@afflom
afflom merged commit c37d5a8 into main Nov 12, 2026
33 checks passed
afflom added a commit that referenced this pull request Nov 12, 2026
…y and reference syntax (Part of #448) (#626)

Each contract's semantic check runs in its owner module; CanonicalDocument refuses the 19 owner-checked ids unless the owner's check runs. encode/decode_canonical move to holo/model_document.rs, SDK advisory disposition to sdk/advisory.rs (verify), OCI reference syntax to reference.rs (verify). check-modules: 15 -> 2 pending (with #623), contracts and workbench leave the legacy cycle. Emitter digest, ct-02/tm-01 bindings, standards.lock, generator pin, stdlib goldens (run 43167050013) and native records (run 43171961132) move with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PtscX6WjMRzTzT3xZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants