Skip to content

ci(claude): post reviews via the action's native mechanism, not gh - #53

Merged
gonzafg2 merged 1 commit into
mainfrom
ci/claude-review-native-comments
Jun 11, 2026
Merged

gonzafg2 merged 1 commit into
mainfrom
ci/claude-review-native-comments

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Summary

Fixes a bug found on the first real run of the project-aware reviewer: it analysed the PRs but posted nothing.

What happened

When the updated reviewer ran on the ADR PRs (#46/#47/#49/#50) it completed successfully — no 401, model claude-sonnet-4-6 confirmed, ~$0.27 / 13 turns of real analysis — but the result was "permission_denials_count": 14 and "No buffered inline comments". It posted no review.

Root cause: the prompt told Claude to "post the review using gh". But claude-code-action restricts shell tools and posts inline comments through its own native buffer (post-buffered-inline-comments.ts), classifying them before posting. Claude's gh attempts were denied (the 14 denials), and because the prompt didn't route it through the native mechanism, nothing was buffered → nothing posted.

The fix

Change the prompt's output instructions: leave findings as inline review comments through the action's native mechanism (it buffers and posts them automatically) and stop invoking gh/git. The summary + inline structure is unchanged — only the posting path.

Type of change

  • Refactor / chore / CI / build

Validation plan

Like #52, this PR modifies the review workflow, so its own claude-review check will 401 (workflow-validation, benign — expected). The real test is the first PR opened after this merges: the reviewer should post a summary + inline comments (or a clean "nothing to flag" summary) with zero permission denials.

Checklist

  • Commits signed off under the DCO.
  • Conventional Commits.
  • Signed commit.
  • YAML validated.

The first real run of the project-aware reviewer (PR #50, Sonnet 4.6,
no 401) analysed the PR but posted nothing: 14 permission denials and
"No buffered inline comments". Root cause: the prompt told Claude to
post the review with gh, but claude-code-action restricts shell tools
and posts inline comments through its own native buffer
(post-buffered-inline-comments.ts) — gh attempts are denied.

Fix the prompt to leave inline review comments through the action's
native mechanism (which it buffers and posts automatically) and to stop
invoking gh/git. Keeps the summary + inline structure; only the posting
path changes.

Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2
gonzafg2 merged commit b36ed1a into main Jun 11, 2026
6 of 7 checks passed
@gonzafg2
gonzafg2 deleted the ci/claude-review-native-comments branch July 18, 2026 04:16
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.

1 participant