Sections in this lesson
Review, Release Gates & Provenance
Use independent review, trusted CI evidence and rollback readiness to control release decisions.
Reviewed: · Content owner: Interview Preparator
What you will learn
- Block missing, failed and stale release evidence.
- Separate human approval from agent self-review.
- Explain provenance and rollback limits.
Before you start
The flow
- 1.Candidate digest
- 2.CI checks
- 3.Eval comparison
- 4.Independent review
- 5.Rollback readiness
- 6.Authorized promotion
Review the change and its evidence
An independent human checks requirements, negative cases, authorization, remaining risks and recovery. The review must refer to the exact candidate artifact; a later edit invalidates it. Self-review and a second model can assist inspection but do not become a human approval.
The example gate rejects absent/duplicate/failed checks, stale digests, eval regressions and missing rollback preparation. Its approved test case uses a trusted identity adapter fixture; a user-written reviewer or identityVerified field is not proof of a real reviewer.
Enforce authority in the platform
Use protected review/branch and environment rules with the permissions appropriate to the repository. Feature availability varies by hosting plan and visibility. Environment names in YAML alone do not configure required reviewers. Keep PR checks read-only and avoid exposing secrets to untrusted code.
Pin third-party actions to verified full commit IDs, restrict token permissions and avoid executing issue/PR text as shell code. Repository settings and an authenticated CI identity adapter must enforce the release boundary; this local teaching function is not an authorization service.
Provenance and rollback
Provenance connects artifact bytes to source, build process and identity. A checksum alone does not establish who built it, and an attestation does not establish that the software is safe. Verify both the artifact digest and the expected issuer/workflow before promotion.
Rollback needs a retained previous artifact, compatible data and tested smoke checks. For this schema-free case the prior version ignores the new optional field; validate tenant isolation and CSRF after rollback. No production release or rollback is executed by the course commands.
Try it
// Teaching policy only: trusted CI must supply identity, artifact and check evidence.// A JSON field named reviewer is never proof of an authenticated human approval.export function deliveryGate(evidence, review, expectedDigest) { const reasons = []; const digest = /^[a-f0-9]{64}$/; if (!digest.test(expectedDigest ?? '') || evidence?.bundleDigest !== expectedDigest) reasons.push('ARTIFACT_MISMATCH'); const required = ['content', 'unit', 'integration', 'eval', 'lint', 'build']; for (const name of required) { const matches = Array.isArray(evidence?.checks) ? evidence.checks.filter(check => check?.name === name) : []; if (matches.length !== 1 || matches[0].exitCode !== 0 || matches[0].bundleDigest !== expectedDigest) reasons.push(`CHECK_${name.toUpperCase()}`); } if (!Number.isInteger(evidence?.eval?.total) || evidence.eval.total < 6 || evidence.eval.passed !== evidence.eval.total) reasons.push('EVAL_FAILED'); if (review?.decision !== 'approved' || review?.bundleDigest !== expectedDigest) reasons.push('REVIEW_PENDING_OR_STALE'); if (review?.identityVerified !== true || review?.role !== 'human' || !review?.reviewer || review.reviewer === evidence?.author) reasons.push('INDEPENDENT_HUMAN_REQUIRED'); if (!evidence?.rollback?.previousArtifact || !evidence?.rollback?.smokeCommand) reasons.push('ROLLBACK_MISSING'); return { releasable: reasons.length === 0, reasons };}Source: examples/agentic-sdlc/delivery-gate.mjs. Follow examples/agentic-sdlc/README.md to run the case. This is teaching evidence; human release review remains pending.
Interview questions
How would you demonstrate: Block missing, failed and stale release evidence.
The example gate rejects absent/duplicate/failed checks, stale digests, eval regressions and missing rollback preparation. Its approved test case uses a trusted identity adapter fixture; a user-written reviewer or identityVerified field is not proof of a real reviewer.
How would you demonstrate: Separate human approval from agent self-review.
Pin third-party actions to verified full commit IDs, restrict token permissions and avoid executing issue/PR text as shell code. Repository settings and an authenticated CI identity adapter must enforce the release boundary; this local teaching function is not an authorization service.
How would you demonstrate: Explain provenance and rollback limits.
Rollback needs a retained previous artifact, compatible data and tested smoke checks. For this schema-free case the prior version ignores the new optional field; validate tenant isolation and CSRF after rollback. No production release or rollback is executed by the course commands.
Practice
Apply this stage to RAG-SELECT-001 and prepare the handoff for the next owner.
Check your solution
- Reference one observable acceptance case.
- Include exact files, commands and remaining risks.
- Keep review pending until independent approval of the unchanged candidate.
Official references
Continue learning
Category sequence
Agentic SDLC
Lesson 5 / 6
Was this lesson useful?
Change notes: 2026-10-30: Phase 4, source-bound delivery case.