Repository navigation
feat(policy): auto-close stalled unproven and abandoned PRs; raise apply caps to 20 - #403
Conversation
|
ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed July 4, 2026, 3:27 AM ET / 07:27 UTC. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 4db0631ce933. Evidence reviewedWhat I checked:
Likely related people:
How this review workflow works
|
c28dfb4 to
a6ea05c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c28dfb43dc
ℹ️ 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".
| observe(record.started_at); | ||
| observe(record.completed_at); |
There was a problem hiding this comment.
Count queued check runs as head activity
When the latest head has a newly queued check run, GitHub exposes a recent created_at while started_at/completed_at can still be null, so this path misses the only timestamp for that CI activity. In that scenario, a PR that is otherwise waiting-on-author/failing or unproven can keep an old headActivityAtMs and be closed even though check activity happened within the 14/30-day inactivity window; include the check run created_at in the observed activity clock.
Useful? React with 👍 / 👎.
| if (!body.includes(PROOF_NUDGE_MARKER_PREFIX)) continue; | ||
| observe(record.created_at); |
There was a problem hiding this comment.
Trust only bot proof-nudge comments
This treats any comment containing the proof-nudge marker as a dated proof request, but comments can be authored or edited by non-ClawSweeper users while retaining an old created_at. A stale user comment that copies <!-- clawsweeper-proof-nudge would satisfy the 14-day proof-request gate and allow stalled_unproven_pr closure without an actual bot proof nudge; reuse the existing proof-nudge marker author validation before observing the timestamp.
Useful? React with 👍 / 👎.
…ply caps to 20 (openclaw#403) * feat(policy): auto-close stalled unproven and abandoned PRs * feat(apply): raise close limit and checkpoint size to 20
What
Two new PR-only close reasons plus apply throughput, from the 2026-07-04 backlog analysis.
stalled_unproven_pr— external D/F-rated pull requests whose requested real-behavior proof stayedmissing,mock_only, orinsufficient, with the PR at least 14 days old and the head idle for 14 days. Apply re-verifies live state before closing: a dated proof request (needs-proof label timeline event or proof-nudge comment) must have been visible for at least 14 days — the durable review comment is edited in place and deliberately does not count as the dated ask; draft PRs are excluded (they route toabandoned_pr);proof: sufficient/proof: overridelabels block; and any human engagement (assignee, requested reviewer/team, maintainer comment, review, or inline comment) blocks.abandoned_pr— external pull requests idle for 30 days whose live head is still stalled: a draft, labeledstatus: ⏳ waiting on author, or failing checks (combined status failure/error or a check run concludingfailure/timed_out). High-quality proven work (S/A/B overall rating with sufficient or overridden proof) is protected because it belongs in repair/adopt paths, not auto-close.Both inactivity clocks take the newest of the head committer date and status/check-run timestamps, so pushing an old commit still registers as fresh activity and blocks the close. Missing live data always keeps the PR open.
3. Apply throughput: close limit and checkpoint size raised from 5 to 20 (workflow_dispatch defaults, scheduled fallbacks, and the hard token-lifetime cap). Continuation dispatches already pass these through env, so chains keep the new values.
Both reasons follow the existing conservative contract: review proposes, apply re-checks live GitHub state immediately before mutation, and exemption labels, protected labels, maintainer authorship, same-author pairs, and snapshot drift all still block.
REVIEW_POLICY_VERSIONis bumped to2026-07-04-policy-v23, so existing keep-open reports go policy-stale and re-review under the new anchors. New docs:docs/stalled-pr-close-policies.md.Why
Backlog funnel analysis of openclaw/openclaw (2026-07-04):
keep_open— review policy, not apply throughput, is the backlog bottleneck.Estimated immediate candidates: ~837 proof-expiry plus ~500-600 abandoned PRs, with only ~45 A/B-rated-with-proof PRs in the union needing the built-in exemptions.
Proof
pnpm run checkgreen locally (build, lint, unit + repair tests, changed-surface and full coverage ratchets, format check).ghharness: dry-run closes for both reasons, plus kept-open outcomes for recent head activity, a too-fresh proof request, draft routing, a healthy live PR, and a maintainer comment.