Skip to content

[product-manager-impersonator] Golden tests for dogfood trigger rewriting #2187

Open

Description

@github-actions

Feature Idea

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.
  • Add at least one fixture for the known run-job rewrite edge case tracked in [product-manager-impersonator] Dogfood trigger rewrite should not assume run job #2092.
  • 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


What is this? | From workflow: Trigger Product Manager Impersonator

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions