You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the create_pull_request safe-output handler runs, the bundle produced by the agent step contains only a HEAD ref — there is no refs/heads/* entry. The fallback added in #31955 (which inspects git bundle list-heads and retries the fetch using the discovered branch ref) requires exactly onerefs/heads/* entry and aborts with expected exactly 1 refs/heads entry, found 0.
Net effect: every run that produces changes fails to create a PR, with no recovery path.
This reproduces unchanged from v0.74.4 through v0.76.0 (latest). Tried signed-commits: false and preserve-branch-name: true — both fail identically, so the bug is not in the signed-push code path nor in salt handling; the bundle itself never contains a refs/heads/* entry regardless.
Reproduction
gh-aw compiler: v0.76.0
AWF runtime: v0.25.55
Engine: copilot
Workflow trigger: workflow_dispatch (also reproduces on schedule)
git fetch <bundle> HEAD:refs/bundles/<dest>
# then update-ref refs/heads/<branch-with-salt> <SHA>
Suspected cause
PR #31955 added the bundle list-heads fallback, but its "exactly 1 refs/heads entry" assertion is strictly less recoverable than the previous failure mode for HEAD-only bundles. Before #31955 the fast path failed with a clear couldn't find remote ref message; after #31955 the fallback fires but fails for a different reason that masks the underlying problem — the bundle never had a branch ref in the first place.
The real fix likely belongs at bundle creation; the apply-side fallback is the symptom surface.
Summary
When the
create_pull_requestsafe-output handler runs, the bundle produced by the agent step contains only aHEADref — there is norefs/heads/*entry. The fallback added in #31955 (which inspectsgit bundle list-headsand retries the fetch using the discovered branch ref) requires exactly onerefs/heads/*entry and aborts withexpected exactly 1 refs/heads entry, found 0.Net effect: every run that produces changes fails to create a PR, with no recovery path.
This reproduces unchanged from v0.74.4 through v0.76.0 (latest). Tried
signed-commits: falseandpreserve-branch-name: true— both fail identically, so the bug is not in the signed-push code path nor in salt handling; the bundle itself never contains arefs/heads/*entry regardless.Reproduction
v0.76.0v0.25.55copilotworkflow_dispatch(also reproduces onschedule)actions/checkoutdefaultfetch-depth: 1);git fetch --unshallowsucceeds prior to bundle applysigned-commits: falseandpreserve-branch-name: truefail the same wayLog excerpt (v0.76.0)
Expected
Either:
Bundle construction writes a
refs/heads/<branch>entry alongsideHEADso the fast path (or the existing Handle bundle ref mismatch increate_pull_requestsafe output #31955 fallback) can succeed, orHandle bundle ref mismatch in
create_pull_requestsafe output #31955 fallback is extended to handle the zero-refs/heads/HEAD-only case — e.g. use theHEADSHA directly as the source object and assign it to the destination ref:Suspected cause
PR #31955 added the
bundle list-headsfallback, but its "exactly 1 refs/heads entry" assertion is strictly less recoverable than the previous failure mode for HEAD-only bundles. Before #31955 the fast path failed with a clearcouldn't find remote refmessage; after #31955 the fallback fires but fails for a different reason that masks the underlying problem — the bundle never had a branch ref in the first place.The real fix likely belongs at bundle creation; the apply-side fallback is the symptom surface.
Workflow config (minimal repro)
Tried (none of which fix it)
signed-commits: falsepreserve-branch-name: true