Add PR-state completion sweep#287
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
More reviews will be available in 9 minutes and 58 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughFactoryLoop gains a periodic PR-state completion sweep that finds non-draft completion PRs for in-flight issues, closes/releases them idempotently (per-issue dedupe), respects merge policies/merge-gate readiness, and is covered by end-to-end tests including timer and concurrency scenarios. ChangesPR Completion Sweep with Draft-Aware Concurrency
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
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)
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 |
|
pr-reviewer could not complete review for #287 in AgentWorkforce/pear. |
1 similar comment
|
pr-reviewer could not complete review for #287 in AgentWorkforce/pear. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #287 in AgentWorkforce/pear. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/factory-sdk/src/orchestrator/factory.test.ts (1)
3271-3307: 💤 Low valueConsider verifying the specific counter for the wrong-PR case.
The test correctly verifies that issue 251 (draft PR) increments
completionSweepDraftPr. However, issue 250's PR has a low match score ("Unrelated cleanup" title, "docs-cleanup" head_ref), so the PR resolver likely returns undefined, which should incrementcompletionSweepMissingPr(as shown in context snippet 2). Adding a check for this counter would make the test more precise about why completion was skipped for each issue.✨ Optional enhancement to verify missing-PR counter
expect(factory.status().inFlight.map((issue) => issue.key)).toEqual(['AR-250', 'AR-251']) expect(factory.status().counters.completionSweepCompleted).toBeUndefined() + expect(factory.status().counters.completionSweepMissingPr).toBe(1) expect(factory.status().counters.completionSweepDraftPr).toBe(1) })🤖 Prompt for 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. In `@packages/factory-sdk/src/orchestrator/factory.test.ts` around lines 3271 - 3307, The test case "PR-state sweep does not complete on a wrong PR or draft PR" should also assert that the wrong/unmatched PR increments the missing-PR counter: add an expectation that factory.status().counters.completionSweepMissingPr is 1 (in addition to the existing check for completionSweepDraftPr === 1) so the test verifies both the draft-PR and the missing/unmatched-PR branches are counted correctly.
🤖 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.
Nitpick comments:
In `@packages/factory-sdk/src/orchestrator/factory.test.ts`:
- Around line 3271-3307: The test case "PR-state sweep does not complete on a
wrong PR or draft PR" should also assert that the wrong/unmatched PR increments
the missing-PR counter: add an expectation that
factory.status().counters.completionSweepMissingPr is 1 (in addition to the
existing check for completionSweepDraftPr === 1) so the test verifies both the
draft-PR and the missing/unmatched-PR branches are counted correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: deee9434-9a5d-40a8-93ea-3087c306ad54
📒 Files selected for processing (2)
packages/factory-sdk/src/orchestrator/factory.test.tspackages/factory-sdk/src/orchestrator/factory.ts
b1d21e8 to
cff639c
Compare
|
Reviewed PR #287 and made one scoped fix: added the missing assertion for the wrong-PR branch counter in factory.test.ts. Addressed comments
Advisory NotesNone. VerificationPassed:
PR metadata reports mergeable, but I am not printing |
|
pr-reviewer could not complete review for #287 in AgentWorkforce/pear. |
|
Implemented two scoped fixes:
Addressed comments
Advisory NotesNone. Local validationPassed:
I did not run the macOS |
|
Reviewed PR #287 against Addressed comments
Advisory NotesNone. Local validationPassed:
Caveat: repeated |
Summary
Validation