Skip to content

Pin Smoke Copilot dispatch_workflow to the default branch - #49653

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-dispatch-workflow-degrade-gracefully
Closed

Pin Smoke Copilot dispatch_workflow to the default branch#49653
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-dispatch-workflow-degrade-gracefully

Conversation

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot safe-outputs were dispatching haiku-printer against the triggering ref when dispatch-workflow had no explicit ref. On workflow_dispatch runs from short-lived copilot/* branches, that made a successful run fail late if the branch was deleted before the final safe-output step.

  • Behavior change

    • Pin dispatch-workflow in the Smoke Copilot workflow family to the repository default branch via target-ref.
    • Applies to:
      • smoke-copilot
      • smoke-copilot-arm
      • smoke-copilot-aoai-apikey
      • smoke-copilot-aoai-entra
  • Effect

    • Final haiku-printer dispatches no longer inherit an ephemeral trigger branch.
    • Smoke runs can complete successfully even if the original copilot/* branch disappears mid-run.
  • Regression coverage

    • Add a focused test for same-repo dispatch precedence to ensure configured target-ref wins over GITHUB_REF.
  • Generated artifacts

    • Recompile the affected workflow .lock.yml files so the safe-output handler config includes the pinned ref.
safe-outputs:
  dispatch-workflow:
    target-ref: refs/heads/${{ github.event.repository.default_branch }}
    workflows:
      - haiku-printer
    max: 1

Copilot AI and others added 2 commits August 1, 2026 21:06
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Hey @copilot-swe-agent 👋 — thanks for working on fixing the dispatch_workflow safe-output failure in Smoke Copilot! This is still in WIP status, so here are a few things to address before it's ready:

  • Add tests — The lock files are auto-generated from the markdown workflow definitions (e.g., smoke-checkout-pr-dispatch.md). Make sure the underlying markdown changes have corresponding test coverage or fixtures for the graceful degradation behavior.
  • Write a summary — Replace the WIP checklist in the PR body with a clear description of what changed and why. Explain the fix: that dispatch-workflow now targets a stable ref instead of the ephemeral trigger branch, preventing failures when the branch is deleted mid-run.

The contribution aligns perfectly with issue #49583 and the focused scope is great. Once tests and description are in place, this should be ready for review!

If you'd like a hand wrapping this up, you can assign this prompt to your coding agent:

Complete the WIP fix for dispatch_workflow graceful degradation:
1. Ensure the underlying markdown workflow files (smoke-checkout-pr-dispatch.md, etc.) have tests or fixtures validating the graceful fallback behavior when the trigger branch is deleted.
2. Replace the PR checklist body with a clear summary: explain that dispatch-workflow now defaults to the repo's main branch instead of the ephemeral trigger ref, and describe the expected behavior when ref lookup fails.
3. Run repo validation to confirm lock files are correctly compiled and all checks pass.

Generated by ✅ Contribution Check · auto · 57.4 AIC · ⌖ 4.33 AIC · ⊞ 8.7K ·

Copilot AI changed the title [WIP] Fix dispatch_workflow to degrade gracefully instead of failing Pin Smoke Copilot dispatch_workflow to the default branch Aug 1, 2026
Copilot AI requested a review from pelikhan August 1, 2026 21:17
@pelikhan pelikhan closed this Aug 1, 2026
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] dispatch_workflow safe-output fails the whole Smoke Copilot run when the ephemeral trigger branch is gone

2 participants