Skip to content

ci: give each main-branch push its own concurrency group - #57

Merged
MrgSub merged 1 commit into
mainfrom
polylane/autofix/gk6weykpa9mb
Oct 16, 2026
Merged

MrgSub merged 1 commit into
mainfrom
polylane/autofix/gk6weykpa9mb

Conversation

@polylane

@polylane polylane Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Fixes: Mail-0/comet ci.yml self-cancels main-branch runs (concurrency group on constant refs/heads/main)

Comet's CI workflow shared one concurrency group across every push to main, so a newer push cancelled the run for the older commit and that commit was never fully verified. Each main-branch push now gets its own group and superseded runs are cancelled only for pull requests, so a run for every pushed commit reaches a conclusion.

flowchart LR
  A["push main A"] --> G["shared group ci-refs/heads/main"]
  B["push main B"] --> G
  G --> X["A run cancelled - commit unverified"]
  A2["push main A"] --> GA["group ci-run_id-A"]
  B2["push main B"] --> GB["group ci-run_id-B"]
  GA --> CA["A run completes"]
  GB --> CB["B run completes"]
Loading
Detection evidence

Affected: int_0c7912e40001wiz7sd656fid

Why this fix

Live run history for the ci workflow on main shows 14 of the last 40 push runs ended cancelled, each superseded by the next push. Making cancel-in-progress conditional alone does not fix this: a shared group still cancels a queued run when a newer one joins. Keying the push case on the run id gives every push its own group, matching the pattern Mail-0/sms-kit already uses. Impact stays low here because comet's release is tag-triggered and main requires no status check.

Out of scope
Causal chain
  • Signal (alert): Mail-0/comet ci.yml self-cancels main-branch runs (concurrency group on constant refs/heads/main)
  • Surfacing site: Mail-0/comet at Mail-0/comet:.github/workflows/ci.yml#concurrency
  • Mechanism: On a push to main, github.head_ref is empty, so the concurrency group resolves to the constant ci-refs/heads/main; with cancel-in-progress true, the next push to main cancels the previous push's in-flight ci run, so that commit's verification never completes.
  • Producer: ci workflow definition (.github/workflows/ci.yml) in Mail-0/comet, at Mail-0/comet:.github/workflows/ci.yml#concurrency
  • Trigger: Two pushes to main close in time; the later push starts a run in the same concurrency group.
  • What happens to the failed unit today: ci.yml triggers on push to main with no required status check on the branch; release.yml is tag-triggered and not gated on ci.
  • Cadence check: 14 cancelled of 40 main push runs in the returned history; latest cancelled 2026-09-10.
  • Blast radius: unknown other resource(s), unknown other tenant(s); data at risk: Unverified main commits; no data is lost.
  • Producer evidence:
1 file changed (+6/-2)
  • .github/workflows/ci.yml: modified, +6/-2

View thread View autofix


Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.

Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
@polylane polylane Bot added polylane severity:low Polylane autofix severity: low labels Oct 16, 2026
@polylane
polylane Bot requested a review from MrgSub October 16, 2026 18:24
@polylane

polylane Bot commented Oct 16, 2026

Copy link
Copy Markdown
Author

Note

Production impact unlikely.

Documentation, test, or CI-only change; nothing that runs in production is affected.

View in Polylane Disable reviews

Polylane analysed 71e7398 for production impact. You can ask follow-ups by mentioning @polylane in a comment.

Did this help? React 👍 or 👎 so the next review is sharper.

@MrgSub
MrgSub merged commit 2114dc3 into main Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

polylane severity:low Polylane autofix severity: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant