diff --git a/pr-review-toolkit/.claude-plugin/plugin.json b/pr-review-toolkit/.claude-plugin/plugin.json index 2e02d86..d060175 100644 --- a/pr-review-toolkit/.claude-plugin/plugin.json +++ b/pr-review-toolkit/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pr-review-toolkit", - "version": "2.5.0", + "version": "2.5.1", "description": "Comprehensive PR review board from a local PR head checkout", "author": { "name": "cblecker", diff --git a/pr-review-toolkit/docs/DESIGN_NOTES.md b/pr-review-toolkit/docs/DESIGN_NOTES.md index a67f7e3..33f3d7a 100644 --- a/pr-review-toolkit/docs/DESIGN_NOTES.md +++ b/pr-review-toolkit/docs/DESIGN_NOTES.md @@ -326,5 +326,5 @@ returns. **Threads are awaited before the fan-out.** 2.3 awaited the collector after the specialists so its latency hid behind theirs. The verifier runs in the fan-out and needs the user's threads, so the await moved ahead of it. The -collector is a low-effort Haiku call running alongside the Sonnet selector, +collector is a high-effort Haiku call running alongside the Sonnet selector, which is awaited there anyway, so the added wait is small. diff --git a/pr-review-toolkit/skills/review-pr/review-pr.js b/pr-review-toolkit/skills/review-pr/review-pr.js index 4a0eb95..6291dcd 100644 --- a/pr-review-toolkit/skills/review-pr/review-pr.js +++ b/pr-review-toolkit/skills/review-pr/review-pr.js @@ -1046,7 +1046,7 @@ log('Collecting review threads and selecting lenses for ' + pr.owner + '/' + pr. const threadCollectionPrompt = `Use GitHub read tools only. Fetch all review comment threads via pull_request_read method get_review_comments for ${pr.owner}/${pr.repo} PR #${pr.number}. Paginate if needed. Return compact thread records only: id (thread node id when available), commentId (the numeric comment ID from discussion_r anchors, as a number), path, line, originalLine (the first comment's original_line, which outdated comments keep when line is absent), author login of the first comment, body of the first comment, and replies with author/body. Include isResolved and isOutdated only when the tool response actually exposes thread resolution and outdated state; omit them when the response does not say — never guess or default them. Set collectionFailed to true when you could not retrieve the thread data (tool failure, unavailable or truncated result, result saved to a local file); set it to false when the read succeeded — including when the PR simply has no review threads. -${followUpLogin ? 'Also fetch the submitted reviews via pull_request_read method get_reviews for the same PR, paginating if needed, and return under reviews only those by ' + followUpLogin + ', as compact records: author, state, commitId, submittedAt, body. Copy state and submittedAt exactly as GitHub returns them (uppercase state, ISO-8601 timestamp), and always include body, as an empty string when the review has no text. If you could not retrieve the complete review list (tool failure, unavailable or truncated result, result saved to a local file), set reviewsCollectionFailed to true and leave collectionFailed as the threads read decides.' : ''} +${followUpLogin ? 'Also fetch the submitted reviews via pull_request_read method get_reviews for the same PR, paginating if needed, and return under reviews only those whose user.login is exactly ' + followUpLogin + ', as compact records: author (copied verbatim from user.login), state, commitId, submittedAt, body. Return one record per GitHub review; never split a review\'s body across records. Before returning, re-check every record against the get_reviews result and drop any review whose user.login is not exactly ' + followUpLogin + ' — other accounts, including bots such as coderabbitai[bot], never match. When no review matches, reviews is an empty array; that is the normal result when ' + followUpLogin + ' has not reviewed this PR. Copy state and submittedAt exactly as GitHub returns them (uppercase state, ISO-8601 timestamp), and always include body, as an empty string when the review has no text. If you could not retrieve the complete review list (tool failure, unavailable or truncated result, result saved to a local file), set reviewsCollectionFailed to true and leave collectionFailed as the threads read decides.' : ''} Do not call any GitHub write tools.` // The rejection handler attaches at creation: the promise is not awaited @@ -1059,7 +1059,7 @@ const threadCollectionPromise = agent(threadCollectionPrompt, { phase: 'Collect', agentType: GITHUB_COLLECTOR_AGENT_TYPE, model: 'haiku', - effort: 'low' + effort: 'high' }).catch(error => { log('Review-thread collection errored: ' + (error && error.message ? error.message : String(error))) return { threads: [], collectionFailed: true } @@ -1159,7 +1159,7 @@ if (shape) { // Threads are awaited before the fan-out (not after, as in 2.3) because the // follow-up verifier, which runs in the fan-out, needs the reviewer's own -// threads. The collector is a low-effort Haiku call that ran alongside the +// threads. The collector is a high-effort Haiku call that ran alongside the // Sonnet selector, so the added wait is small. log('Awaiting review threads') const threadData = await threadCollectionPromise