Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
ci: don't let unrelated label additions cancel in-flight evals
The labeled event fires for every label; with workflow-level concurrency any label added mid-run cancelled and restarted the eval. Gate labeled events on the run-docs-tests* labels and move concurrency to job level (a skipped job never enters the group). Cursor Bugbot finding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Soumya Medapati committed
Aug 17, 2026 at 14:21 UTC
cd1a59edcf63c5809575c3bd425e838a30397f3d
1 file changed
+12
-5
.github/workflows/docs-agent-eval.yml
+12
-5
@@ -18,13 +18,20 @@ on:
18
pull_request:
19
types: [labeled, synchronize, reopened]
20
21
-concurrency:
22
- group: docs-agent-eval-pr-${{ github.event.pull_request.number }}
23
- cancel-in-progress: true # newest commit wins; stale evals are superseded
24
-
21
jobs:
22
eval:
27
- if: contains(github.event.pull_request.labels.*.name, 'run-docs-tests')
23
+ # Run when the PR carries the label — but for `labeled` events, only when
24
+ # the label just added is one of ours (any other label addition would
25
+ # otherwise cancel-and-restart an in-flight eval; Cursor Bugbot finding).
26
+ if: |
27
+ contains(github.event.pull_request.labels.*.name, 'run-docs-tests') &&
28
+ (github.event.action != 'labeled' || startsWith(github.event.label.name, 'run-docs-tests'))
29
+ # Job-level on purpose: a skipped job never enters the concurrency group,
30
+ # so unrelated triggers cannot cancel a running eval. New commits still
31
+ # supersede stale runs.
32
+ concurrency:
33
+ group: docs-agent-eval-pr-${{ github.event.pull_request.number }}
34
+ cancel-in-progress: true
35
permissions:
36
contents: read
37
pull-requests: write # the result comment