Repository navigation
feat(AF-993): gate requires an approved change ticket - #1185
Merged
Merged
Conversation
Contributor
Contributor
Coverage Report for Frontend Coverage (frontend)
File CoverageNo changed files found. |
Contributor
Backend Test Results11 409 tests +18 11 409 ✅ +18 12m 9s ⏱️ -16s Results for commit 15a25cd. ± Comparison against base commit 6332106. This pull request removes 1 and adds 19 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Contributor
Backend Code Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #993 (part of #989).
What
On an environment with
change_ticket_required = true, the deployment gate now refuses to release a deployment until a linked change ticket is approved.DefaultDeploymentGateService.releasable(status, frozen, scheduledFor, now, ticketRequired, ticketSatisfied). It is computed fromdeployment_ticketsrows only, never from a channel's config.decision = APPROVEDand none hasdecision = REJECTED.DEPLOYMENT_EXECUTEDrecordschange_ticket_bypassed = break_glass. A normal confirmation on a flagged environment recordschange_ticket_requiredandchange_ticket_keyinstead.change_ticket_requiredandchange_ticket { system, external_key, url, status, resolution, decision }. The ticket shown is the newest rejected one (it is what blocks the gate), else the newest approved one, else the newest. It is omitted when no ticket is linked. CI wrappers that branch on.releasablealone keep working.POST /admin/deployment-simulations): a hypothetical request has no ticket, so a flagged environment always simulates as not releasable. TheGATE_RELEASABILITYstep gains achange_ticket_requireddetail.none linked yet. Each wrapper has a new scenario in the offline harness.DefaultDeploymentTicketService.updateStatus): once a ticket is stampedAPPROVED, a later inbound status that matches neither the approve nor the reject list keeps itAPPROVED(anddecided_at), so a change moving on after CAB approval (Scheduled → Implement → Closed) doesn't close a gate that opened. Only a reject-list match overrides an approval; an unmapped status still clears aREJECTEDstamp. This changes the workflow: map ticket resolution onto a deployment decision #992 writer, raised in review (af-java-reviewer).Docs and website
docs/04-api-spec.md: gate response, releasable formula, confirm-execution audit metadata, decision-trace detailsdocs/03-data-model.md:DEPLOYMENT_EXECUTEDmetadata and the V202 flag notedocs/05-backend.md: gate sectiondocs/18-deployment-governance.md: §5 (four conjuncts, fail-closed rules, break-glass, "never releases" consequence, decision-stamp caveat), §10 (decision trace), Audit & notificationswebsite/docs/guides/deployment-approval/index.htmlandwebsite/features/deployment-governance/index.html, withsitemap.xmland JSON-LD dates bumpedhelp-corpus/regenerated;CLAUDE.mddeploygov paragraph updatedNo frontend change, so no screenshots. No e2e change: no UI or covered flow changed.
Verification
mvn -o verify -Pcoverage: BUILD SUCCESS, 11,408 tests, 0 failures. Spotless and checkstyle clean.ApplicationModulesTest,ApiPackageDependencyTestandMessagesParityTestpass.DefaultDeploymentGateServicecoverage: 100% lines / 90.6% branches..github/actions/tests/harness (deployment-gate, ci-templates incl. shellcheck, query-actions): all pass.Review notes
Four reviewers ran: verifier, cross-cutting, Java, and content. None reported a blocker. Fixed in the second commit:
docs/03,docs/08anddocs/18updatedStill open:
change_ticket_requireddetail says why.