staging → main: auto-promote 36fd658 - #2394
Merged
Merged
Conversation
When gh run list returns [] (no E2E run on the main SHA — the common case for canvas-only / cmd-only / sweep-only changes whose paths don't trigger E2E), jq's `.[0]` is null and the interpolation `"\(null)/\(null // "none")"` produces "null/none". The case statement has no `null/none)` branch, so it falls into `*)` → exit 1 → auto-promote-on-e2e fails → `:latest` doesn't get retagged to the new SHA → tenants on `redeploy-tenants-on-main` end up pulling the OLD `:latest` digest. Surfaced 2026-04-30 17:00Z as the first observable consequence of PR #2389 (App-token dispatch fix). Every prior auto-promote-on-e2e run was triggered by E2E completion (the "Upstream is E2E itself" short-circuit at line 151 fired before reaching the gate). #2389 made publish-image's completion event correctly fire workflow_run listeners — auto-promote-on-e2e is one of those listeners — and hit the latent jq bug on the first publish-upstream run. Fix: change `.[0]` to `(.[0] // {})` in the jq filter so the empty- array case becomes `none/none` (the documented "E2E paths-filtered out for this SHA — proceed" branch) instead of the unhandled `null/none`. Also default `.status` for the same defensive reason. Verified the three input shapes locally: [] → "none/none" ✓ [{status:completed,conclusion:success}] → "completed/success" ✓ [{status:in_progress,conclusion:null}] → "in_progress/none" ✓ Outer `|| echo "none/none"` fallback retained as defense-in-depth for non-zero gh exits (network / auth failures). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ll-handling fix(ci): handle empty E2E lookup in auto-promote-on-e2e gate
github-actions
Bot
requested a review
from hongmingwang-moleculeai
as a code owner
April 30, 2026 17:20
HongmingWang-Rabbit
left a comment
Contributor
There was a problem hiding this comment.
Five-axis pass via back-reference. Auto-promote (github-actions[bot]) bundles already-reviewed #2393:
- #2393
fix(ci): handle empty E2E lookup in auto-promote-on-e2e gate— approved on source PR by hongmingwang-moleculeai. Single jq filter change + 14-line comment block. Carrier diff (15/-1 in.github/workflows/auto-promote-on-e2e.yml) is byte-identical.
Five axes (fix is workflow-touching, comment-only either way):
- Correctness —
(.[0] // {}) | "\(.status // "none")/\(.conclusion // "none")"defends against the[]case where jq previously emitted"null/none"and fell through the case-statement default toexit 1. The added inline comment documents both empty cases (gh non-zero exit + zero-row result) and cites the surfacing date (2026-04-30, first publish-upstream auto-promote firing after #2389 fixed the App-token chain). - Readability — the new comment block is information-dense and ties the bug to the specific condition under which it surfaced. Future maintainers will not have to dig.
- Architecture — single-line filter swap; no new state, no new dependency.
- Security — no credentials, no auth-bypass; the workflow change touches only the gate's jq parser.
- Performance — identical runtime cost; jq filter complexity is unchanged.
Comment-only per loop policy (.github/workflows/* change). Approval already on source PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated promotion of
staging(36fd658c) tomain. All required staging gates green at this SHA: CI, E2E Staging Canvas, E2E API Smoke, CodeQL.This PR is auto-generated by
.github/workflows/auto-promote-staging.ymlwhenever every required gate completes green on the same staging SHA. It exists because main's branch protection requires status checks "set by the expected GitHub apps" — directgit pushfrom a workflow can't satisfy that, only PR merges through the queue can.Merge queue lands this; no human action needed unless gates fail. Reverse-direction sync (the merge commit on main → staging) is handled by
auto-sync-main-to-staging.yml.