Skip to content

changeset automatic branch resolution fails #2804

Description

@pelikhan

Activity

  1. github-actions commented on Oct 30, 2025

    @github-actions
    Contributor

    Agentic Q triggered by this issue.

  2. github-actions commented on Oct 30, 2025

    @github-actions
    Contributor

    Investigation Complete ✅

    I've investigated the push_to_pull_request_branch failure and found the root cause.

    TL;DR

    The job wasn't "failing" - it was being skipped because the Copilot agent didn't call the push_to_pull_request_branch tool from the safe-outputs MCP server.

    What Happened

    Looking at workflow run #18946037214:

    1. ✅ Agent job completed successfully
    2. ✅ Detection job passed
    3. ❌ push_to_pull_request_branch job SKIPPED

    The job condition requires:

    if: contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')

    Since the agent never called the tool, the output type was missing, causing the job to skip.

    Root Cause

    The workflow instructions were too vague:

    "Use the push-to-pull-request-branch tool from safe-outputs to push changes"

    The agent didn't understand:

    • When to call it (after committing?)
    • How to call it (what parameters?)
    • What happens if it doesn't call it (changes won't push)

    The Fix

    I've created a PR with much more explicit instructions:

    5. **Commit and Push Changes**:
       - Add and commit the changeset file with: `git add .changeset/<filename> && git commit -m "Add changeset"`
       - **CRITICAL**: You MUST call the `push_to_pull_request_branch` tool:
         ```javascript
         push_to_pull_request_branch({
           message: "Add changeset for this pull request"
         })
         ```
       - The `branch` parameter is optional - auto-detects the PR branch
       - This tool call is REQUIRED for changes to be pushed

    Verification

    The automatic branch resolution logic in the safe-outputs MCP server is working correctly. This is purely a workflow instruction clarity issue - no code changes needed, just better prompting.

    📋 See my full investigation analysis in /tmp/gh-aw/cache-memory/changeset-analysis.md

    AI generated by Q for #2804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions