engineering

Tie a release gate to an immutable build identifier

Record the artifact digest or equivalent immutable build identifier with each gate decision so a moving tag cannot reuse an unrelated scan result.

TrustIvan · · 5 min read

The approvals screen says the payments release passed, but the record only names the tag candidate. A retry published a second image under the same tag before promotion started. In this fictional release, the second image should wait while the team obtains a gate result for the bytes that will actually move into production. Start with an immutable identifier, then inspect what the policy approved for it.

Rehearse two build outputs behind one tag

Time UTCEventEvidence
09:10Build 421 publishes image ARegistry resolves candidate to digest A
09:17Scan and policy evaluation passVerdict names digest A and staging
09:25Retry publishes image BSame commit and tag, new digest B
09:32Promotion resolves its inputProduction job requests digest B

The short digest labels are placeholders. Keep the real full identifiers in build and gate records. Promotion at 09:32 should look for an in-scope production decision on B. It found a staging decision on A, which is useful provenance for that earlier action. Give the promotion log distinct reasons for a destination mismatch and a subject mismatch so a release operator can request the correct evidence.

Make the decision scope readable at promotion

A release gate joins a piece of evidence to a policy at a particular point in a workflow. Write down the required evidence and who may interpret it for the target. Capture the immutable artifact, intended destination, policy revision and observation window when those fields affect the decision. The build and promotion jobs may run under different identities. Give the promotion job an authoritative record it can check even when the producer has finished and the human-readable job output has expired.

Use the identifier of the artifact the gate inspected, along with scanner profile, observed time and policy version. The promotion pipeline should confirm that its candidate matches that same immutable identifier before interpreting the gate result. If the policy applies by destination, also compare the target environment and any approval constraints. With a multi-platform image, capture the index and child manifests covered by the check.

Create two harmless fixture images from the same repository revision, using different test labels so their digests differ. Scan A, move the test tag to B, and leave both registry objects available. Export the decision balance before the tag moves and again after it moves. The exported subject should remain A in both views. Run the ordinary staging promotion path with B and compare its independently resolved identifier.

Rehearse how the gate represents missing evidence

Compare an export from 09:17 with the promotion decision from 09:32. If both just say that candidate passed, the record hides two changes at once. Put A and staging on the original verdict and B and production on the promotion request. Make a small table of whether the subject and destination match the active policy inputs. Only after you establish a matching B decision for production should the subsequent request be evaluated against that decision. The earlier receipt still supports its original staging review.

Now add a result for B whose index lists child manifests for two architectures. The test runner assesses only one child. Review the gate rule to see whether it can establish the second child's verdict or represent its absence. A single result for B at index level is useful only with evidence showing that the required children were covered. Record the parent-child relationship rather than treating either identifier as an interchangeable string.

Review the receipt the next operator will receive

Ask someone who did not run the build to identify what the gate examined and why the destination accepted the decision. They should be able to find the policy revision, the observed subject, the conclusion and approval basis directly. Include timestamps and retain the previous verdict when a repeat evaluation produces a different outcome. Determine where this history lives when there are multiple release jobs or a deployment tool change. The operator should know whether a new review, an evidence re-collection or a policy escalation will move the release forward.

Make the durable approval record carry subject, platform scope, policy version, decision time and destination. Keep the source build and scan references so an evaluator can tell whether a future recheck collected new evidence or simply replayed the old decision. Ask the operator to retrieve the approved digest using only the promotion record, then compare the digest to the registry and deployment receipts.

Rehearse in staging with two builds that share a tag. Verify that the gate can distinguish which one passed. A report export should show the subject of the decision directly. The OCI image specification explains manifest structure, and the SLSA provenance specification describes what a build provenance statement attests.

Finish the rehearsal by collecting the missing B evidence within the correct production policy scope. Retry promotion from the original selected digest and inspect the receipt after the normal deployment step. A later tag movement should leave the saved decision untouched. The release operator can then explain both the waiting action and the permitted action using the same identity check.