Repository navigation
Make comment router resilient to GitHub throttling - #1155
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 7:22 PM ET / 23:22 UTC. ClawSweeper reviewWhat this changesThe PR turns GitHub throttle failures into durable comment-router deferrals and adds a per-repository cursor for bounded scheduled comment discovery. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open: the supplied proof is strong, but this review environment could not execute even read-only checkout inspection, so the current-head source, full diff, history, and maintainer notes could not be independently audited. Likely related person: steipete (current implementation author; low-confidence routing only). Priority: P2 Review scores
Verification
How this fits togetherThe repair comment router turns repository comments into durable review and repair actions. It reads GitHub comment history, writes a ledger and scan cursor, then the scheduled workflow publishes that state for later processing. flowchart LR
A[GitHub comments] --> B[Comment router]
B --> C[Throttle classification]
C --> D[Routing ledger]
D --> E[Scheduled scan cursor]
E --> F[State publication workflow]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the bounded cursor and throttle-defer design if a fresh full current-head review confirms cursor persistence, retry behavior, and workflow publication remain safe across upgrades. Do we have a high-confidence way to reproduce the issue? Yes—the contributor provides a specific deterministic loopback reproduction and recorded after-fix output, but this reviewer could not independently run it because read-only checkout commands failed in the sandbox. Is this the best way to solve the issue? Unclear—the structured defer plus successful-cycle cursor advance is a plausible narrow solution, but the local source and complete diff could not be inspected to confirm all compatibility paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4d41d3df4baf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
github_throttleddefer instead of an uncaught router crashProduction evidence: repair comment router run 31697514690 failed on the full comment-history read for openclaw/openclaw#120500 after the installation bucket was exhausted.
Behavior proof
repair:comment-routerwrapper, real child process, GitHub CLI boundary, router report/ledger, scheduled cursor artifact, and workflow publication contract.GITHUB_API_URL, serving GitHub's production installation 403 body plus abuse 403, 429, recovered-success, same-timestamp-id, mixed routable/throttled, and non-throttle 422 cases.provider=local-container, leasecbx_6efbcfb3f874(coral-barnacle-e30e), runrun_4fe08202fe1b, Ubuntu 26.04 arm64, Node 24.19.0;bash docs/proof/router-throttle-resilience/run-proof.shafterpnpm run build:all.docs/proof/router-throttle-resilience/contains the contract, staticjqrecipe, Gitrev-parse/cat-filecross-check, red/green result, behavior report, transcript, and receipt.7d991891672e29f6f5d09961a7a34b205e2602cd.OpenClaw Bay is unaffected: this changes an internal operator workflow and git-backed cursor, not Bay's public observer-only status contract.
Testing
pnpm run checknode --test test/repair/comment-router-throttle-resilience.test.ts test/repair/comment-router-action-ledger.test.ts test/repair/comment-router-core.test.ts test/repair/comment-router-utils.test.ts test/repair/github-cli.test.ts test/repair/workflow-sparse-checkout.smoke.ts test/clawsweeper-action-ledger.test.ts test/state-writer-workflow.test.tspnpm run review -- --local-range --target-repo openclaw/clawsweeper --base origin/mainRead economy
Repository-wide discovery now uses bounded
since=<cursor>pages withsort=updated&direction=asc. Per-item histories remain complete because they feed source-revision hashes, linked-PR discovery, historical command/status idempotency, review-lease checks, and close guards; applying the scan cursor to those reads would silently weaken safety semantics.