worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

pr-review: bot attempts self-approval on self-authored PRs; triage misclassifies regression as feature request

Open worktrunk-bot opened this issue 9 months ago • 2 comments

Problem

The review bot attempts gh pr review --approve on self-authored PRs despite correctly identifying them as self-authored in its analysis. GitHub rejects these with "Can not approve your own pull request", wasting a tool call and producing an error on every self-authored PR review.

Evidence (past 24 hours)

Both re-reviews of PR #1253 (runs 22656954918 and 22656677524) hit this:

Exit code 1
failed to create review: GraphQL: Review Can not approve your own pull request (addPullRequestReview)

In both sessions, the bot's analysis correctly noted the PR was self-authored, then still executed the approve command before falling back to a +1 reaction.

Root cause

The pr-review skill warns about self-approvals at L209-211 but the approve code block at L218-220 follows immediately without a conditional guard. The LLM reads the warning but still executes the code block it encounters next.

Also noted

Triage misclassification: Issue #1249 ("Files in .git/info/exclude are no longer hidden after wt switch if using jj") was classified as a feature request despite regression language ("no longer") in the title. The terse body ("It's like .gitignore, but private.") contributed to the misread, but the title signals a bug report. The issue-triage skill's classification criteria could better highlight regression language as a bug signal.

jq != escaping (recurrence of #1239): Run 22653882119 still generated != inline in a jq filter, which bash expanded to \!=. The bot recovered using the heredoc approach from the updated skill, but still wastes one tool call on the initial broken attempt.

worktrunk-bot avatar Mar 04 '26 06:03 worktrunk-bot

Partial progress note: Commit d98cfaf6 (#1255) addressed the triage misclassification part of this issue — the issue-triage skill now recognizes changed-behavior language ("no longer works", "used to work") as a strong bug signal.

The self-approval part (bot attempting gh pr review --approve on self-authored PRs) remains open.

worktrunk-bot avatar Mar 05 '26 06:03 worktrunk-bot

will close; reopen if anything resurfaces

max-sixty avatar Mar 06 '26 05:03 max-sixty