elastic / elastic/ai-github-actions

[product-manager-impersonator] Add workflow artifact parity lint

Open
#730 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

## Feature Idea

**Summary:** Add a lightweight CI lint that verifies each public workflow keeps its source, consumer example, and README artifacts in sync.

## Why a Customer Would Want This
Maintainers and contributors rely on predictable workflow packaging (`.md` source + `example.yml` + README + generated trigger). When one artifact is missing, onboarding and maintenance become confusing and drift is only caught after the fact.

## Rough Implementation Sketch
- Add `scripts/check-workflow-artifact-parity.py` that scans workflow slugs and enforces required artifact sets for public workflows.
- Validate mapping parity across:
- `.github/workflows/gh-aw-(slug).md`
- `gh-agent-workflows/(slug)/example.yml`
- `gh-agent-workflows/(slug)/README.md`
- `.github/workflows/trigger-(slug).yml` (for non-excluded dogfood workflows)
- Wire the script into `make lint` in `Makefile` and add a CI job in `.github/workflows/ci.yml`.
- Document the parity check in `gh-agent-workflows/DEVELOPING.md` under “Adding a new workflow”.

## Why It Won't Be That Hard
This is an additive guardrail with existing patterns to copy: the repo already runs consistency scripts (for nav/catalog) in CI, and workflow artifact conventions are explicitly documented. The feature is a read-only scanner plus CI wiring, with no runtime behavior changes.

## Evidence
- Workflow packaging convention is explicit in docs: `gh-agent-workflows/DEVELOPING.md:156-162` and `gh-agent-workflows/DEVELOPING.md:204-208`.
- Trigger generation relies on directory conventions and exclusions: `scripts/dogfood.sh:55-69` and `scripts/dogfood.sh:20-36`.
- Existing lint surface already includes a custom consistency check, showing this pattern fits: `Makefile:243-245` and `.github/workflows/ci.yml:27-33`.
- Recent drift example where artifacts diverged: issue `#727` (`pr-conflict-addresser` missing consumer artifacts).

Duplicate check performed against open/recent feature requests and prior PM findings (`#720`, `#709`, `#679`, `#671`, `#663`, `#650`, `#619`, `#577`, `#570`, `#562`, `#554`, `#523`, `#449`, `#409`, `#403`, `#382`, plus `/tmp/previous-findings.json`); no close duplicate found for repository-wide artifact parity lint.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/23239831138)

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.