diff --git a/.changeset/patch-default-concurrency-pattern.md b/.changeset/patch-default-concurrency-pattern.md new file mode 100644 index 0000000000..0551e06e56 --- /dev/null +++ b/.changeset/patch-default-concurrency-pattern.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Add default concurrency pattern for non-special-case workflows diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index 13428aeae6..12e7eda650 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -63,7 +63,7 @@ jobs: actions: read contents: read concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3426,7 +3426,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index 11327fdc2e..6eb7759cfa 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -66,6 +66,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3287,6 +3289,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index 8cfc14c7e7..e7d428aad5 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -899,8 +899,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"max\":1},\"missing_tool\":{}}" @@ -4260,8 +4258,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index a0f6ba8745..6fde528595 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -397,7 +397,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"max\":1},\"create_issue\":{\"max\":1},\"missing_tool\":{}}" @@ -3975,7 +3975,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index 8b9850e796..aa05bd5107 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -62,6 +62,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_pull_request\":{},\"missing_tool\":{}}" @@ -3386,6 +3388,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml index 07b39fb18b..167266e59a 100644 --- a/.github/workflows/copilot-agent-analysis.lock.yml +++ b/.github/workflows/copilot-agent-analysis.lock.yml @@ -63,6 +63,8 @@ jobs: actions: read contents: read pull-requests: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3557,6 +3559,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index d16ef6b382..89b1bbed8b 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -63,6 +63,8 @@ jobs: actions: read contents: read pull-requests: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_pull_request\":{},\"missing_tool\":{}}" @@ -3528,6 +3530,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index fc33e91513..c7a3cc8721 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3506,7 +3506,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index e6f3802790..980dc367a3 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -68,8 +68,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1},\"missing_tool\":{}}" @@ -3469,8 +3467,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index bf5da098f4..69d5261f6c 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -66,6 +66,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-codex-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1},\"missing_tool\":{}}" @@ -3090,6 +3092,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-codex-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index 8dfc3df4d5..4774ee7d45 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -62,6 +62,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1},\"missing_tool\":{}}" @@ -3050,6 +3052,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index cf29903cb6..1bcaa71531 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -65,6 +65,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"create_pull_request\":{},\"missing_tool\":{}}" @@ -3966,6 +3968,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index 2225259ab2..3f4835147f 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -62,6 +62,8 @@ jobs: permissions: actions: read contents: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3350,6 +3352,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 4f7bf076db..50286cc5f6 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -88,7 +88,7 @@ jobs: actions: read contents: read concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{},\"notion-add-comment\":{\"description\":\"Add a comment to a Notion page\",\"inputs\":{\"comment\":{\"description\":\"The comment text to add\",\"required\":true,\"type\":\"string\"}},\"output\":\"Comment added to Notion successfully!\"},\"post-to-slack-channel\":{\"description\":\"Post a message to a Slack channel. Message must be 200 characters or less. Supports basic Slack markdown: *bold*, _italic_, ~strike~, `code`, ```code block```, \\u003equote, and links \\u003curl|text\\u003e. Requires GH_AW_SLACK_CHANNEL_ID environment variable to be set.\",\"inputs\":{\"message\":{\"description\":\"The message to post (max 200 characters, supports Slack markdown)\",\"required\":true,\"type\":\"string\"}},\"output\":\"Message posted to Slack successfully!\"}}" @@ -4388,7 +4388,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index a455546d92..e2dfdbcf29 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"notion-add-comment\":{\"description\":\"Add a comment to a Notion page\",\"inputs\":{\"comment\":{\"description\":\"The comment text to add\",\"required\":true,\"type\":\"string\"}},\"output\":\"Comment added to Notion successfully!\"}}" diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 2f7a154217..78c449c689 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -917,8 +917,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"max\":1},\"missing_tool\":{}}" @@ -4210,8 +4208,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index c2d6cbc429..2e62561aed 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -567,8 +567,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":5},\"missing_tool\":{}}" @@ -4064,8 +4062,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index e0a00a7b77..338461c3a5 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1172,8 +1172,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_ASSETS_ALLOWED_EXTS: ".png,.jpg,.jpeg" GITHUB_AW_ASSETS_BRANCH: "assets/${{ github.workflow }}" @@ -5604,8 +5602,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 2247c2c1e6..575e4e3c96 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -933,8 +933,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"max\":1},\"create_pull_request\":{},\"missing_tool\":{}}" @@ -5060,8 +5058,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 7585ade6f4..d05ede3537 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -61,7 +61,7 @@ jobs: actions: read contents: read concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3446,7 +3446,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index b81001d51a..ca9fac4f87 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -70,7 +70,7 @@ jobs: actions: read contents: read concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"max\":1},\"missing_tool\":{}}" @@ -3422,7 +3422,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index f933ff7d82..ff5f51022e 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -941,8 +941,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"max\":1},\"missing_tool\":{}}" @@ -4623,8 +4621,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index 8ece0a4013..b47fca6f5c 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -61,6 +61,8 @@ jobs: actions: read contents: read security-events: read + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_pull_request\":{},\"missing_tool\":{}}" @@ -3473,6 +3475,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index 33c4d09153..0cb880ebac 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -58,6 +58,8 @@ jobs: needs: activation runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1,\"min\":1},\"missing_tool\":{}}" @@ -3008,6 +3010,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 78a55de4ea..ac1381b55a 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -58,6 +58,8 @@ jobs: needs: activation runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-codex-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1,\"min\":1},\"missing_tool\":{}}" @@ -2836,6 +2838,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-codex-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 979a4d0264..aaa4db4ad8 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1,\"min\":1},\"missing_tool\":{}}" @@ -3423,7 +3423,7 @@ jobs: runs-on: ubuntu-latest permissions: read-all concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/smoke-genaiscript.lock.yml b/.github/workflows/smoke-genaiscript.lock.yml index 909a65feb3..5e37b92b6a 100644 --- a/.github/workflows/smoke-genaiscript.lock.yml +++ b/.github/workflows/smoke-genaiscript.lock.yml @@ -62,6 +62,8 @@ jobs: needs: activation runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-custom-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1,\"min\":1},\"missing_tool\":{}}" @@ -2146,6 +2148,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-custom-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/smoke-opencode.lock.yml b/.github/workflows/smoke-opencode.lock.yml index 3089ea3667..6092cb423a 100644 --- a/.github/workflows/smoke-opencode.lock.yml +++ b/.github/workflows/smoke-opencode.lock.yml @@ -62,6 +62,8 @@ jobs: needs: activation runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-custom-${{ github.workflow }}" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1,\"min\":1},\"missing_tool\":{}}" @@ -2130,6 +2132,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-custom-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 774621ae4a..f57a616711 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -399,6 +399,8 @@ jobs: needs: activation runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" env: GITHUB_AW_ASSETS_ALLOWED_EXTS: ".png,.jpg,.jpeg" GITHUB_AW_ASSETS_BRANCH: "assets/${{ github.workflow }}" @@ -3900,6 +3902,8 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all + concurrency: + group: "gh-aw-claude-${{ github.workflow }}" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/.github/workflows/test-post-steps.lock.yml b/.github/workflows/test-post-steps.lock.yml index 66cfd47175..d1b9d42a62 100644 --- a/.github/workflows/test-post-steps.lock.yml +++ b/.github/workflows/test-post-steps.lock.yml @@ -53,7 +53,7 @@ jobs: actions: read contents: read concurrency: - group: "gh-aw-copilot" + group: "gh-aw-copilot-${{ github.workflow }}" steps: - name: Checkout repository uses: actions/checkout@v5 diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 84ac78b591..9c3c2cc6bf 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -417,8 +417,6 @@ jobs: permissions: actions: read contents: read - concurrency: - group: "gh-aw-copilot" env: GITHUB_AW_SAFE_OUTPUTS: /tmp/gh-aw/safe-outputs/outputs.jsonl GITHUB_AW_SAFE_OUTPUTS_CONFIG: "{\"create_pull_request\":{},\"missing_tool\":{},\"push_to_pull_request_branch\":{}}" @@ -4199,8 +4197,6 @@ jobs: needs: agent runs-on: ubuntu-latest permissions: read-all - concurrency: - group: "gh-aw-copilot" timeout-minutes: 10 steps: - name: Download agent output artifact diff --git a/pkg/workflow/agentic_engine.go b/pkg/workflow/agentic_engine.go index a699e4d438..4a0060e514 100644 --- a/pkg/workflow/agentic_engine.go +++ b/pkg/workflow/agentic_engine.go @@ -70,10 +70,6 @@ type CodingAgentEngine interface { // GetVersionCommand returns the command to get the version of the agent (e.g., "copilot --version") // Returns empty string if the engine does not support version reporting GetVersionCommand() string - - // HasDefaultConcurrency returns true if this engine should have default concurrency mode enabled - // Default concurrency mode applies gh-aw-{engine-id} pattern when no custom concurrency is configured - HasDefaultConcurrency() bool } // ErrorPattern represents a regex pattern for extracting error information from logs @@ -104,7 +100,6 @@ type BaseEngine struct { supportsMaxTurns bool supportsWebFetch bool supportsWebSearch bool - hasDefaultConcurrency bool } func (e *BaseEngine) GetID() string { @@ -158,11 +153,6 @@ func (e *BaseEngine) GetVersionCommand() string { return "" } -// HasDefaultConcurrency returns the configured value for default concurrency mode -func (e *BaseEngine) HasDefaultConcurrency() bool { - return e.hasDefaultConcurrency -} - // GetLogFileForParsing returns the default log file path for parsing // Engines can override this to use engine-specific log files func (e *BaseEngine) GetLogFileForParsing() string { diff --git a/pkg/workflow/claude_engine.go b/pkg/workflow/claude_engine.go index a227433772..f39739375c 100644 --- a/pkg/workflow/claude_engine.go +++ b/pkg/workflow/claude_engine.go @@ -24,11 +24,10 @@ func NewClaudeEngine() *ClaudeEngine { description: "Uses Claude Code with full MCP tool support and allow-listing", experimental: false, supportsToolsAllowlist: true, - supportsHTTPTransport: true, // Claude supports both stdio and HTTP transport - supportsMaxTurns: true, // Claude supports max-turns feature - supportsWebFetch: true, // Claude has built-in WebFetch support - supportsWebSearch: true, // Claude has built-in WebSearch support - hasDefaultConcurrency: false, // Claude does NOT have default concurrency enabled + supportsHTTPTransport: true, // Claude supports both stdio and HTTP transport + supportsMaxTurns: true, // Claude supports max-turns feature + supportsWebFetch: true, // Claude has built-in WebFetch support + supportsWebSearch: true, // Claude has built-in WebSearch support }, } } diff --git a/pkg/workflow/codex_engine.go b/pkg/workflow/codex_engine.go index 3143a337b9..5fd383e6b4 100644 --- a/pkg/workflow/codex_engine.go +++ b/pkg/workflow/codex_engine.go @@ -51,7 +51,6 @@ func NewCodexEngine() *CodexEngine { supportsMaxTurns: false, // Codex does not support max-turns feature supportsWebFetch: false, // Codex does not have built-in web-fetch support supportsWebSearch: true, // Codex has built-in web-search support - hasDefaultConcurrency: false, // Codex does NOT have default concurrency enabled }, } } diff --git a/pkg/workflow/concurrency.go b/pkg/workflow/concurrency.go index a8ec1f8545..53249b0c08 100644 --- a/pkg/workflow/concurrency.go +++ b/pkg/workflow/concurrency.go @@ -36,37 +36,60 @@ func GenerateJobConcurrencyConfig(workflowData *WorkflowData) string { return workflowData.EngineConfig.Concurrency } - // Check if the engine has default concurrency enabled + // Check if this workflow has special trigger handling (issues, PRs, discussions, push, command) + // For these cases, no default concurrency should be applied at agent level + if hasSpecialTriggers(workflowData) { + return "" + } + + // For generic triggers like workflow_dispatch, apply default concurrency + // Pattern: gh-aw-{engine-id}-${{ github.workflow }} engineID := "" if workflowData.EngineConfig != nil && workflowData.EngineConfig.ID != "" { engineID = workflowData.EngineConfig.ID } - // Get the engine to check if default concurrency should be applied - registry := GetGlobalEngineRegistry() - engine, err := registry.GetEngine(engineID) - - // If engine not found or doesn't have default concurrency, return empty string (no concurrency) - if err != nil || !engine.HasDefaultConcurrency() { + if engineID == "" { + // If no engine ID is available, skip default concurrency return "" } - // Default behavior: single job per engine across all workflows - // Pattern: gh-aw-{engine-id} - var keys []string + // Build the default concurrency configuration + groupValue := fmt.Sprintf("gh-aw-%s-${{ github.workflow }}", engineID) + concurrencyConfig := fmt.Sprintf("concurrency:\n group: \"%s\"", groupValue) - // Prepend with gh-aw- prefix - keys = append(keys, "gh-aw") + return concurrencyConfig +} - // Use engine ID for isolation between different engines - keys = append(keys, engineID) +// hasSpecialTriggers checks if the workflow has special trigger types that require +// workflow-level concurrency handling (issues, PRs, discussions, push, command) +func hasSpecialTriggers(workflowData *WorkflowData) bool { + // Check for specific trigger types that have special concurrency handling + on := workflowData.On - groupValue := strings.Join(keys, "-") + // Check for issue-related triggers + if isIssueWorkflow(on) { + return true + } - // Build the concurrency configuration (no cancel-in-progress at agent level) - concurrencyConfig := fmt.Sprintf("concurrency:\n group: \"%s\"", groupValue) + // Check for pull request triggers + if isPullRequestWorkflow(on) { + return true + } - return concurrencyConfig + // Check for discussion triggers + if isDiscussionWorkflow(on) { + return true + } + + // Check for push triggers + if isPushWorkflow(on) { + return true + } + + // If none of the special triggers are detected, return false + // This means workflow_dispatch and other generic triggers will get default concurrency + return false } // isPullRequestWorkflow checks if a workflow's "on" section contains pull_request triggers diff --git a/pkg/workflow/concurrency_test.go b/pkg/workflow/concurrency_test.go index 8b105162d9..6dacb8a194 100644 --- a/pkg/workflow/concurrency_test.go +++ b/pkg/workflow/concurrency_test.go @@ -316,21 +316,42 @@ func TestGenerateJobConcurrencyConfig(t *testing.T) { description string }{ { - name: "Default concurrency with copilot engine", + name: "Default concurrency for workflow_dispatch with copilot engine", workflowData: &WorkflowData{ + On: "on:\n workflow_dispatch:", EngineConfig: &EngineConfig{ID: "copilot"}, }, expected: `concurrency: - group: "gh-aw-copilot"`, - description: "Copilot should use default pattern gh-aw-{engine-id} (has default concurrency enabled)", + group: "gh-aw-copilot-${{ github.workflow }}"`, + description: "Copilot with workflow_dispatch should get default concurrency", }, { - name: "No default concurrency with claude engine", + name: "Default concurrency for workflow_dispatch with claude engine", workflowData: &WorkflowData{ + On: "on:\n workflow_dispatch:", + EngineConfig: &EngineConfig{ID: "claude"}, + }, + expected: `concurrency: + group: "gh-aw-claude-${{ github.workflow }}"`, + description: "Claude with workflow_dispatch should get default concurrency", + }, + { + name: "No default concurrency for push workflows", + workflowData: &WorkflowData{ + On: "on:\n push:\n branches: [main]", + EngineConfig: &EngineConfig{ID: "copilot"}, + }, + expected: "", + description: "Push workflows should NOT get default concurrency (special case)", + }, + { + name: "No default concurrency for issue workflows", + workflowData: &WorkflowData{ + On: "on:\n issues:\n types: [opened]", EngineConfig: &EngineConfig{ID: "claude"}, }, expected: "", - description: "Claude should NOT have default concurrency (returns empty string)", + description: "Issue workflows should NOT get default concurrency (special case)", }, { name: "Custom concurrency string (simple group)", @@ -361,12 +382,14 @@ func TestGenerateJobConcurrencyConfig(t *testing.T) { description: "Should preserve cancel-in-progress when specified", }, { - name: "No default concurrency with codex engine", + name: "Default concurrency for schedule with codex engine", workflowData: &WorkflowData{ + On: "on:\n schedule:\n - cron: '0 0 * * *'", EngineConfig: &EngineConfig{ID: "codex"}, }, - expected: "", - description: "Codex should NOT have default concurrency (returns empty string)", + expected: `concurrency: + group: "gh-aw-codex-${{ github.workflow }}"`, + description: "Codex with schedule should get default concurrency", }, } diff --git a/pkg/workflow/copilot_engine.go b/pkg/workflow/copilot_engine.go index 94fb7c1330..a02ba0195d 100644 --- a/pkg/workflow/copilot_engine.go +++ b/pkg/workflow/copilot_engine.go @@ -27,7 +27,6 @@ func NewCopilotEngine() *CopilotEngine { supportsMaxTurns: false, // Copilot CLI does not support max-turns feature yet supportsWebFetch: false, // Copilot CLI does not have built-in web-fetch support supportsWebSearch: false, // Copilot CLI does not have built-in web-search support - hasDefaultConcurrency: true, // Copilot HAS default concurrency enabled }, } } diff --git a/pkg/workflow/custom_engine.go b/pkg/workflow/custom_engine.go index c81654c60a..d6d058c96f 100644 --- a/pkg/workflow/custom_engine.go +++ b/pkg/workflow/custom_engine.go @@ -23,7 +23,6 @@ func NewCustomEngine() *CustomEngine { supportsMaxTurns: true, // Custom engine supports max-turns for consistency supportsWebFetch: false, // Custom engine does not have built-in web-fetch support supportsWebSearch: false, // Custom engine does not have built-in web-search support - hasDefaultConcurrency: false, // Custom engine does NOT have default concurrency enabled }, } } diff --git a/pkg/workflow/engine_concurrency_integration_test.go b/pkg/workflow/engine_concurrency_integration_test.go index b258fd9986..3989518d00 100644 --- a/pkg/workflow/engine_concurrency_integration_test.go +++ b/pkg/workflow/engine_concurrency_integration_test.go @@ -16,7 +16,7 @@ func TestEngineConcurrencyIntegration(t *testing.T) { description string }{ { - name: "Copilot engine has default concurrency", + name: "Copilot with push does NOT have default concurrency", markdown: `--- on: push engine: @@ -26,16 +26,34 @@ tools: allowed: [list_issues] --- +# Test workflow +Test content`, + notExpectedInJob: `concurrency:`, + description: "Copilot with push trigger should NOT have default concurrency (special case)", + }, + { + name: "Copilot with workflow_dispatch HAS default concurrency", + markdown: `--- +on: workflow_dispatch +engine: + id: copilot +tools: + github: + allowed: [list_issues] +--- + # Test workflow Test content`, expectedInJob: `concurrency: - group: "gh-aw-copilot"`, - description: "Copilot should use default pattern gh-aw-{engine-id}", + group: "gh-aw-copilot-${{ github.workflow }}"`, + description: "Copilot with workflow_dispatch should have default concurrency", }, { - name: "Claude engine does NOT have default concurrency", + name: "Claude with issues does NOT have default concurrency", markdown: `--- -on: push +on: + issues: + types: [opened] engine: id: claude tools: @@ -46,7 +64,24 @@ tools: # Test workflow Test content`, notExpectedInJob: `concurrency:`, - description: "Claude should NOT have default concurrency in agent job", + description: "Claude with issues trigger should NOT have default concurrency (special case)", + }, + { + name: "Claude with workflow_dispatch HAS default concurrency", + markdown: `--- +on: workflow_dispatch +engine: + id: claude +tools: + github: + allowed: [list_issues] +--- + +# Test workflow +Test content`, + expectedInJob: `concurrency: + group: "gh-aw-claude-${{ github.workflow }}"`, + description: "Claude with workflow_dispatch should have default concurrency", }, { name: "Custom concurrency with string format",