elastic / elastic/ai-github-actions
[product-manager-impersonator] Concurrency Guardrails for Trigger Templates
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add standardized `concurrency` blocks to core trigger examples so only the latest relevant run executes per PR/issue, reducing duplicate or competing agent runs.
## Why a Customer Would Want This
Teams using these workflows on busy PRs/issues can get repeated comments/issues when events fire rapidly (`synchronize`, repeated `/ai` comments, workflow retries). Concurrency guardrails reduce noise, save token spend, and make automation behavior more predictable.
## Rough Implementation Sketch
- Add `concurrency.group` + `cancel-in-progress` to these templates:
- `gh-agent-workflows/pr-review/example.yml`
- `gh-agent-workflows/issue-triage/example.yml`
- `gh-agent-workflows/mention-in-issue/example.yml`
- `gh-agent-workflows/mention-in-pr/example.yml`
- `gh-agent-workflows/pr-actions-detective/example.yml`
- Reuse the existing pattern already present in `gh-agent-workflows/pr-review-addresser/example.yml`.
- Document recommended group-key patterns in `gh-agent-workflows/README.md`.
- Validate with existing checks (`make lint`).
## Why It Won't Be That Hard
This is a small, targeted YAML/docs change in existing example triggers. No compiler/runtime architecture changes are required, and there is already a proven in-repo concurrency pattern to copy.
## Evidence
- No concurrency currently in high-traffic trigger examples:
- `gh-agent-workflows/pr-review/example.yml:1-20`
- `gh-agent-workflows/issue-triage/example.yml:1-18`
- `gh-agent-workflows/mention-in-issue/example.yml:1-21`
- `gh-agent-workflows/mention-in-pr/example.yml:1-23`
- `gh-agent-workflows/pr-actions-detective/example.yml:1-21`
- Existing pattern to reuse:
- `gh-agent-workflows/pr-review-addresser/example.yml:12-14`
- These are widely installed defaults, increasing impact:
- `scripts/quick-setup.sh:121-127`
- `scripts/quick-setup.sh:194-203`
Distinct from existing PM-impersonator ideas already tracked (#817 workflow chooser, #809 quick-setup preflight, #796 example lint gate, #730 artifact parity lint, #709 health watchdog, #757 upgrade assistant).
> [!NOTE]
>
> 🔒 Integrity filtering filtered 23 items
>
> Integrity filtering activated and filtered the following items during workflow execution.
> This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.
>
> - issue:elastic/ai-github-actions#828 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#826 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#824 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#823 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#821 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#819 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#818 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#817 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#816 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#815 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#813 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#812 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#811 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#810 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#809 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#808 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - ... and 7 more items
>
>
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/23740117871)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.