Sub topic 7
Verify Artifact Identity, Provenance, and Integrity
Assume you understand basic model deployment, production monitoring, version control, and APIs. This chapter focuses on proving that a rollback uses the intended model artifact, not merely a file with the right version label.
Why Artifact Identity Matters
A model version is a logical name such as 2026.03.08. The artifact is the exact serialized model file, container image, or package deployed by the service. A rollback is safe only when the selected artifact is the known-good artifact that was previously validated.
A version label alone is weak evidence. Someone could rebuild the same source code with a different dependency, training data snapshot, compiler, or packaging process. The resulting artifact might behave differently.
A cryptographic digest is a fixed-length value calculated from artifact bytes. For example, a SHA-256 digest changes when even one byte changes. Store the digest with the release metadata and compare it before deployment.
Useful release metadata includes:
- Model version and artifact SHA-256 digest
- Training code commit and data snapshot identifier
- Dependency lockfile or container image digest
- Build timestamp and builder identity
- Evaluation results and approval record
- Deployment environment and configuration
- Security scan and signing information
Trace the Artifact’s Provenance
Provenance describes where an artifact came from and which steps produced it. During rollback, trace the artifact backward from the deployment registry to its build and validation records.
A practical chain looks like this:
The release record should point to an immutable registry object. Avoid selecting “the latest” tag during an incident. Tags can move, while a digest identifies exact bytes.
Verify Integrity Before Changing Traffic
Use independent checks before routing requests to the rollback target:
- Find the last release that passed validation and was approved for production.
- Read its expected artifact digest from the release record.
- Fetch the artifact by immutable digest, not a mutable tag.
- Recalculate or inspect the artifact digest.
- Verify the signature or build attestation against a trusted key.
- Confirm that the artifact was built from the expected source, dependencies, and data snapshot.
- Record each check in the change or incident record.
For example, a rollback policy can make the target and validation limits explicit:
rollback:
target_version: "2026.03.08"
expected_artifact_sha256: "sha256:bbb"
provenance:
source_commit: "8f31a2c"
data_snapshot: "fraud-data-2026-03-07"
approved_by: "ml-platform"
validation:
max_error_rate: 0.03
max_p95_latency_ms: 250The values must come from your release system. Do not copy them from an alert, chat message, or an untrusted deployment parameter.
Common Failure Modes
- A mutable
latesttag points to a newer, untested artifact. - The model file is correct, but the serving container uses incompatible libraries.
- A registry copy is corrupted or incomplete.
- The signature is checked against an untrusted key.
- The release record omits the data snapshot, making provenance incomplete.
- A rollback restores the model but leaves incompatible preprocessing code active.
Keep the artifact, metadata, signatures, and approval records retained for at least the period required by your operational and regulatory policies.
Exercise
Why should a rollback select an artifact by digest instead of selecting the model tagged "latest"?
Show answer
A digest identifies exact artifact bytes, while a mutable tag can point to a different or unvalidated artifact.