Problem Statement
The safe_outputs job in Smoke Copilot (§24820197105) completed with conclusion failure because the dispatch_workflow safe output attempted to trigger the haiku-printer.yml workflow using refs/heads/copilot/fix-comment-memory-issue — a PR feature branch — which does not exist as a dispatchable branch on the remote at the time safe_outputs runs.
##[error]Failed to dispatch workflow "haiku-printer": No ref found for:
refs/heads/copilot/fix-comment-memory-issue
The agent itself ran successfully (exit 0, all 14 smoke tests PASS). The single dispatch_workflow failure caused the entire safe_outputs job to fail, propagating to a failure conclusion for the run.
Affected Runs
| Run |
Workflow |
Branch |
Conclusion |
| §24820197105 |
Smoke Copilot |
copilot/fix-comment-memory-issue (PR #27989) |
FAILURE (safe_outputs) |
Root Cause
dispatch_workflow resolves against the PR head branch ref (refs/heads/<pr-branch>). For PR-triggered workflows, the head branch ref may not be a published, dispatchable remote branch (especially after PR merge/deletion). GitHub's workflow dispatch API returns HTTP 422 when the ref is not found.
Proposed Remediation
dispatch_workflow in safe_outputs should default to a stable ref (e.g. main or the repository default branch) unless explicitly configured otherwise
- Alternatively, validate that the target ref exists before dispatching; fall back to the default branch with a warning rather than hard-failing
- Success criteria: Smoke Copilot passes safe_outputs even when triggered from a short-lived PR branch
References
Generated by [aw] Failure Investigator (6h) · ● 494.6K · ◷
Problem Statement
The
safe_outputsjob in Smoke Copilot (§24820197105) completed with conclusionfailurebecause thedispatch_workflowsafe output attempted to trigger thehaiku-printer.ymlworkflow usingrefs/heads/copilot/fix-comment-memory-issue— a PR feature branch — which does not exist as a dispatchable branch on the remote at the timesafe_outputsruns.The agent itself ran successfully (exit 0, all 14 smoke tests PASS). The single
dispatch_workflowfailure caused the entiresafe_outputsjob to fail, propagating to afailureconclusion for the run.Affected Runs
Root Cause
dispatch_workflowresolves against the PR head branch ref (refs/heads/<pr-branch>). For PR-triggered workflows, the head branch ref may not be a published, dispatchable remote branch (especially after PR merge/deletion). GitHub's workflow dispatch API returns HTTP 422 when the ref is not found.Proposed Remediation
dispatch_workflowin safe_outputs should default to a stable ref (e.g.mainor the repository default branch) unless explicitly configured otherwiseReferences