Skip to content

fix(ci): auto-promote gate-check uses workflow file paths, not names - #2204

Merged
hongmingwang-moleculeai merged 1 commit into
stagingfrom
fix/auto-promote-gates-use-file-paths
Apr 28, 2026
Merged

fix(ci): auto-promote gate-check uses workflow file paths, not names#2204
hongmingwang-moleculeai merged 1 commit into
stagingfrom
fix/auto-promote-gates-use-file-paths

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Auto-promote ran for staging head `96955f7b` with all gates actually green (verified via `/commits//check-runs` API) but reported `CodeQL → missing/none` and aborted. Same SHA was promotable; auto-promote couldn't see it.

Cause

`gh run list --workflow="CodeQL"` matched two workflows:

  • `codeql.yml` (the explicit file in this repo)
  • `codeql` (GitHub's UI-configured Code-quality default setup)

gh CLI rejects ambiguous `--workflow=` lookups → empty result → gate fell to `missing/none` → `ALL_GREEN=false` → promote skipped. Every staging push since both names existed was silently dead-locked.

Fix

Switch `GATES` from display names to workflow file paths in `auto-promote-staging.yml`:

```diff
GATES=(

  • "CI"
  • "E2E Staging Canvas (Playwright)"
  • "E2E API Smoke Test"
  • "CodeQL"
  • "ci.yml"
  • "e2e-staging-canvas.yml"
  • "e2e-api.yml"
  • "codeql.yml"
    )
    ```

File paths are the canonical identifier for workflow files; display names are decoration and can collide.

Why this over renaming

The alternative would be renaming `codeql.yml`'s `name:` to disambiguate. That:

  • Couples the file to its display name being unique-by-policy
  • Doesn't help the next time someone copy-pastes a workflow with a duplicated `name:`
  • The display name shows up in lots of UI surfaces; renaming has visual blast radius

Using file paths is structurally correct and immune to future name collisions.

Sequence after this lands

  1. PR landing on staging
  2. Manual `staging → main` bridge — yes, another one. The bug is on main, so the next auto-promote will use the OLD name-based query and fail again. After this fix is on main, future auto-promotes are correct.
  3. Auto-promote chain becomes self-healing: every staging push that gets all 4 gates green fast-forwards main.
  4. Then ship `auto-promote-on-e2e.yml` for `:staging-` → `:latest` retag.

Test plan

  • yaml syntax valid
  • After landing on main: a fresh staging push should produce a successful auto-promote run that actually pushes (visible in `gh run view --json jobs --jq '.jobs[] | {name, conclusion}'` showing both `check-all-gates-green: success` and `promote: success`)
  • Log lines now show `ci.yml → completed/success` etc instead of `CI → completed/success` — confirm no other tooling parses these strings

🤖 Generated with Claude Code

Observed 2026-04-28: auto-promote ran for staging head 96955f7 with
all gates actually green (verified via /commits/<sha>/check-runs API)
yet `check-all-gates-green` reported `CodeQL → missing/none` and
aborted. Same SHA was promotable; auto-promote couldn't see it.

Cause: `gh run list --workflow="CodeQL"` matched two workflows in
this repo:

  - codeql.yml (explicit, scans both staging and main)
  - codeql       (GitHub UI-configured Code-quality default setup,
                  internal, scans default branch only)

gh CLI rejects ambiguous `--workflow=<name>` lookups and returns no
result → the gate fell through to `missing/none` and ALL_GREEN was
set false. Every staging push since both names existed has been
silently dead-locked.

Fix: switch GATES from display-name strings to workflow file paths.
File paths are the unique identifier for a workflow file in
.github/workflows/; display names are decoration and can collide.
The same `gh run list --workflow=<file.yml>` query that fails on
"CodeQL" succeeds on "codeql.yml" because the file path resolves
unambiguously.

No behavior change for the other three gates (CI, E2E Canvas, E2E
API Smoke) since their names didn't collide — they keep working,
they just identify by ci.yml / e2e-staging-canvas.yml / e2e-api.yml
now. The log line shape changes from `CI → completed/success` to
`ci.yml → completed/success` which is fine for ops grep.

When adding/removing a gate going forward: file paths only. Keep
branch-protection required-checks (check-run display names) in
sync as a separate manual step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged via the queue into staging with commit b823645 Apr 28, 2026
21 checks passed
HongmingWang-Rabbit added a commit that referenced this pull request Apr 28, 2026
staging → main: pipeline self-healing fixes (#2203 + #2204) — final manual bridge
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
Reasoning models (MiniMax M2.7, Moonshot K2.6) can spend the entire
4-token budget on reasoning, leaving zero tokens for the actual
response. Bump the per-provider liveness probe to 32 so reasoning
models have headroom to emit both reasoning and content.

Part of issue #2204.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
… 4 to 32 (#2204)' (#2209) from fix/2204-liveness-probe-max-tokens into main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant