Track comment timestamps per PR instead of globally - #453
Conversation
The discover step used a single global timestamp to fetch new comments. If a PR gained the agent label between runs, all comments posted before the last run were permanently missed. Switch to per-PR timestamps cached in .pr-followup-since/. When a PR is seen for the first time, all its comments are fetched (no since cutoff). On subsequent runs, only new comments since the last time that specific PR was processed are fetched. Also fetches comments per-PR directly from the PR's own endpoints instead of repo-wide, which avoids the 100-item pagination limit across all PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR follow-up workflow now tracks discovery timestamps per pull request, fetches comments individually using those timestamps, filters and sanitizes results, persists updated state, and passes the resulting comment blocks to the follow-up prompt. ChangesPR follow-up discovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant discover job
participant GitHub API
participant follow-up job
discover job->>GitHub API: Fetch review and issue comments per PR
GitHub API-->>discover job: Return filtered comment data
discover job->>follow-up job: Provide per-PR review_comments and pr_comments
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 Summary by QodoTrack per-PR comment “since” timestamps in pr-followup workflow
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.github/workflows/skillsaw-pr-followup.yml:
- Around line 65-94: Update the comment-fetching flow around PR_REVIEW_COMMENTS
and PR_COMMENTS to capture a NEXT_SINCE UTC timestamp immediately before the
first gh api request. After both requests complete successfully, persist
NEXT_SINCE to SINCE_FILE instead of generating a new timestamp at the end,
ensuring the cursor covers comments posted during fetching.
- Around line 76-83: Update the PR_REVIEW_COMMENTS and PR_COMMENTS jq pipelines
to flatten the multiple JSON arrays emitted by gh api --paginate into a single
comment stream before applying the --argjson collabs filter. Preserve the
existing collaborator selection, body cleanup, and projected fields while
ensuring discovery succeeds across more than one page of results.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d0161051-498c-4dba-a956-509fb1744e1b
📒 Files selected for processing (1)
.github/workflows/skillsaw-pr-followup.yml
Code Review by Qodo
Context used✅ Compliance rules (platform):
136 rules✅ Skills:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #453 +/- ##
=======================================
Coverage 93.54% 93.54%
=======================================
Files 145 145
Lines 11418 11418
=======================================
Hits 10681 10681
Misses 737 737 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6606f0a37e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Capture the since-timestamp before API calls (not after) so comments posted during fetching aren't missed on the next run. Add --slurp to gh api --paginate calls and use .[][] in jq to correctly flatten multi-page responses for PRs with >100 comments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
sincetimestamp to fetch new comments, causing it to miss bot comments (devin, codex, codecov) on PR Add first-class OpenAI Codex plugin and marketplace linting #451 — they were posted before the global timestamp but had never been seen by any run.pr-followup-since/pr-<number>. First time a PR is seen: all comments fetched. Subsequent runs: only comments since that PR was last processedTest plan
agentand confirm first run fetches all comments ("first time — fetching all comments")🤖 Generated with Claude Code
Summary by CodeRabbit