ci: daily stuck-PR detector (surface-only; notifies owner + agents)#1140
Conversation
Safety net for the 'agents shepherd their own PRs' rule — catches PRs whose driving agent died/abandoned them (e.g. #1025: 3+ days BLOCKED with a red required check + 2 unresolved threads while ~40 PRs merged past it). - .github/scripts/stuck_pr_report.sh — flags open non-draft PRs that are failing a check OR blocked/conflicting AND stale (>24h); excludes drafts + `blocked`-labelled (snooze). Upserts ONE living issue + @mentions the owner (→ GitHub notification email); optional Resend email if RESEND_API_KEY is set. Surface-only (cron can't spawn a fixer). - .github/workflows/stuck-pr-report.yml — daily cron + workflow_dispatch; NOT a PR check. - worldos-dev skill: point agents at the `stuck-pr-report` issue as the shared orphan queue. Validated live: produced issue #1138 flagging #1025. From the 2026-06-21 process review.
|
Warning Review limit reached
More reviews will be available in 12 minutes and 3 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 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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c9067e294
ℹ️ 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".
…x P2) When no PRs are stuck, edit the open report issue to all-clear and CLOSE it, so an open `stuck-pr-report` issue always means 'something is stuck now' — agents won't adopt already-resolved PRs. Upsert now reuses+reopens the single canonical issue (open → else reopen most-recent closed → else create). Addresses Codex P2 on #1140.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec7b3a4a5a
ℹ️ 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".
…ex P2) The explicit permissions block sets unlisted scopes to none; statusCheckRollup reads check runs + commit statuses + workflow-run data, which would fail under GITHUB_TOKEN with 'Resource not accessible by integration' (the local PAT validation masked this). Add checks:read + statuses:read + actions:read. Addresses Codex P2 on #1140.
What
A daily safety-net for the "agents shepherd their own PRs" discipline — catches PRs whose driving agent died/abandoned them. Surface-only (a scheduled job can't spawn a fixer), routed to both audiences:
@mention(GitHub notification email), with an optional Resend real-email path ifRESEND_API_KEYis set.worldos-devskill now points them at thestuck-pr-reportissue as the shared queue).Files
.github/scripts/stuck_pr_report.sh— flags open non-draft PRs that have a failing check, OR are blocked/conflicting AND stale (>24h). Excludes drafts +blocked-labelled PRs (the snooze). Upserts one issue (found by label), edits its body + posts a dated@mentioncomment..github/workflows/stuck-pr-report.yml— daily cron (23 15 * * *) +workflow_dispatch. Not apull_requestcheck, so it adds no merge gate.worldos-devskill: one-line pointer so agents treat the report issue as the orphan-PR queue.Why
The "never push-and-abandon" rule is a behavioral promise that breaks when the agent dies. Live proof: #1025 sat 3+ days BLOCKED with a red
qa-release-gate-tests+ 2 unresolved threads while ~40 PRs merged past it. Nothing was watching.Validated
Ran the script live against the repo → produced issue #1138 correctly flagging #1025 (and zero false-positives on the ~10 active PRs).
Notes
@mention). To get a guaranteed standalone email, setRESEND_API_KEY(secret) +STUCK_PR_EMAIL_TO/STUCK_PR_EMAIL_FROM(vars); the script fires Resend only if all three are present.--squash --auto.🤖 Generated with Claude Code