Strengthen closed-PR search in analyze phase Step 3.4#2
Conversation
Add target-specific search alongside the existing issue-number search, so prior attempts on the same function/file are surfaced even when the PR did not link the tracker issue. Important for tracker-style issues with many sub-tasks where issue-number search returns too much noise.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR expands the "Check for related work" guidance in the Analyze phase: replace the single-search approach with two separate searches (issue-number and target-based), add reviewing closing comments on closed PRs, and flag certain closed-PR outcomes as BLOCKER-level risks. ChangesContributor Guide: Related Work Search
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/contribute/references/phase-analyze.md`:
- Around line 93-102: The examples currently show gh search prs with
--state=closed which contradicts the preceding text that instructs to search
both open and closed PRs; update the sample commands (the lines containing gh
search prs and the --state=closed flag and the placeholders "<TARGET_SYMBOL>"
and "<TARGET_FILE_BASENAME>") so they actually cover both open and closed PRs —
either remove the --state filter to search all states or provide two examples
(one with --state=open and one with --state=closed) and keep the placeholders
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 64e681a0-26e0-44b3-a9da-baad6478dec4
📒 Files selected for processing (1)
skills/contribute/references/phase-analyze.md
Address CodeRabbit feedback on PR LuciferDono#2: prose said 'both open and closed PRs' but the example commands only showed --state=closed. Adds the matching --state=open lines for both the symbol and the file-basename searches.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Nice catch on this. The scipy #7168 case is exactly what the issue-number-only search would miss. Two-search structure handles it, and CodeRabbit's open/closed nit is already in the second commit. Squashing on merge. |
Summary
Strengthen the "Check for related work" step in
phase-analyze.md(Step 3.4) to surface function-specific prior attempts in addition to the existing issue-number search. The current single search misses prior closed PRs that targeted the same function but did not link the tracker issue — a hole that bites contributors on tracker issues with many sub-tasks.The bug, with a concrete repro
I used the plugin to contribute a docstring example to
scipy.signal.vectorstrengthagainst scipy/scipy#7168 (a tracker with 152 sub-tasks across many functions). The discover and analyze phases verified the issue wasn't taken — both true — and gave it a green light.After my PR was open, I discovered scipy/scipy#24592 (closed): a prior bulk DOC PR covering the same function (among 20 others) that had been closed three months earlier by a scipy maintainer with the comment "We don't accept pull requests from AI agents." Issue #7168 was still open, and
gh search prs --repo scipy/scipy "#7168" --state=closedreturned that PR — but among many other sub-PRs, none of which mentioned my specific function. The signal was buried.A targeted search by the function name (
gh search prs --repo scipy/scipy --state=closed vectorstrength) would have surfaced both that bulk PR and another single-function attempt (#25023) immediately, with their closing reasons — letting me pivot before investing analyze/work/test/submit effort.The fix
phase-analyze.mdStep 3.4 now instructs two searches:A short rationale explains why both searches matter for tracker-style issues.
Scope
skills/contribute/references/phase-analyze.mdbashlanguage tag, no trailing whitespaceTesting
Pure-markdown change, so per CONTRIBUTING.md "test by running any phase and verifying coherence":
AI Generation Disclosure
I am the human contributor; the plugin's own contribution workflow was used (
/contribute analyze→/contribute work→/contribute test) with Claude Code as the assistant. The bug we are fixing is one I personally hit while using the plugin to contribute elsewhere; I reviewed every line of the diff before opening this PR and can explain the change. AI-assisted text in this PR: the wording of Step 3.4 itself and this PR description.Summary by CodeRabbit