fix(#163): fold comments into hunt Step 2 pr-list call#164
Merged
Conversation
Hunt Step 2 previously required N+1 API calls: one `gh pr list` plus one `gh pr view <N> --json comments,commits` per open PR to locate signed `Reviewed-by:` / `Disposition:` artifacts. Any agent that trusted the first call and skipped the per-PR fallback classified PRs with valid signed approvals as "no signed review" — the exact #140 failure mode resurfacing on a different axis. `gh pr list` supports `comments` and `commits` as JSON fields, so one call can carry every open PR's top-level comment thread. Step 2 now fetches both in a single call and documents the per-PR `gh pr view` fallback as truncation recovery rather than the default path. Acceptance checklist updated to match. Bump plugin.json to 0.5.1 so downstream installs refresh per the versioning policy. Addresses #163 (completes T1, T2) Co-Authored-By: claude/opus-4.7 (claude-code) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Folds
commentsandcommitsinto the Step 2gh pr listcall incommands/shiplog/hunt.mdso signed-review evidence arrives in the first pr-list payload, not in a per-PR fallback. Turns the prior N+1 API pattern (one list + onegh pr viewper PR) into a single list call, and re-scopes the per-PRgh pr viewto truncation recovery only. Bumps plugin.json to0.5.1so downstream installs refresh.Closes #163.
Journey Timeline
What prompted the fix
During a
/shiplog:huntrun ondevallibus/pogbeasts, PR #161 (which already carried three signedReviewed-by: claude/opus-4.7 (claude-code)comments) was mis-classified as "no signed review." Investigation showed the installedcommands/shiplog/hunt.mdrelied on the per-PRgh pr viewcall to discover comment-based signed reviews, and the runtime skipped that step after seeing a complete-looking list payload.The post-#140 / post-#151 prompt text correctly instructs the model to scan
commentsin Step 2, but leaves the data fetch split into two calls. Becausegh pr listsupportscommentsas a JSON field, the split was unnecessary and failure-prone.What changed
commands/shiplog/hunt.mdStep 2: singlegh pr list --state open --json number,title,isDraft,reviewDecision,reviews,body,url,headRefName,comments,commits --limit 20call; per-PRgh pr viewexplicitly labeled as truncation fallback..claude-plugin/plugin.jsonversion:0.5.0→0.5.1.Changes
ef5503bfix(#163): fold comments into hunt Step 2 pr-list callTesting / Verification
gh pr list --state open --json ...,comments,commits --limit 5againstdevallibus/pogbeastsreturns every open PR's comment bodies in one call, including the three signedReviewed-by:artifacts on PR [shiplog/discovery] #156: de-hardcode master in CONTRIBUTING and CI workflows #161.version-bump-check.ymlwill pass on this PR.grep -R "gh pr view <N>" skills/ commands/returns only the updated fallback line.Knowledge For Future Reference
gh pr list --jsonacceptscommentsandcommits— future commands should prefer one list call over a list + per-PR view fan-out when the field list supports it.commands/,skills/, or.claude-plugin/must bump plugin.json or CI fails. Bumping as part of the same PR is the cheap path.shiplogshould resume the standard cross-model review before merge.Authored-by: claude/opus-4.7 (claude-code)
Last-code-by: claude/opus-4.7 (claude-code)
Captain's log — PR timeline by shiplog