GH#4412: fix(pulse): count all PRs for daily cap, not just open#4415
GH#4412: fix(pulse): count all PRs for daily cap, not just open#4415alex-solovyev merged 1 commit intomainfrom
Conversation
The daily PR cap counter in prefetch_state() and calculate_priority_allocations() only queried open PRs (--state open), missing PRs that were created today but already merged or closed. This caused stale/incorrect counts in pulse-state.txt (e.g., showing 1/5 when the actual count was 30), allowing the pulse to dispatch workers past the real cap. Fix: use --state all for the daily cap query so merged and closed PRs created today are included in the count. Also increase --limit from 100 to 200 to match the prefetch PR limit and avoid truncation on busy days.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Caution Review failedPull request was closed or merged during review WalkthroughThe pulse-wrapper.sh script now counts all PRs created today (open, merged, and closed) using Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
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)
📝 Coding Plan
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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Mar 13 12:06:14 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
--state allinstead of--state open, so merged and closed PRs created today are included in the countprefetch_state()(pulse-state.txt output) andcalculate_priority_allocations()(product repo dispatchability check)--limitfrom 100 to 200 to matchPULSE_PREFETCH_PR_LIMITand avoid truncation on busy daysRoot Cause
The daily PR cap counter reused the open-only PR JSON (
gh pr list --state open), which excludes PRs created today that were already merged or closed. On a busy day with many merged PRs, the count showed e.g. 1/5 when the actual count was 30, allowing the pulse to dispatch workers far past the real cap.Verification
--state allCloses #4412
Summary by CodeRabbit