elastic / elastic/ai-github-actions

[autonomy-atomicity] Duplicated workflow registries in setup/dispatch scripts create a merge-conflict hotspot

Open
#777 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Autonomy / Atomicity Findings

### 1. Duplicated hard-coded workflow registries across setup and dispatch scripts
**Category:** Manual routing | Config hotspot
**File(s):**
- `scripts/trigger-ci-workflows.sh` (workflow/category registries and routing): lines 18-46, 88-94, 138-142
- `scripts/quick-setup.sh` (recommended workflow registries): lines 121-142, 148, 162-166

**Problem:**
Two separate scripts hard-code overlapping workflow inventories and categories. Adding or reclassifying workflows requires touching central arrays and switch logic in multiple places. In parallel development, unrelated PRs frequently target these same blocks, which increases merge conflicts and makes dropped/partial updates more likely.

This is not just centralization by design: the same concern (workflow set definition) is duplicated across multiple files with manual synchronization requirements.

**Suggested fix:**
Introduce a single source of truth for workflow metadata (for example, a manifest generated from `gh-agent-workflows/*` metadata or a dedicated machine-readable registry file), then have both scripts read from that source instead of maintaining separate arrays and category switches.

## Suggested Actions
- [ ] Define one canonical workflow metadata source (name, category, recommended set flags).
- [ ] Refactor `scripts/trigger-ci-workflows.sh` to load categories/workflows from that source.
- [ ] Refactor `scripts/quick-setup.sh` to build default/recommended sets from the same source.
- [ ] Add a validation check in CI to fail when script-visible workflow sets diverge from the canonical source.

> [!NOTE]
>
> 🔒 Integrity filtering filtered 1 item
>
> Integrity filtering activated and filtered the following item 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".)
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Autonomy Atomicity Analyzer](https://github.com/elastic/ai-github-actions/actions/runs/23448067852)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.