Skip to content

[Phase D] Auto-promotion: decide, open the chain-head PR, merge on green CI and advance the channel through the rings, pausing on any trigger #2128

Open

Description

@github-actions

Story

As a maintainer who decided no human is needed on the happy path,
I want the pipeline to promote a candidate that passed every gate to the head of its (family, tier) chain and walk it to stable,
so that release-to-default time is bounded only by the policy's shadow and soak windows.

Acceptance Criteria

  1. A pure decision function combines the stage results (pricing, compatibility/liveness preflight, quality gate, shadow, canary cost/latency) into PROMOTE, PAUSE(reason) or WAIT. Any PAUSE trigger from the ADR wins; INSUFFICIENT data → WAIT, never PROMOTE.
  2. On PROMOTE, the pipeline opens a PR that makes the candidate the first model of its (family, tier) chain in scripts/lib/engine-models.sh, keeping the previous default as the next fallback hop. Only the chain head changes, scripts/check-model-pins.sh passes, and ET_BASELINE_MODEL and the eval judge are untouched. The PR merges once CI is green.
  3. After merge, the channel advances next → ring0 → ring1 → stable with scripts/cut-release.sh, under the ring dwell and sample rules. At each transition the generic canary report (--tier <tier>) is evaluated against the policy tolerances (cost +10% USD; latency p50 +10%, p95 +25%; spike cap 3×).
  4. On PAUSE, the onboarding issue gets the reason and a for-human-analysis label, and the pipeline cuts and merges nothing further for that rollout. The kill switch stops promotion at any stage.
  5. Negative-control test (offline): a stubbed known-bad candidate whose quality gate returns exit 1 (and, separately, whose canary cost is +30%) ends in PAUSE with no PR opened and no channel moved. Bats asserts this.
  6. Every stage result and the decision are appended to the onboarding issue.

Tasks / Subtasks

Dev Notes

Project Structure Notes

Pipeline decision library plus wiring in the onboarding workflow; reuses scripts/cut-release.sh and the canary workflows.

References

Likely target surface

  • scripts/lib/
  • .github/workflows/

Story prepared by the BMAD Scrum Master (Bob) for epic #2113. Status: ready-for-dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    initiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions