Skip to content

Fix Code Radiator: prevent upstream unsetting that breaks safeoutputs PR creation - #25563

Merged
rolfbjarne merged 3 commits into
mainfrom
copilot/aw-code-radiator-failure-fix
May 28, 2026
Merged

rolfbjarne merged 3 commits into
mainfrom
copilot/aw-code-radiator-failure-fix

Conversation

Copilot AI commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

The Code Radiator workflow consistently failed with "No changes to commit - no commits found" from safeoutputs create_pull_request despite the agent having verified commits via git log origin/base..HEAD.

Root Cause

The safeoutputs create_pull_request tool detects pushable commits using @{upstream}..HEAD. The agent was unsetting the upstream tracking branch after creating the merge branch (to avoid accidentally pushing to the target branch via plain git push), which caused the tool to find no commits. The manual git push origin "<local-branch>" instruction was also broken β€” the agent job only has contents: read permission.

Changes (code-radiator.md)

  • Remove manual git push instruction β€” the agent cannot push (read-only token); safeoutputs handles all pushing
  • Explicit do NOT unset upstream warning β€” explains that @{upstream} is how the tool detects commits; unsetting it silently breaks PR creation
  • Require base parameter when calling safeoutputs create_pull_request as a backup reference for commit detection
  • Update Important Notes β€” replace ambiguous "use gh CLI for PR operations" with clear guidance to use safeoutputs for push/create and gh/MCP tools only for non-push operations

Copilot AI linked an issue May 28, 2026 that may be closed by this pull request
…tream unsetting

The previous run failed because the agent unset the upstream tracking branch
"as recommended", which caused safeoutputs create_pull_request to report
"No changes to commit - no commits found" even though commits existed.

Root cause: safeoutputs uses @{upstream}..HEAD to detect commits to push.
When the upstream is unset, this comparison fails and the tool finds no commits.

Fix:
- Remove the manual `git push` instruction (agent job has contents:read only)
- Add explicit note to NOT unset upstream tracking branch
- Add note to always provide base branch when calling create_pull_request
- Update Important Notes to clarify correct safeoutputs usage pattern

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Code Radiator workflow failure Fix Code Radiator: prevent upstream unsetting that breaks safeoutputs PR creation May 28, 2026
Copilot AI requested a review from rolfbjarne May 28, 2026 09:51
@rolfbjarne
rolfbjarne marked this pull request as ready for review May 28, 2026 10:57
Copilot AI review requested due to automatic review settings May 28, 2026 10:57
@rolfbjarne
rolfbjarne enabled auto-merge (squash) May 28, 2026 10:58

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

This PR updates the Code Radiator agentic workflow instructions to route branch pushing and PR creation through safeoutputs, preserving upstream tracking so create_pull_request can detect commits correctly.

Changes:

  • Replaces manual git push guidance with safeoutputs create_pull_request instructions.
  • Adds explicit guidance to keep upstream tracking and always provide base.
  • Regenerates the compiled workflow lock file and updates the gh-aw setup action lock.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/code-radiator.md Updates the workflow prompt for safeoutputs-based PR creation and upstream handling.
.github/workflows/code-radiator.lock.yml Regenerated compiled workflow reflecting the prompt and gh-aw version updates.
.github/aw/actions-lock.json Updates the pinned github/gh-aw-actions/setup version and SHA.

- Base: the target branch
- Head: the local branch
- Enable automerge (merge strategy) on the new PR.
After creating the PR, enable automerge (merge strategy) using the GitHub MCP `enable_auto_merge` tool or `gh pr merge --auto --merge`.
@rolfbjarne
rolfbjarne merged commit a584d6e into main May 28, 2026
10 checks passed
@rolfbjarne
rolfbjarne deleted the copilot/aw-code-radiator-failure-fix branch May 28, 2026 16:01
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] Code Radiator failed

4 participants