Skip to content

generated CI: merge- or comment-triggered apply bound to the PR's plan, affected members only #3183

Closed

Description

@lex00

Part of the boundaries epic, #3166 (infra/platform teams). Builds on PrPlanReport (github lexicon), the GitLab MR report shape, #2300 and #3048.

Problem

chant already posts a sticky plan comment per environment on a pull request (lexicons/github/src/composites/pr-plan-report.ts; Forgejo inherits it; lifecycle plan --report has a GitLab MR shape). What platform teams compare against Atlantis, Digger or Terraform Cloud is the rest of the loop:

Proposal

Done when

A PR touching one of five Terraform roots plans only that root and its dependents, applies on merge with the approved digest, and refuses with a clear message if the plan changed after review.

Depends on #3163.

Activity

  1. added
    enhancement
    area:ops
    area:ci
    boundaries
    on Oct 1, 2026
  2. lex00 commented on Oct 4, 2026

    @lex00
    ContributorAuthor

    Decisions taken while building this (PR linked above):

    • Apply triggers on merge only. There is no comment-triggered apply, per #3452 ruling 1 ("never apply, approve or unlock by comment"). Approval is chant approve pr-<n> pr-apply --plan <digest> --approver <forge identity> --sign, run by a reviewer. With --require-review, the default in generated CI, the approver must also have a standing approving review on the forge.
    • Statuses: one commit status per stage (chant/plan, chant/apply), per #3448 ruling 3. Per-member results are in the sticky note and pr-*.json.
    • The gate is pr-apply under op pr-<n>. The fixed gate name lets identity.gates require signed approvals. The per-PR op keeps approvals apart.
    • The plan job writes nothing to chant/lifecycle because it runs PR code. The apply job records the pending fact.
    • Dependents are planned against current upstream outputs. If an upstream output moves, the dependent applies its approved plan and is marked inputsMoved. Gated waves (gated waves: a gate per wave bound to the wave's set digest, for any Terraform-family root (choudoufu#1749) #3049) carry moved outputs through.
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:ciarea:opsboundariesenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions