elastic / elastic/ai-github-actions

[autonomy-atomicity] Orphan trigger workflows bypass the dogfood source of truth

Open
#1,334 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

## Finding

Two `trigger-*.yml` workflows live directly under `.github/workflows/` without a matching `gh-agent-workflows//example.yml` source, even though `scripts/dogfood.sh` treats `gh-agent-workflows/*/example.yml` as the canonical source for generated triggers.

## Evidence

- `scripts/dogfood.sh:53-55` says it copies trigger `example.yml` files from `gh-agent-workflows/*/` into `.github/workflows/trigger-*`.
- `scripts/dogfood.sh:64-72` only removes/recreates triggers while processing known example directories; it does not validate or clean up `trigger-*.yml` files with no source directory.
- Repository check output:

```text
.github/workflows/trigger-pr-conflict-addresser.yml slug=pr-conflict-addresser no matching gh-agent-workflows dir; name: Trigger PR Conflict Addresser
.github/workflows/trigger-prompt-audit.yml slug=prompt-audit no matching gh-agent-workflows dir; name: Trigger Prompt Audit
```

- `.github/workflows/trigger-prompt-audit.yml:1-5` defines a scheduled/dispatch workflow directly, and `.github/workflows/trigger-pr-conflict-addresser.yml:1-3` does the same, with no generated-file header or discoverable source under `gh-agent-workflows/`.

## Problem

This splits trigger ownership between generated examples and direct `.github/workflows` edits. Agents following the documented flow (`edit gh-agent-workflows/*/example.yml`, run `make compile`) will not discover or update these workflows, while renames/removals can leave stale triggers behind. The orphan scheduled trigger also becomes a hidden routing/god-file hotspot because future prompt-audit or conflict-addresser changes must bypass the normal source-of-truth convention.

## Suggested fix

Move these triggers into matching `gh-agent-workflows/prompt-audit/example.yml` and `gh-agent-workflows/pr-conflict-addresser/example.yml` directories, or add an explicit manifest/allowlist plus a CI check that fails when `.github/workflows/trigger-*.yml` lacks a corresponding source or documented exemption. Prefer making `dogfood.sh` clean or report orphan generated triggers during `make compile`.

## Duplicate check

Distinct from the existing dogfood classification-array, trigger-ci stale-name, and docs/nav catalog findings: this concerns orphan trigger workflow files that bypass the dogfood source-of-truth and cleanup path rather than a known central list entry drifting.

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

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

Contributor guide

Open the contributing guide

Research direction

Start with scripts/dogfood.sh:53-72 and inspect .github/workflows/trigger-prompt-audit.yml and trigger-pr-conflict-addresser.yml alongside the gh-agent-workflows/*/example.yml convention. Run make compile and check how orphan triggers are handled. Done means both triggers have a discoverable source or an explicit exemption, and compile reports or removes stale orphan files.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, shell
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.