Summary
add_reviewer handler reports Successfully added copilot as reviewer to PR #N even when the GraphQL requestReviews(botIds:[…]) mutation accepts the request but produces no observable change on the PR (the resulting requested_reviewers / GraphQL reviewRequests collections remain empty).
The handler should either:
- Verify after the mutation that the bot actually appears in
reviewRequests and warn/fail if not, or
- Surface the GraphQL response and detect a no-op outcome, or
- Confirm at startup that the Copilot reviewer bot is enabled for the target repository and fail-fast with a clear error if not.
Currently the safe-output reports success and the manifest links the PR, but downstream tools (and humans) that re-check the PR see no reviewer added.
Reproduction
Tested in githubnext/gh-aw-test against the included test-copilot-add-reviewer.md workflow (samples mode, hidden --use-samples flag).
Observed safe_outputs job logs
Successfully added copilot as reviewer to PR #2236
📝 Manifest: logged add_reviewer → https://github.com/githubnext/gh-aw-test/pull/2236
Job succeeds; the run is marked successful.
Post-run PR state on PR #2236
$ gh api repos/githubnext/gh-aw-test/pulls/2236/requested_reviewers
{"users":[],"teams":[]}
$ gh api graphql -f query='query { repository(owner:"githubnext",name:"gh-aw-test") { pullRequest(number:2236) { reviewRequests(first:20) { nodes { requestedReviewer { __typename ... on User { login } ... on Bot { login } } } } } } }'
{"data":{"repository":{"pullRequest":{"reviewRequests":{"nodes":[]}}}}}
The bot is not in the requested reviewers list despite the success log.
Root cause hypothesis
In actions/setup/js/add_reviewer.cjs:
await githubClient.graphql(requestReviewsMutation, {
pullRequestId,
botIds: [await resolveCopilotBotNodeId()],
});
const response = await githubClient.rest.pulls.get({ … });
latestPullRequest = response?.data || latestPullRequest;
core.info(`Successfully added copilot as reviewer to PR #${prNumber}`);
The mutation result is awaited but not inspected. If the requestReviews mutation returns a successful response without actually attaching the bot (e.g. because the Copilot code-review bot isn't enabled for the repo, or the botIds: union: true semantics no-op for this resolved bot ID), there is no log line indicating that nothing happened.
Suggested fix
After the mutation, re-query reviewRequests on the PR and verify the bot ID appears. If it doesn't:
- emit
core.warning("requestReviews returned success but Copilot reviewer is not present on PR #N — is Copilot code review enabled for this repo?"),
- and consider returning
success: false from the handler so the safe-outputs manifest doesn't claim a successful add.
This would make this category of silent failure visible in CI without requiring callers to re-poll the PR themselves.
Impact
Blocks meaningful e2e verification of add-reviewer for the Copilot bot in githubnext/gh-aw-test (test test-copilot-add-reviewer polls reviewRequests for 240s and times out). Same handler path is used by the other engines (claude, codex) for their copilot-bot reviewer cases.
Related issues filed in this batch: #37526 (apply_samples JSON parse), #37527 (assign_milestone milestone_title rejected).
Summary
add_reviewerhandler reportsSuccessfully added copilot as reviewer to PR #Neven when the GraphQLrequestReviews(botIds:[…])mutation accepts the request but produces no observable change on the PR (the resultingrequested_reviewers/ GraphQLreviewRequestscollections remain empty).The handler should either:
reviewRequestsand warn/fail if not, orCurrently the safe-output reports success and the manifest links the PR, but downstream tools (and humans) that re-check the PR see no reviewer added.
Reproduction
Tested in
githubnext/gh-aw-testagainst the includedtest-copilot-add-reviewer.mdworkflow (samples mode, hidden--use-samplesflag).reviewers: ["copilot"][copilot]feat/use-samples-hidden-flag(e262eb3)actions/setup/js/add_reviewer.cjsaround line 239Observed safe_outputs job logs
Job succeeds; the run is marked successful.
Post-run PR state on PR #2236
The bot is not in the requested reviewers list despite the success log.
Root cause hypothesis
In
actions/setup/js/add_reviewer.cjs:The mutation result is awaited but not inspected. If the
requestReviewsmutation returns a successful response without actually attaching the bot (e.g. because the Copilot code-review bot isn't enabled for the repo, or thebotIds: union: truesemantics no-op for this resolved bot ID), there is no log line indicating that nothing happened.Suggested fix
After the mutation, re-query
reviewRequestson the PR and verify the bot ID appears. If it doesn't:core.warning("requestReviews returned success but Copilot reviewer is not present on PR #N — is Copilot code review enabled for this repo?"),success: falsefrom the handler so the safe-outputs manifest doesn't claim a successful add.This would make this category of silent failure visible in CI without requiring callers to re-poll the PR themselves.
Impact
Blocks meaningful e2e verification of
add-reviewerfor the Copilot bot ingithubnext/gh-aw-test(testtest-copilot-add-reviewerpollsreviewRequestsfor 240s and times out). Same handler path is used by the other engines (claude, codex) for their copilot-bot reviewer cases.Related issues filed in this batch: #37526 (apply_samples JSON parse), #37527 (assign_milestone milestone_title rejected).