Repository navigation
releases: gate approvals bind the release digest, the environment and the change set (#4045) - #4064
Merged
Merged
Conversation
…d the change set, and an empty change set passes without approval (#4045) components promote --release plans the release's change set for the target environment, stores it with storeGateChangeSet, and decides every gate it reaches under the op release against the document digest, releaseDigest and environment. The document names the release and environment it was planned for, inside its digest. A provisional or failed member is refused. An empty change set gets an empty: true resolution by the actor, counted only after the stored document reads back empty. Pending facts, resolutions and status gate items gain releaseDigest; chant approve copies it. The promote removes the templates it pins and warns when the source deploy's build manifest holds other bytes than the release's (#4045)
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 #4045
A release gate binds the release digest, the environment and the change-set document digest, as ws-104 question 2 decided. An environment whose change set is provably empty passes without an approval, recorded with
empty: true.components promote --releaseplans the release's change set for--toand stores it withstoreGateChangeSet(lifecycle: store each change set a gate binds by digest, mapped to graph node ids #4022) before deciding any gate. A component whose step can plan (terraform-apply) is planned by it. Any other component is compared with what--toruns now: its latest deploy record and the release that record names. Artifact digest, templates and target params are compared, and a difference is anupdateentry, orcreateif never deployed there. A deploy naming no release, or one whose release can't be read, becomes a hole, so that change set never counts as empty.evaluateGatetakesreleaseDigest; an approval counts only when the release, the environment and the change-set digest all match.chant approvecopiesreleaseDigestoff the pending fact only when approving that fact's own plan. Pending facts, resolutions and the status gate item carryreleaseDigest.empty: trueresolution per gate with the actor inresolvedBy. It counts only after the stored document reads back empty, quorum and signing rules don't apply, and it never counts as a person's approval. Deploy records name the release, and their admission names oprelease.releaseDigestandenvironment, inside its digest. Change sets are stored under their digest, so outside it two releases with identical (for example empty) change sets would share one stored file. Documents without the fields hash as before, so no existing digest moves.--releasethey are recorded under the oprelease, so components that use the same gate name share one gate per environment and one approval (chant approve release <gate> --env <env>). This keepsidentity.gatessigning rules, which are looked up by gate name. Gates underreleaseare not resolved over MCP or ACP.manifestDigest) is compared with the release'sartifactDigestsat the same paths. A mismatch warns but does not refuse: image builds aren't reproducible and the source environment was built by its ownrun --components. Once records: join commit, release, gate and deploy through the release digest #4043 makes deploys run the release's own artifacts, it can become a refusal..chant/release-templates/.Not done here: an Op gate that binds a
composeChangeSetdigest still stores nothing (a follow-up inlocal-executor.ts).Level-0 output changes
On the exceptions page and #2525:
promote --releaseprints arelease gate:line and writes stored change sets andemptyresolutions; its gates move to opreleasewithchant approve release <gate> --env <env>; approvals given for release promotes before this change no longer count;--jsongainsrelease.changeSetandrelease.empty; the artifact warning is new; new fieldsreleaseDigestandemptyon gate records,releaseDigeston the status gate item,releaseDigest/environmenton change-set documents, andvia: "empty"in run events. No golden moved.Acceptance
op/gate-release.test.ts"an approval for one release can't be used by another, even for the same change-set digest";promote.test.ts).approve-release.test.ts).change-set-store.test.ts,release-gate.test.ts).promote.test.ts: non-empty stops, empty passes, empty counts only once the stored document reads back empty, provisional member refused).releaseDigestandemptyappear in the floor table (0.124.28 inworkspace-read-contract.mdx).Checks
npx tsx scripts/typecheck.ts: no regressions (26 baselined)npx tsx scripts/check-lexicons.ts: no untracked tier-1 failuresGITHUB_SHA,GITHUB_RUN_IDandCIset, after rebasing on mainop/factory.e2e.test.tsfailures and load timeouts that pass alonelint-docs-sentences(no regressions),lint-prompts,check-docs-diataxis,./scripts/build-docs.sh: passchant/lifecycle(local and origin) and.git/chant/were unchanged by the runs.