Skip to content

promotion: hold the next stage until health checks pass for a soak period #5326

Closed

Description

@lex00

chant lifecycle health reports runtime health and always exits 0 (guide/checking-health.mdx). health-gate, wait-endpoint and ApplyOp's verify check a single step. Nothing in chant holds promotion to the next environment until the one before it has stayed healthy for a while.

terragucci already has one in the product: rollouts.soak (packages/terragucci/src/rollout/soak.ts) holds a module version's next consumer wave on drift, apply and policy conditions, with overrides and /terragucci skip-soak. Per this epic's first rule, chant's soak takes those as check kinds, and terragucci moves onto it (INTENTIUS/terragucci#1497).

Add a soak to a stage: checks that must pass continuously for a duration after the stage applied, before the next stage's gate opens. It fits the gate model, so no process waits: a promotion during the soak records the pending fact and exits 3, a re-run reads the elapsed time and the checks, and a failing check holds the next stage and notifies.

Needs #5324. Health for terraform and pulumi members needs #5338.

Acceptance criteria

  • A stage declares soak checks and a duration in the pipeline (pipeline: one TypeScript declaration of stages and waves, folded to a spec before anything runs #5324), and so can a wave, so a module rollout's consumer waves soak one after another.
  • Checks and durations can be set per member glob, covering rollouts.soak's per-module overrides.
  • Checks: HTTP status and body match, a Prometheus query against a threshold, a CloudWatch alarm state, a command's exit code, lifecycle health for the stage's environment (unknown does not count as passing), and terragucci's drift, apply and policy conditions.
  • Promotion to the next stage exits 3 during the soak, with the time left in the output and on the ledger.
  • Each check says what a failure does: restart (the default; the soak starts over once the check passes again) or hold (the next stage stays held until a person ends the soak or the check passes, with the elapsed time kept), which is how rollouts.soak treats a finding today. Either way the next stage is held and a chant.notify/v1 event of a new kind added to NOTIFY_EVENTS is sent.
  • The soak's clock starts at the stage's or wave's last apply, recorded on the ledger. Module rollouts soak on chant's soak terragucci#1497's fixtures of today's rollouts.soak behaviour pass on chant's soak.
  • A person can end a soak early through the stage's gate (a product maps its comment, such as /terragucci skip-soak, onto it), and the ledger records who.
  • The plan note for a change shows the soak of every later stage it will pass through.
  • reference/exit-codes says exit 3 also covers a clock wait, and the product exit-code tables follow.
  • The folded spec (pipeline: one TypeScript declaration of stages and waves, folded to a spec before anything runs #5324) carries a scheduled re-run of pending promotions, and pipeline: one TypeScript declaration of stages and waves, folded to a spec before anything runs #5324's GitHub, GitLab and Forgejo generators render it as a job. This issue adds the spec field and its golden files, not a second generator path.
  • Tests with a fake clock and fake checks; a docs page.
  • The capability is exported with a *_FLOOR constant naming the chant release that carries it, so products can check or pin to it.

Activity

  1. added
    epic:delivery
    on Nov 18, 2026
  2. lex00 commented on Nov 20, 2026

    @lex00
    ContributorAuthor

    From #5338 (#5364): lifecycle health on a terraform root or pulumi stack reports each resource type without a provider health reader as unknown, as #5338 states. With this issue's rule that unknown does not count as passing, a health check over a whole root holds on any uncovered resource. The check here may want a way to name the resources or types it covers, so a soak can pass on what it can observe while the unscoped default keeps holding.

  3. lex00 commented on Nov 20, 2026

    @lex00
    ContributorAuthor

    #5390 changes chant's reference/exit-codes and exit-codes.ts so exit 3 also covers a clock wait. The product exit-code tables live in each product's repository, so they change in the adoption lines that map the soak:

    product issue
    terragucci INTENTIUS/terragucci#1493, INTENTIUS/terragucci#1497
    plywood INTENTIUS/plywood#156
    sql-yodeler INTENTIUS/sql-yodeler#384

    The terragucci fixtures from INTENTIUS/terragucci#1505 (83 cases) are copied into packages/core/src/pipeline/__fixtures__/soak/ and pass on chant's soak in soak-fixtures.test.ts.

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

    epic:delivery

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions