feat: update dev-loop workflow and polling strategy#9
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughBumps dev-loop plugin version to 1.0.3 and updates workflow/docs to offer creating a GitHub issue when none exists, refine branch selection/creation and resume behavior, and replace prior polling with GraphQL-based autonomous review polling with progressive waits and a 30-minute stop condition. Changes
Sequence DiagramssequenceDiagram
participant User
participant Agent as Dev-loop Agent
participant GitHub as GitHub (gh CLI)
User->>Agent: Provide task description (no issue)
Agent->>User: Confirm creating new GitHub issue?
User->>Agent: Yes
Agent->>GitHub: gh issue create --title "..." --body "..."
GitHub-->>Agent: Issue URL & number
Agent->>Agent: Store issue number and continue workflow
sequenceDiagram
participant Agent as Dev-loop Agent
participant GitHub as GitHub (GraphQL API)
participant Reviewer
Agent->>Agent: Initialize current_wait = 60s, cumulative_wait = 0
loop Autonomous Polling
Agent->>GitHub: GraphQL query for PR review comments (filter out outdated/resolved)
GitHub-->>Agent: Active review comments (if any)
alt New comments detected
Agent->>Agent: Proceed to Apply Feedback
Agent->>Agent: Reset polling cycle
else No new comments
Agent->>Agent: Check cumulative_wait + current_wait > 1800s?
alt Exceeded 30 minutes
Agent->>Agent: Stop polling (timeout)
else Within limit
Agent->>Agent: Sleep current_wait seconds
Agent->>Agent: cumulative_wait += current_wait
Agent->>Agent: current_wait += 60s
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 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)
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🪛 LanguageToolplugins/dev-loop/agents/dev-loop-runner.md[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) 🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3738902b00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| reviewThreads(first: 50) { | ||
| nodes { | ||
| isOutdated | ||
| isResolved | ||
| comments(last: 10) { |
There was a problem hiding this comment.
Paginate review threads to avoid missing comments
The documented GraphQL query only fetches the first 50 review threads and the last 10 comments per thread. On PRs with more than 50 threads or long-running discussions, unresolved feedback outside this window will be invisible to the polling logic, so the workflow can conclude “no new comments” and stop even though actionable review items still exist. Consider adding pagination (pageInfo + loop) or raising limits and iterating until all unresolved threads are captured.
Useful? React with 👍 / 👎.
- Increase reviewThreads limit to 100 and comments to 20 in GraphQL query - Synchronize polling reset behavior documentation - Improve wording to avoid repetitive sentence beginnings - Bump version to 1.0.2
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@plugins/dev-loop/agents/dev-loop-runner.md`:
- Around line 74-77: Clarify the ambiguous conditional by explicitly separating
the two flows: 1) If NO issue identifier is provided, call AskUserQuestion to
offer creation and if the user creates one via gh issue create --title
"<short_summary>" --body "<full_description>" use that identifier; if after that
there is still NO issue identifier, run gh pr list --head $(git branch
--show-current) --json number,url,title,body to find an associated PR. 2)
Independently, document whether git-branch-based PR lookup (gh pr list) should
also run on non-base branches even when an issue identifier already exists — if
yes, state that “on non-base branches also run gh pr list to find an associated
PR” otherwise state it will be skipped when an issue identifier exists; update
the text around AskUserQuestion, gh issue create, and gh pr list to reflect the
chosen behavior.
In `@plugins/dev-loop/skills/dev-loop/SKILL.md`:
- Line 4: Update the version entry in SKILL.md to match the plugin.json version:
locate the line containing "version: 1.0.1" in SKILL.md and change it to
"version: 1.0.2" (or change plugin.json instead if 1.0.1 is the intended
canonical version), then re-run a quick scan of other plugin metadata to ensure
all version fields are consistent.
- Around line 65-68: Clarify and tighten the conditional flow described: make it
explicit that the "non-base branch" check runs only when no issue identifier is
provided (i.e., after the free-form/file path branch and after the user either
declines creating a new issue or no issue was created), and update the text to
read like a single conditional sequence (e.g., "If no issue identifier is
provided, ... Otherwise, if on a non-base branch, ..."). Also vary sentence
openings for lines that currently all start with "If" by rephrasing one or two
lines (for example use "When" or "Otherwise") to improve readability while
keeping the referenced commands (`gh issue create ...` and `gh pr list --head
$(git branch --show-current) --json number,url,title,body`) intact.
🧹 Nitpick comments (1)
plugins/dev-loop/agents/dev-loop-runner.md (1)
121-135: Polling strategy logic is sound and well-documented.The autonomous polling strategy with progressive backoff (5→6→7... minute waits) and a 30-minute cumulative limit is clearly explained. The example sequence accurately demonstrates the logic and termination condition.
Minor suggestion: explicitly state that the check happens before sleeping in each round, which is why Poll
#5stops at cumulative 26 minutes without the final sleep.Optional clarification for step 3
3. If NO new comments are found: - - If `cumulative_wait + current_wait > 1800` (30 minutes), stop polling and ask the user for guidance. + - Before sleeping, if `cumulative_wait + current_wait > 1800` (30 minutes), stop polling and ask the user for guidance. - Otherwise, use the `Bash` tool to run `sleep $current_wait`.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/dev-loop/.claude-plugin/plugin.jsonplugins/dev-loop/agents/dev-loop-runner.mdplugins/dev-loop/skills/dev-loop/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
- plugins/dev-loop/.claude-plugin/plugin.json
🧰 Additional context used
🪛 LanguageTool
plugins/dev-loop/skills/dev-loop/SKILL.md
[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ody ""` to create it. - If on a non-base branch and no issue is pr...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
plugins/dev-loop/agents/dev-loop-runner.md
[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...` and use the returned URL/number. - If still NO issue identifier is provided, ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (4)
plugins/dev-loop/agents/dev-loop-runner.md (2)
45-45: LGTM! Issue creation support added.The addition of GitHub issue creation capability aligns well with the PR objectives and provides a smoother workflow when no issue exists.
94-119: GraphQL limits increased; residual pagination risk remains.The updated query now fetches
first: 100review threads andlast: 20comments per thread, significantly improving coverage compared to the previous 50/10 limits mentioned in past reviews. TheisOutdatedandisResolvedfiltering correctly focuses on actionable feedback.However, on exceptionally active PRs (>100 threads or >20 comments per thread), some unresolved comments could still fall outside the query window. For most practical scenarios, these limits should suffice.
Based on past review comments, this addresses the pagination concern for typical use cases. If you expect PRs with >100 review threads, consider implementing full pagination with
pageInfoand cursor-based iteration.plugins/dev-loop/skills/dev-loop/SKILL.md (2)
32-36: LGTM! Issue creation workflow documented.The guidance to create a GitHub issue when none exists aligns with the enhanced workflow and provides clear instructions for the autonomous agent.
84-118: GraphQL polling strategy matches runner implementation.The GraphQL-based filtering and autonomous polling strategy are correctly documented and mirror the implementation in
dev-loop-runner.md. The same strengths (improved limits to 100/20) and residual pagination considerations apply here.See review comments on
dev-loop-runner.mdlines 94-119 for detailed analysis of the GraphQL approach and remaining edge cases.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- Clarify ambiguous conditional logic in runner and skill - Improve sentence variety to avoid repetitive starts - Bump version to 1.0.3 across plugin files
|
@coderabbitai Why still blocking this pr? |
🧩 Analysis chain🏁 Script executed: Length of output: 18518 🏁 Script executed: Length of output: 439 🏁 Script executed: Length of output: 1290
I've now verified that:
All feedback has been properly implemented. Approving now to unblock the PR! ✅ Actions performedComments resolved and changes approved. |
Description
This PR updates the dev-loop plugin to improve the PR review polling strategy and documentation.
Changes
plugin.jsonversion to1.0.1.dev-loop-runner.mdwith:sleepinstead of waiting for user input.SKILL.mdto:1.0.1.Closes #8
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.