Skip to content

Fix agent eligibility check misidentifies bot-authored PRs as human-authored #565

Description

@mysticgohan1

Upstream: fullsend-ai/issues/5536

What happens

The fix agent's eligibility check treats bot-authored PRs as human-authored, then skips auto-execution because the fullsend-fix label is absent. The fix agent only runs if a human manually triggers /fs-fix.

Root cause

GitHub represents bot account logins differently depending on the API surface:

Source Format Matches \[bot\]$?
github.event.pull_request.user.login (webhook payload) fullsend-ai-coder[bot] Yes
gh pr view --json author --jq '.author.login' (GraphQL via CLI) app/fullsend-ai-coder No

The dispatch routing uses the event payload (PR_USER_LOGIN), so it correctly routes to the fix stage. But the fix eligibility check re-fetches the author via gh pr view --json author and tests it against \[bot\]$. The app/ prefix format does not match, so the check falls through to require fullsend-fix.

Evidence

PR fullsend-ai#5414 (authored by fullsend-ai-coder[bot]):

  • Dispatch run 29835733895 (Jul 21 13:43): routed to fix -- correct.
  • Fix run 29835747782 (Jul 21 13:43): failed at "Check fix eligibility" with: Human-authored PR #5414 without 'fullsend-fix' label — skipping bot-triggered fix.
  • Zero fix commits on the PR. The review bot's CHANGES_REQUESTED findings were never addressed.

PR fullsend-ai#5450 (authored by fullsend-ai-coder[bot]):

  • Review bot posted CHANGES_REQUESTED at 09:13 UTC on Jul 22. Fix agent did not auto-execute.
  • Both fix runs were human-triggered via /fs-fix (rh-hemartin at 10:13 and again on Jul 23 at 09:19).

Affected locations

  1. fullsend/.github/workflows/reusable-fix.yml lines 314-315 — the fix eligibility check uses gh pr view --json author --jq '.author.login' and tests \[bot\]$.
  2. fullsend/.github/workflows/reusable-dispatch.yml lines 1050-1051 — same logic duplicated in per-repo mode.
  3. .fullsend/.github/workflows/dispatch.yml — org-level dispatch has the same eligibility check pattern.

The dispatch routing itself (lines 234, 297-300 in the respective files) is not affected because it reads PR_USER_LOGIN from the event payload, which uses the [bot] suffix.

Fix

The PR_AUTHOR bot detection should also match the app/ prefix format returned by the GraphQL API. For example:

if [[ ! "${PR_AUTHOR}" =~ \[bot\]$ ]] && [[ ! "${PR_AUTHOR}" =~ ^app/ ]]; then

Or switch to the REST API (gh api repos/{owner}/{repo}/pulls/{number} --jq '.user.login'), which returns the [bot] suffix matching the event payload format.

Related

Activity

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

    component/dispatchWorkflow dispatch and triggerspriority/highSignificant impact, address soonready-to-codeTriaged and ready for the code agenttype/bugConfirmed defect in existing behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions