Skip to content

Emit queue: max on top-level workflow concurrency groups - #53731

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-top-level-workflow-concurrency
Aug 18, 2026
Merged

Emit queue: max on top-level workflow concurrency groups#53731
pelikhan merged 3 commits into
mainfrom
copilot/fix-top-level-workflow-concurrency

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The compiler already emits queue: max by default on job-level concurrency groups (agent, output, conclusion), but the top-level workflow concurrency group was left at the Actions default (queue: single). This meant back-to-back triggers — most notably rapid pushes — could displace a queued run before it ever executed, silently dropping work instead of queuing it.

Compiler change

  • GenerateConcurrencyConfig (pkg/workflow/concurrency.go) now appends queue: max to the generated top-level group whenever cancel-in-progress is not enabled for that trigger (the two are mutually exclusive per GitHub Actions).
  • Respects the existing features.group-concurrency-queue: false opt-out via isGroupConcurrencyQueueEnabled, consistent with job-level groups.
concurrency:
  group: "gh-aw-${{ github.workflow }}-${{ github.ref || github.run_id }}"
  queue: max

Tests & fixtures

  • Updated pkg/workflow/concurrency_test.go expectations for all non-cancelling trigger cases.
  • Regenerated wasm golden fixtures.

Generated workflows

  • Recompiled all .github/workflows/*.md sources so .lock.yml files reflect the new default (each gains a single queue: max line under its top-level concurrency block; PR-triggered workflows are unaffected since they use cancel-in-progress: true).

Docs

  • Updated docs/src/content/docs/reference/concurrency.md to describe the new default and the opt-out.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix top-level workflow concurrency group to include queue: max Emit queue: max on top-level workflow concurrency groups Aug 18, 2026
Copilot AI requested a review from pelikhan August 18, 2026 15:39
@pelikhan
pelikhan marked this pull request as ready for review August 18, 2026 15:47
Copilot AI balanced review requested due to automatic review settings August 18, 2026 15:47

Copilot AI 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.

Pull request overview

Updates compiler-generated workflow concurrency so non-cancelling runs queue sequentially instead of displacing pending runs.

Changes:

  • Emits top-level queue: max unless cancellation or the feature opt-out is active.
  • Updates concurrency tests, documentation, and golden fixtures.
  • Recompiles generated workflow lock files.
Show a summary per file
File Description
pkg/workflow/concurrency.go Generates top-level queue configuration.
pkg/workflow/concurrency_test.go Updates concurrency expectations.
docs/src/content/docs/reference/concurrency.md Documents defaults and opt-out.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Updates golden output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden Updates golden output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Updates golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden Updates engine golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden Updates engine golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden Updates engine golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden Updates engine golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden Updates engine golden output.
.github/workflows/*.lock.yml (273 files) Regenerates workflows with top-level queue: max.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 283/283 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +406 to +407
group: "gh-aw-mixed-call-worker-${{ github.run_id }}"
queue: max`,
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot make sure there is a way to turn off Q-Max for that frontmatter.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot make sure there is a way to turn off Q-Max for that frontmatter.

The opt-out already applies to the top-level group: GenerateConcurrencyConfig calls the same isGroupConcurrencyQueueEnabled check used for job-level groups, so features.group-concurrency-queue: false disables queue: max everywhere, including the top-level workflow group. Added a test case (TestGenerateConcurrencyConfig) verifying this in 33a1f8d (see commit).

@pelikhan
pelikhan merged commit 2b1b1f9 into main Aug 18, 2026
30 checks passed
@pelikhan
pelikhan deleted the copilot/fix-top-level-workflow-concurrency branch August 18, 2026 17:07
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.

Top-level workflow concurrency group omits queue: max, so push-triggered workflows silently drop queued runs

3 participants