Skip to content

one change-set document across lifecycle, terraform/choudoufu, warden and release plans #3181

Closed

Description

@lex00

Part of the boundaries epic, #3166 (infra/platform teams). Builds on #2300 (plan-bound gates) and #3049 (set digests across roots).

Problem

Several things plan changes, each with its own output: chant lifecycle plan for the cloud lexicons, terraform and choudoufu plans, ApplyOp/TerraformApplyOp plan phases, warden reconcile plans, and the component orchestrator's release plan. Gates bind a digest of each (#2300), and #3049 adds set digests across roots. But a reader can't ask one question of all of them: what will change, where, and how risky is it. behold renders each kind separately, and a policy can't look inside any of them.

Proposal

One typed change-set document, versioned and schema'd like the read contract:

  • entries of { member, lexicon, address, type, action (create/update/replace/delete), disruption, region/scope, attributes changed }
  • a summary: counts per action, per type and per member, deletes and replacements listed
  • the digest gates already bind, computed over the same content
  • every planner above emits it (directly, or through an adapter in its lexicon)

behold renders one plan view from it, the gate policy context reads it (#3182), and PR plan reports (PrPlanReport, the GitLab MR shape) can render from it.

Done when

A workspace with a chant member, a choudoufu member and a warden produces one change set for a combined run, and its digest is what the gate binds.

Activity

  1. added
    area:lifecycle
    area:ops
    design
    boundaries
    on Oct 1, 2026
  2. lex00 commented on Oct 1, 2026

    @lex00
    ContributorAuthor

    #3188 (the grouped plan summary across roots: same changes grouped, every destroy named, sized for an MR note) is planned as a view over this change-set document, so its address normalization should be designed with this schema in mind.

  3. lex00 commented on Oct 4, 2026

    @lex00
    ContributorAuthor

    Constraint from terragucci (ruling 2026-10-03, INTENTIUS/terragucci#18): terragucci's stages will run in customer CI as one bundled file (npx -y @intentius/terragucci@<version> stage <name>), with no TypeScript toolchain installed. The chant code those stages call (the change-set document here, #3188's grouping, plan and set digests, #3049's gate ledger) needs to be importable without pulling in typescript, esbuild or the fold/lint/codegen modules, so it bundles small. Today a lexicon's entry point drags in its lint rules and TypeScript; importing narrow subpaths (serializer, generated/index) avoids it, and the same care applies to the new modules.

  4. lex00 commented on Oct 4, 2026

    @lex00
    ContributorAuthor

    Decisions taken from the code while building this.

    Digest. Each member carries the plan digest a gate on that member alone binds. For terraform, tofu and choudoufu roots that is terraformPlanDigest, the value TerraformApplyOp binds. The document's digest is computePlanDigest("change-set", pairs) over { member, planDigest } sorted by member. That is #3049's set digest, with member in place of root. A terraform-family member is named after its root, so the two agree. A wave's digest is changeSetDigest over the wave's members. Entries and the summary are not hashed again, so changing how chant projects a plan does not expire approvals.

    Where it lives. The document is part of read contract 1, schema https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json. The code is at @intentius/chant/change-set, and the terraform-family adapters are at @intentius/chant-lexicon-terraform/change-set. Both import only the plan digest code, which keeps them bundleable per INTENTIUS/terragucci#18.

    The combined run. No workspace-wide plan command exists, so the combined run is an Op. It has one Plan step per member, then composeChangeSet, then gate(name, { plan: changeSet.out.digest }).

    Actions. create, update, replace, delete, plus read, no-op and forget when the planner reports them. A chant update that its lexicon classifies replace or destroy becomes replace. unobserved entries become member holes. adopt and runtime are left out.

    For #3188. Entries carry name, index and module apart from address. Attributes carry their before and after values, redacted where the planner marks them sensitive. Grouping can therefore normalize names without re-parsing addresses, and it can still tell value changes apart.

    For #3049, an open difference. chant's terraform plan digest covers no-op entries. choudoufu's root digest (internal/live/setdigest) leaves them out. A drifted resource that the plan does not touch moves chant's digest and leaves choudoufu's alone. The choudoufu set-plan adapter keeps choudoufu's value as nativeDigest beside chant's planDigest. #3049 has to settle which coverage the wave gate uses.

    Not covered. github-warden prints its plan as text only. readChangeSetPart reads the reconcile ChangeSet it would write as JSON. The component release plan has no adapter, because its content is opaque.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lifecyclearea:opsboundariesdesign

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions