Skip to content

Fix reviewer not posting body-only reviews#352

Merged
jonathanpeppers merged 1 commit intomainfrom
jonathanpeppers/fix-reviewer-body-only-review
Apr 30, 2026
Merged

Fix reviewer not posting body-only reviews#352
jonathanpeppers merged 1 commit intomainfrom
jonathanpeppers/fix-reviewer-body-only-review

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

@jonathanpeppers jonathanpeppers commented Apr 30, 2026

Summary

Fixes the android-tools-reviewer workflow silently failing to post review comments when the PR is clean (LGTM, no inline comments).

Root Cause

The gh-aw safe_outputs framework requires at least one create_pull_request_review_comment call before submit_pull_request_review will work. When the reviewer agent gives a clean LGTM with zero inline comments, the review fails silently with:

##[warning]No review context set - cannot submit review
##[warning]✗ Failed to submit PR review: No review context available

Despite this, the workflow reports "success" because the warning isn't treated as a fatal error.

Example

Why dotnet/android works fine

The dotnet/android reviewer workflow uses identical safe-outputs configuration (v0.68.3, same handler config). However, dotnet/android PRs always generate at least one inline comment due to the larger/more complex codebase — so this bug never triggers there. Every successful dotnet/android reviewer run has create_pull_request_review_comment entries before submit_pull_request_review.

Fix

Update the workflow prompt and SKILL.md to require at least one inline review comment on every review, even for clean PRs (e.g., a brief 💡 observation on a key implementation line). This works around the gh-aw framework limitation.

The gh-aw safe_outputs framework requires at least one
create_pull_request_review_comment before submit_pull_request_review
will work. When the reviewer gives a clean LGTM with no inline
comments, the review silently fails with "No review context set."

Update the workflow prompt and SKILL.md to require at least one
inline comment on every review, even for clean PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 14:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the android-tools reviewer guidance to avoid gh-aw safe_outputs failing to submit body-only PR reviews by requiring at least one inline review comment per run.

Changes:

  • Add a workflow constraint requiring at least one inline review comment, even for clean PRs
  • Update the reviewer SKILL guidance to require at least one inline comment on key lines even when CI is green

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/android-tools-reviewer.md Adds a constraint to force at least one inline comment so review submission has required context
.github/skills/android-tools-reviewer/SKILL.md Updates reviewer instructions to ensure at least one inline comment is always created

Comment thread .github/workflows/android-tools-reviewer.md
Comment thread .github/skills/android-tools-reviewer/SKILL.md
Comment thread .github/workflows/android-tools-reviewer.md
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge. label Apr 30, 2026
@jonathanpeppers jonathanpeppers merged commit 1bcc797 into main Apr 30, 2026
5 of 6 checks passed
@jonathanpeppers jonathanpeppers deleted the jonathanpeppers/fix-reviewer-body-only-review branch April 30, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants