elastic / elastic/ai-github-actions

[autonomy-atomicity] dogfood workflow classification arrays in scripts/dogfood.sh are a merge-conflict hotspot

Open
#683 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. Central dogfood classification lists force unrelated workflow changes into one file
**Category:** Manual routing/registration; Shared configuration hotspot
**File(s):**
- `scripts/dogfood.sh:20-42` (`EXCLUDED_WORKFLOWS`)
- `scripts/dogfood.sh:46-50` (`REMEDIATION_WORKFLOWS`)
- `scripts/dogfood.sh:61-67` (exclusion gate)
- `scripts/dogfood.sh:109-113` and `scripts/dogfood.sh:136-149` (remediation chain gate and append)

**Problem:**
Adding, renaming, or changing dogfood/remediation behavior for any workflow requires editing the same global arrays in `scripts/dogfood.sh`. Parallel changes for unrelated workflows converge on this file, creating repeated merge conflicts and a risk of silent omissions when conflicts are resolved.

This is a concurrent-development bottleneck because each workflow already has its own directory (`gh-agent-workflows/(name)/`), but the dogfood policy is centralized in one script-level registry.

**Suggested fix:**
Move dogfood classification to per-workflow metadata (for example `gh-agent-workflows/(name)/dogfood.yml`) with fields like:
- `dogfood.enabled: true|false`
- `dogfood.auto_remediation: true|false`

Then have `scripts/dogfood.sh` discover workflow directories and apply defaults when metadata is absent. Keep only minimal global exceptions in the script.

This makes workflow changes atomic to their own directories instead of requiring edits to a shared registry file.

## Suggested Actions
- [ ] Introduce per-workflow dogfood metadata under `gh-agent-workflows/(name)/`.
- [ ] Refactor `scripts/dogfood.sh` to derive exclusion/remediation behavior from discovered metadata.
- [ ] Add a validation step that reports workflows missing explicit metadata (or confirms defaults), to avoid silent drift.

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

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.