Skip to content

staging → main: auto-promote 36fd658 - #2394

Merged
github-actions[bot] merged 2 commits into
mainfrom
staging
Apr 30, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
staging

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated promotion of staging (36fd658c) to main. 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.yml whenever 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" — direct git push from 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.

Hongming Wang and others added 2 commits April 30, 2026 10:07
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

@HongmingWang-Rabbit HongmingWang-Rabbit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to exit 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.

@github-actions
github-actions Bot merged commit f57ebd4 into main Apr 30, 2026
53 checks passed
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
… to prevent resurrection (#306)' (#2394) from fix/restart-guard-removed-workspace 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