Repository navigation
lifecycle: store each change set a gate binds, mapped to graph node ids (#4022) - #4058
Merged
Merged
Conversation
…aph node ids (#4022) components pr-apply stores the change-set document its gate binds at _change-sets/<digest>.json on chant/lifecycle (under _members/<member>/ in a workspace) before it decides the gate, written once. Each entry gets node, the id chant workspace graph gives it, mapped against the member's own chant graph --format ir; node and the document's graph stay outside the digest. storeGateChangeSet is the call #4045 makes for release gates and empty resolutions. chant change-set show <digest> --json prints the new change-set-show read (v1, floor 0.124.28), and a gate in workspace status --json gains changeSet when a change set is stored under its planDigest. The tofu pull-request loop test and an aws workspace member check the node ids against the real graph.
…eading the graph in process; the spawned graph moves to an e2e test (#4022)
…hes the real chant/lifecycle (#4022)
lex00
force-pushed
the
feat/4022-stored-change-sets
branch
from
October 17, 2026 03:40
c180fa8 to
41050d0
Compare
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 #4022
The change set a gate binds is now stored by its digest and can be read after the step ends, with each entry placed on its graph node.
components pr-applystores the change-set document its gate binds before deciding the gate:_change-sets/<digest>.jsononchant/lifecycle(under_members/<member>/in a workspace), written once.node, the idchant workspace graphuses for that address, read from the member's ownchant graph --format irwith the member name in front in a workspace. A chant entry's id is its address; a terraform, tofu or choudoufu entry's is<root>/<block>with module calls as path segments and the instance index dropped. A delete of a block the planning commit no longer declares getsnull.nodeand the newgraphfield stay out of the digest, so no existing digest changes.chant lint, whichchant graphrefuses), the document is still stored with null nodes and pr-apply warns. The gate decides the same either way.chant change-set show <digest> [--member <name>] [--json]prints it.--jsonis the newchange-set-showread (v1, floor 0.124.28), reusingnot-a-git-repository,ledger-unreadableandledger-malformed.workspace status --jsongainschangeSetwhen a document is stored under itsplanDigest. A component gate in a plainrun --componentsbinds the lifecycle-plan digest and has none.storeGateChangeSet(lifecycle/gate-change-set.ts) is the call releases: gate approvals bind the release digest, the environment and the change set #4045 uses for release gates andemptyresolutions; it is posted on releases: gate approvals bind the release digest, the environment and the change set #4045.The graph read is one
chant graph --format irchild process per new digest, a few seconds on a real project and skipped on a repeat apply or--resume. Tests inject the graph reader throughsetGraphIdReader. A new e2e test checks the in-process ids equal the spawnedchant graphids, so the fast unit test stays within the 5 s budget.Level-0 output changes
On the exceptions page and #2525:
--helplistschange-set show; pr-apply writes a_change-sets/commit tochant/lifecycle, runschant graph --format ironce per new digest and may warn;workspace status --jsongates gainchangeSet; stored documents gainentries[].nodeandgraph. No golden moved.Acceptance
chant change-set show(change-set-store.test.ts,gate-change-set.e2e.test.ts).chant workspace graph, andchange-set-graph.e2e.test.tsagainst a real terraform root with a module.workspace status --json).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 run events: emitters in the local runtime, run --components, fountain, and pr-plan/pr-apply #4041op/factory.e2e.test.tsfailureslint-docs-sentences(no regressions),lint-prompts,check-docs-diataxis,./scripts/build-docs.sh: passNot covered, noted on #4045: an Op gate that binds a
composeChangeSetdigest stores nothing yet.