feat: add concurrency group to conclusion job using workflow ID#19616
feat: add concurrency group to conclusion job using workflow ID#19616
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
Commit pushed:
|
|
🧪 Smoke Test Results for §22676642022
Overall: PASS (11/12, Serena MCP not available)
|
There was a problem hiding this comment.
This PR adds a concurrency group (gh-aw-conclusion-{workflow-id}) to the conclusion job, preventing race conditions when multiple agent runs fire simultaneously on the same workflow. The implementation is clean and well-tested. cancel-in-progress: false is the right choice for safe-output jobs that must complete their writes.
📰 BREAKING: Report filed by Smoke Copilot
| } | ||
| }) | ||
| } | ||
| } |
There was a problem hiding this comment.
Nice table-driven tests! One minor note: the test directly accesses job.Concurrency as a string field — worth ensuring this field is exported and remains stable as part of the Job struct API, since downstream consumers (like these tests) depend on it.
| var concurrency string | ||
| if data.WorkflowID != "" { | ||
| group := "gh-aw-conclusion-" + data.WorkflowID | ||
| concurrency = c.indentYAMLLines(fmt.Sprintf("concurrency:\n group: %q\n cancel-in-progress: false", group), " ") |
There was a problem hiding this comment.
Good use of cancel-in-progress: false here — this ensures that in-flight conclusion jobs (which are writing to issues/discussions) aren't killed mid-write when a new agent run starts. Correct choice for safe-outputs jobs that must complete their reporting.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test Results — Run §22676642058Status: PARTIAL (2 skipped, 15 passed) Core Tests #1–10: ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ PR Review Tests #11–17: ✅ ✅ ✅
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
There was a problem hiding this comment.
Pull request overview
Adds job-level concurrency to the generated conclusion job to prevent concurrent agents running the same workflow from colliding on shared “conclusion” side effects (e.g., comment/status updates).
Changes:
- Emit a
concurrency:block for theconclusionjob usingWorkflowID(gh-aw-conclusion-{workflow_id}) withcancel-in-progress: false. - Add a unit test covering both present/absent
WorkflowIDcases. - Recompile generated
.lock.ymlworkflows to include the newconclusionjob concurrency stanza.
Reviewed changes
Copilot reviewed 161 out of 161 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/workflow/notify_comment.go | Sets a workflow-specific concurrency group for the conclusion job when WorkflowID is available. |
| pkg/workflow/notify_comment_test.go | Adds coverage ensuring the conclusion job concurrency block is emitted (or not) depending on WorkflowID. |
| .github/workflows/*.lock.yml | Regenerated locked workflows to include the new conclusion concurrency config. |
| .changeset/patch-conclusion-job-concurrency-group.md | Records a patch-level changelog entry for the behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Concurrent agents running the same workflow could have their
conclusionjobs interfere with each other since no job-level concurrency was set.Changes
notify_comment.go:buildConclusionJobnow sets a job-level concurrency group of the formgh-aw-conclusion-{workflow_id}(derived from the markdown filename) withcancel-in-progress: false, matching the pattern used by thesafe_outputsjobnotify_comment_test.go: AddedTestConclusionJobConcurrencyGroupcovering both the non-empty and emptyWorkflowIDcases.lock.ymlfiles recompiled with the new fieldResulting YAML
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/sh go(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD FFiles,SFiles,Sw-json go(http block)/usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha npx prettier --check '**/*.cjs' GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --cheremote.origin.url go 64/bin/go tierignore GO111MODULE 64/bin/go go(http block)/usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha npx prettier --check '**/*.cjs' GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK run-script/lib/nxterm-color sh -c "prettier" --check 'scripts/**/*GOSUMDB go 64/bin/go tierignore GO111MODULE 64/bin/go go(http block)https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck '**/*.cjs' '*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha q1o1Cfb1s GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ortcfg env d/gh-aw/main.go d/gh-aw/capitaliGOMOD 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGOPROXY(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha heck '**/*.cjs' GOINSECURE GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset
Warning
The following domain was blocked by the firewall during workflow execution:
github.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
✨ PR Review Safe Output Test - Run 22676642058