Skip to content

Fix Evergreen safe_outputs patch application by pre-checking out target PR branch - #94

Merged
mrjf merged 2 commits into
mainfrom
copilot/fix-github-actions-workflow
Apr 12, 2026
Merged

Fix Evergreen safe_outputs patch application by pre-checking out target PR branch#94
mrjf merged 2 commits into
mainfrom
copilot/fix-github-actions-workflow

Conversation

Copilot AI commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

The safe_outputs job in Evergreen was failing when push_to_pull_request_branch attempted to apply an empty patch (git am), caused by generating patch content from the wrong baseline. This updates Evergreen so agent work starts on the selected PR branch directly.

  • Root cause alignment in workflow pre-flight

    • Updated the PR selection Python step in .github/workflows/evergreen.md to switch to the selected head_branch before agent execution.
    • Uses a local tracking branch to ensure push tooling operates on the correct branch state.
  • Agent prompt contract update

    • Revised instructions to reflect that branch checkout is already handled in pre-flight, reducing ambiguity and duplicate checkout behavior in the agent phase.
  • Compiled workflow update

    • Regenerated .github/workflows/evergreen.lock.yml from the updated source workflow definition.
branch = selected["head_branch"]
subprocess.check_call(["git", "checkout", "-B", branch, f"origin/{branch}"])
subprocess.check_call(["git", "branch", "--set-upstream-to", f"origin/{branch}", branch])

Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow safe_outputs Fix Evergreen safe_outputs patch application by pre-checking out target PR branch Apr 10, 2026
Copilot finished work on behalf of mrjf April 10, 2026 17:36
Copilot AI requested a review from mrjf April 10, 2026 17:36
@mrjf
mrjf marked this pull request as ready for review April 10, 2026 18:05
@mrjf
mrjf merged commit dfd9e65 into main Apr 12, 2026
17 checks passed
@mrjf
mrjf deleted the copilot/fix-github-actions-workflow branch April 12, 2026 11:35
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.

2 participants