You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[product-manager-impersonator] Golden tests for dogfood trigger rewriting #2187
Summary: Add a small golden-fixture regression test suite for scripts/dogfood.sh so trigger-rewrite behavior is validated before make compile changes land.
Why a Customer Would Want This
Maintainers and contributors rely on make compile during workflow development, and unexpected trigger rewrites create hard-to-debug CI churn. A deterministic regression suite would catch rewrite drift immediately, making workflow authoring safer and faster.
Rough Implementation Sketch
Add tests/test_dogfood_sync.py with fixture inputs (gh-agent-workflows/*/example.yml, optional dogfood-with.yml, lockfile hints) and expected trigger-*.yml snapshots.
Run scripts/dogfood.sh in a temp fixture workspace and assert exact output for core cases: existing/missing secrets:, run job with and without with:, and remediation-chain append behavior.
Wire into the existing pytest path (make test) so regressions fail fast during normal contributor workflows.
Why It Won't Be That Hard
The repository already uses pytest (Makefile) and has script-level tests under tests/, so this is incremental test coverage rather than new infrastructure. The scope is narrow (one script and a handful of fixtures) and should fit in a 1–2 day implementation.
Evidence
scripts/dogfood.sh performs multiple ordered text transforms and appends (sed/awk/heredoc) during trigger generation (scripts/dogfood.sh L55–L167).
make compile depends on sync → scripts/dogfood.sh, so rewrite regressions directly affect contributor workflows (Makefile L190–L208).
Current tests cover other scripts/utilities but there is no dogfood regression test file in tests/.
Activity