Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,13 @@ when identical across forges). When reviewing PRs, do not flag a
static literal default in these blocks as hardcoded, but do flag a
regression that replaces one of these computed passthrough values
with a literal.

## 9. Reply directly to GitHub review threads

When responding to an existing inline pull request review thread, always use
`POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies`
with the top-level review comment ID. Do not use a review creation/submission
operation or the GraphQL `addPullRequestReviewThreadReply` mutation for thread
Comment on lines +173 to +176

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Review bots cannot reply to threads 🐞 Bug ≡ Correctness

The new instruction requires agents to perform a writable GitHub REST mutation, but the review agent
only has read-only REST and GraphQL permissions. Whenever the review agent handles a fixed existing
thread, it cannot use the mandated endpoint from its sandbox, and the post-review path still
publishes through the generic review operation instead.
Agent Prompt
Issue description
The new repository instruction mandates direct REST replies to existing GitHub review threads, but the review agent runs with read-only forge permissions and the post-review workflow publishes through the generic review operation. As a result, the required behavior cannot be performed by the agent that is expected to follow this instruction.

Fix Focus Areas
- AGENTS.md[173-179]
- agents/review.md[235-242]
- scripts/post-review.sh[123-129]

Recommended Fix
Implement the direct-reply and separate-thread-resolution behavior in the trusted post-review workflow, passing the top-level comment ID and reply body from validated agent output, or explicitly scope this instruction to an agent with a writable GitHub API path. Ensure unfixed threads remain open and avoid creating or submitting pending reviews for replies.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

Comment on lines +173 to +176

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Thread replies skew review audits 🔗 Cross-repo conflict ≡ Correctness

The new guidance makes agents reply through the direct REST endpoint, which GitHub may record as a
COMMENTED review, while autonomy-analysis classifies every review authored by
fullsend-ai-review[bot] as a verdict. Those reply records can be paired with the latest finding
and counted by the verdict-mismatch audit, distorting review measurements for PRs using this
workflow.
Agent Prompt
## Issue description
Direct GitHub thread replies may create `COMMENTED` review records, but autonomy-analysis currently classifies every review from `fullsend-ai-review[bot]` as a review verdict. This can make a reply appear to be an additional verdict and can produce incorrect verdict-mismatch audit results.

## Fix Focus Areas
- skills/gather-review-observations/scripts/fetch-pr-activity.sh[48-54]
- skills/audit-pr-review-gap/scripts/check-verdict-mismatch.py[81-122]

## Recommended Fix
Update autonomy-analysis to identify and exclude review records created as a consequence of direct inline-thread replies, or otherwise distinguish actual post-review verdicts from `COMMENTED` reply records before classifying them as `review_agent_verdict`. Add a fixture covering a bot-authored direct thread reply that produces a `COMMENTED` review and verify it does not create an extra verdict or mismatch pair.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

replies. Verify a finding is fixed before replying, and resolve its thread
separately. Leave unfixed threads open. GitHub may associate a direct reply
with a `COMMENTED` review record; do not start or submit a pending review.
Loading