Skip to content

Stop push-context dispatch storms in Approach Validator and Daily Syntax Error Quality Check - #48825

Merged
pelikhan merged 5 commits into
mainfrom
copilot/aw-fix-stop-workflow-storm
Jul 29, 2026
Merged

Stop push-context dispatch storms in Approach Validator and Daily Syntax Error Quality Check#48825
pelikhan merged 5 commits into
mainfrom
copilot/aw-fix-stop-workflow-storm

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

A burst of unintended invocations exhausted daily AI-credit budgets for approach-validator and daily-syntax-error-quality, causing repeated guardrail preflight failures. This change adds execution gating and stronger dedup semantics so push-context dispatches do not fan out into repeated runs.

  • Root-cause containment (event-context guard)

    • Added explicit if guards in both workflow sources to reject dispatch payloads where aw_context.event_type == 'push'.
    • Preserves intended execution paths (schedule for daily syntax checks; issue/PR/comment-driven activation for approach validation).
  • Storm dampening (concurrency dedup)

    • Added/updated concurrency with cancel-in-progress: true for both workflows.
    • Uses stable grouping keys per workflow context to collapse overlapping/redundant invocations instead of allowing bursts to queue independently.
  • Compiled workflow alignment

    • Regenerated corresponding .lock.yml files so runtime behavior matches source workflow changes.
# daily-syntax-error-quality.md
if: >
  github.event_name == 'schedule' ||
  fromJSON(github.event.inputs.aw_context || '{}').event_type != 'push'
concurrency:
  group: "daily-syntax-error-quality-${{ github.ref }}"
  cancel-in-progress: true

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18.4 AIC · ⌖ 8.65 AIC · ⊞ 7.6K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix workflow_dispatch storm affecting Quality Check and Validator Stop push-context dispatch storms in Approach Validator and Daily Syntax Error Quality Check Jul 29, 2026
Copilot AI requested a review from pelikhan July 29, 2026 08:53
@pelikhan
pelikhan marked this pull request as ready for review July 29, 2026 08:55
Copilot AI review requested due to automatic review settings July 29, 2026 08:55
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot investigate why this AW are triggered on "push" events. The only have label / slash commands should not not trigger on pushes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Attempts to prevent push-triggered workflow storms and reduce duplicate executions.

Changes:

  • Adds push-context execution guards.
  • Adds cancel-in-progress concurrency groups.
  • Regenerates compiled workflows.
Show a summary per file
File Description
.github/workflows/daily-syntax-error-quality.md Adds execution gating and concurrency.
.github/workflows/daily-syntax-error-quality.lock.yml Compiles the source changes.
.github/workflows/approach-validator.md Adds execution gating and per-item concurrency.
.github/workflows/approach-validator.lock.yml Compiles the source changes.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Medium

Comment thread .github/workflows/daily-syntax-error-quality.md
Comment thread .github/workflows/approach-validator.md Outdated
Comment on lines +15 to +17
if: >
needs.pre_activation.outputs.activated == 'true' &&
fromJSON(github.event.inputs.aw_context || '{}').event_type != 'push'
Comment on lines +12 to +14
concurrency:
group: "daily-syntax-error-quality-${{ github.ref }}"
cancel-in-progress: true
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot investigate why this AW are triggered on "push" events. The only have label / slash commands should not not trigger on pushes.

Root cause: When copilot agent branches push commits that modify files in .github/workflows/ (e.g., after make recompile regenerates lock files), GitHub evaluates all workflow files in that directory for the push event. For workflow_dispatch-only workflows like these two, GitHub creates phantom push-event run records (0 jobs, failure conclusion) — not actual executions that consume AI credits, but still noisy and potentially risky.

Bug in the previous fix: The condition fromJSON(github.event.inputs.aw_context || '{}').event_type != 'push' is always true for direct push events because github.event.inputs is empty → fromJSON('{}').event_type = null → null != 'push' = true — the guard passes and the workflow proceeds. Additionally, placing needs.pre_activation in a top-level if caused the compiler to omit the push guard from the pre_activation job, leaving it ungated.

Fix applied (commit $(git log --oneline -1 HEAD | cut -d' ' -f1)):

  • approach-validator.md: changed to if: github.event_name != 'push' — the compiler now correctly propagates this guard to both pre_activation and activation jobs
  • daily-syntax-error-quality.md: changed to github.event_name != 'push' && fromJSON(github.event.inputs.aw_context || '{}').event_type != 'push' to block both direct push events and dispatched push context

The github.event_name check is the reliable gate — it's always populated regardless of whether inputs are present.

@pelikhan
pelikhan merged commit a89e1de into main Jul 29, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/aw-fix-stop-workflow-storm branch July 29, 2026 09:41
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.5

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] [aw-fix] P0: Find and stop the workflow_dispatch storm hitting Approach Validator + Daily Syntax Error Quality Check

3 participants