elastic / elastic/ai-github-actions
[autonomy-atomicity] Fixed quick-setup branch name creates cross-run branch contention risk
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Autonomy / Atomicity Findings
### 1. Fixed default branch in `quick-setup.sh` couples independent runs
**Category:** Config hotspot
**File(s):** `scripts/quick-setup.sh`, `README.md`
**Problem:**
`quick-setup.sh` hard-codes a shared default branch (`ai-gh-aw-setup`) for all runs. Concurrent developers/agents running setup against the same repo can collide on the same branch (`push` non-fast-forward) or accidentally accumulate unrelated commits/PR updates when the local branch already exists.
This creates an autonomy/atomicity blocker: independent setup changes are not isolated by default and must coordinate on shared branch state.
**Evidence:**
- `scripts/quick-setup.sh:11` sets `branch="ai-gh-aw-setup"`.
- `scripts/quick-setup.sh:24` documents the same default in CLI help.
- `scripts/quick-setup.sh:178-182` reuses existing local branch if present.
- `scripts/quick-setup.sh:269-270` always pushes and opens PR from that branch.
- `README.md:37-39` documents creation of the same fixed branch.
**Suggested fix:**
- Generate a unique default branch name (for example `ai-gh-aw-setup-(timestamp)-(rand)`).
- Before push, verify remote branch absence when default branch generation is used.
- Keep `--branch` for explicit deterministic naming.
- Optionally add `--reuse-branch` as an explicit opt-in for shared-branch behavior.
## Suggested Actions
- [ ] Make quick-setup default branch unique per run.
- [ ] Add a guard preventing accidental reuse of an existing remote branch by default.
- [ ] Preserve explicit `--branch` override for intentional fixed naming.
- [ ] Update README/help text to describe unique-by-default behavior and shared-branch opt-in.
> [!NOTE]
>
> 🔒 Integrity filtering filtered 69 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#unknown (`search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - [#704](https://github.com/elastic/ai-github-actions/issues/704) (`search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#804 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#803 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#801 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#800 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#799 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#797 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#796 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#795 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#786 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#785 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#784 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#783 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#781 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - issue:elastic/ai-github-actions#780 (`list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
> - ... and 53 more items
>
>
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Autonomy Atomicity Analyzer](https://github.com/elastic/ai-github-actions/actions/runs/23552272715)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.