Skip to content

Artifact integrity gate

A run does not reach its kernel until every artifact its assignment names has been fetched and matched against its digest. The artifact integrity gate is that check, on the run route, before anything is dispatched. This page is what the gate reads, what it records when artifacts pass, and what a run that fails it reports.

For how a single artifact is fetched and its digest and signature checked, see Digest and signature verification.

The gate

flowchart TB
  subgraph AS["ASSIGNMENT"]
    direction TB
    RS[("Resolver snapshot<br/>distribution artifacts,<br/>manifest id and version")]
    TC[("Trust chain<br/>required or not")]
  end
  subgraph GATE["INTEGRITY GATE, on the run route"]
    direction TB
    PR{{"Cache probe"}}
    VF{{"Fetch and verify<br/>each artifact"}}
    PR --> VF
  end
  REG[("Your registry<br/>artifact_ref")]
  subgraph PASS["WHEN EVERY ARTIFACT PASSES"]
    direction TB
    CA[("Artifact cache<br/>by digest")]
    CE[("Environment cache<br/>by manifest")]
    AT[("Dependency attestation")]
  end
  K["Kernel dispatch"]
  FL["Complete as failed<br/>ARTIFACT_INTEGRITY_FAILED"]
  RS --> PR
  TC --> VF
  REG -->|"bytes"| VF
  VF --> PASS
  PASS --> K
  VF -.->|"any artifact fails"| FL

Every artifact the run needs passes through the gate, and the kernel is reached only through the passing branch. A failure on any one artifact ends the run before dispatch, so a kernel never starts on bytes that were not matched against the digests the control plane pinned.

What the gate reads

The gate reads the distribution artifacts listed in the assignment's resolver snapshot, each with an artifact_ref and an artifact_digest, and the trust chain's required flag. A digest must have the form sha256:<64 hex>; a bare 64-character hex value is accepted and normalised to that form.

The cache probe

For each artifact digest the gate first looks in the node's artifact cache. An entry counts as a hit only if the local file it points at still exists; an entry whose file is gone is removed and counted as a miss. The hit and miss counts are carried into the run's logs, so a run that fetched everything again is visible.

Fetch and verify

Each artifact is fetched from your registry by its artifact_ref, the package archive's registry reference, and checked against its digest. When the trust chain is required, the artifact's provenance is checked as well. The verification is per artifact and all of them must pass. The provenance rules are on Digest and signature verification.

When every artifact passes

The gate records what it verified, so the next run on the node can reuse it:

Cache Keyed by Holds
Artifact The artifact digest Its reference, local path, whether trust was required, when it was verified
Environment <manifest_id>:<manifest_version> of the resolver snapshot The resolver fingerprint and when it was cached
Model <project>:<binding>:<model> The model traffic target, when the payload names one

A dependency attestation is appended for the run, recording the verified artifacts under the assignment's policy digest and trust requirement, and the run proceeds to dispatch. See Audit attestation.

When an artifact fails

The run is completed as failed without being dispatched. Three records say why:

complete   error.code     ARTIFACT_INTEGRITY_FAILED
           error.message  the verification error
event      assignment.blocked    reason: artifact_integrity_failed
log        artifact integrity verification failed
           error, artifact_cache_hits, artifact_cache_misses

assignment.blocked rather than assignment.failed marks that nothing ran: the failure is in the inputs, and the kernel was never reached. The error message names the artifact condition that failed, such as a digest in the wrong form or bytes that do not match their digest.