Skip to content

Add workflow drift trigger #257

Closed

Description

@strawgate

Let's add an internal trigger to detect workflow drift -- where we've refactored all but one workflow to follow a pattern -- most typically because the refactor and the new workflow were open in side-by-side PRs.

Activity

  1. github-actions commented on Feb 21, 2026

    @github-actions
    Contributor

    tl;dr: I recommend adding a dedicated internal workflow drift detector (scheduled + manual) and a CI parity gate; current checks catch lock-file drift but miss trigger/example and source/lock parity drift.

    Recommendation

    Implement a new internal scheduled workflow (e.g., .github/workflows/gh-aw-workflow-drift.md) that validates workflow parity and opens a single tracked issue when drift is detected, then add a CI guard that fails PRs when parity checks fail.

    Findings
    • Trigger files are generated by scripts/dogfood.sh, with only two explicit exclusions (flaky-test-triage, issue-triage-pr) at scripts/dogfood.sh:20-23, and copy logic at scripts/dogfood.sh:29-45.
    • CI currently runs make compile and checks for a dirty tree (.github/workflows/ci.yml:37-46), but does not run make sync/dogfood.sh in that job.
    • make compile currently runs only the gh-aw compiler (Makefile:135-138) and does not include trigger sync.
    • The repo still has parity drift classes consistent with this issue’s motivation:
      • missing source for lock: .github/workflows/gh-aw-release-update.lock.yml exists while .github/workflows/gh-aw-release-update.md is missing.
      • orphan trigger: trigger-downstream-users.yml exists without a corresponding gh-agent-workflows/downstream-users/example.yml (internal-only case).
    • Related ongoing work: PR Fix workflow drift for release-update and downstream-users docs #247 addresses issue Workflow Drift for gh-aw-release-update and gh-aw-downstream-users #235 (release-update source/docs drift), but it does not create a generic drift detector workflow for future regressions.
    Verification

    I ran the existing repo sync path and parity checks locally:

    $ ./scripts/dogfood.sh
    ...
    ✓ gh-agent-workflows/pr-review-fork/example.yml → .github/workflows/trigger-pr-review-fork.yml
    ...
    ✓ Sync complete
    
    $ git --no-pager status --short
     M .github/workflows/trigger-issue-triage.yml
     M .github/workflows/trigger-mention-in-issue.yml
     M .github/workflows/trigger-mention-in-pr.yml
     M .github/workflows/trigger-update-pr-body.yml
    ?? .github/workflows/trigger-pr-review-fork.yml
    
    $ python parity-check
    missing_triggers: []
    orphan_triggers: ['downstream-users']
    missing_md: ['gh-aw-release-update']
    missing_lock: []
    

    These outputs confirm drift can exist outside the current make compile verification path.

    Detailed Action Plan
    1. Add internal workflow source .github/workflows/gh-aw-workflow-drift.md (modeled after .github/workflows/gh-aw-upgrade-check.md):
      • on.schedule weekdays + workflow_dispatch.
      • safe-outputs: create-issue (max 1, close older) + noop.
      • Prompt executes deterministic parity checks and reports only concrete mismatches.
    2. In the workflow prompt/check logic, enforce these invariants:
      • every .github/workflows/gh-aw-*.lock.yml has matching .github/workflows/gh-aw-*.md (with explicit allowlist if needed);
      • every gh-agent-workflows/*/example.yml (minus excluded/internal allowlist) has .github/workflows/trigger-(name).yml;
      • no trigger-(name).yml exists without matching gh-agent-workflows/(name)/example.yml unless explicitly internal.
    3. Add/clarify a canonical internal allowlist in one place (e.g., scripts/dogfood.sh + docs) for intentionally internal workflows like downstream-users and upgrade-check.
    4. Strengthen CI in .github/workflows/ci.yml:
      • run make sync before/with compile checks;
      • fail if parity script reports mismatches, so drift is caught in PRs rather than only by schedule.
    5. Update DEVELOPING.md and gh-agent-workflows/DEVELOPING.md to document the new drift detector and parity invariants.
    Related Items
    Type Link Relevance
    Issue #257 Current request to add workflow drift trigger
    Issue #235 Prior drift report (missing source + internal-only ambiguity)
    Issue #236 Prior trigger drift report
    PR #247 Active fix for #235, not a general drift detector
    File scripts/dogfood.sh:20-23 Current exclusion list driving trigger sync
    File scripts/dogfood.sh:29-45 Trigger generation mechanism
    File Makefile:135-138 make compile does not include sync
    File .github/workflows/ci.yml:37-46 CI compile check misses sync/parity checks

    What is this? | From workflow: Issue Triage Agent

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. for issue #257

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

Metadata

Metadata

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