Repository navigation
fix: keep branchless reviews durable during GitHub limits - #1105
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 3:18 PM ET / 19:18 UTC. ClawSweeper reviewWhat this changesThe branch removes a workflow-side default-branch GitHub lookup and durably resolves missing branch authority through the dashboard queue’s target-owner rate-limit circuit. Merge readinessThe PR addresses a real current-main intake gap and has credible controlled runtime proof; no concrete patch defect was found. It needs maintainer coordination of the Worker-before-workflow rollout because the new workflow route depends on the deployed Worker endpoint. Priority: P2 Review scores
Verification
How this fits togetherLegacy review events enter the sweep workflow and then the dashboard Worker’s durable exact-review queue. Before review work is admitted, the queue establishes target-branch and, where needed, pull-request source-head authority while exposing rate-limit state to observers. flowchart LR
A[Legacy review event] --> B[Sweep workflow]
B --> C[Signed Worker route]
C --> D[Durable authority reservation]
D --> E[Target GitHub App read]
E --> F[Owner rate-limit circuit]
D --> G[Exact review queue]
G --> H[Observer status]
Decision needed
Why: The code intentionally introduces a new signed endpoint used by the workflow, so rollout order determines whether branchless legacy events have a temporary retry-only path. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make branchless intake durable behind the existing target-owner circuit, with the Worker endpoint available before legacy producers route events to it. Do we have a high-confidence way to reproduce the issue? Yes for the pre-fix path at source level: current main calls Is this the best way to solve the issue? Yes, conditionally: carrying a valid branch without a lookup and reserving only branchless intake in the durable control plane is the narrowest compatible repair, provided the Worker route is deployed first. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e13791786799. LabelsLabel 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
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
6adf4cf to
bbfe702
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
bbfe702 to
2362381
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
target_branchdirectly to the existing enqueue/source-authority routes; durably reserve genuinely branchless intake for control-plane resolution.target_app:<owner>reset-aware circuit for branch and source-head authority.Companion producer change: openclaw/openclaw#121674.
Problem
Run 31409599011 shows the legacy workflow calling
repos/openclaw/openclawwith the workflow repository's Actions token to discoverdefault_branch. The installation-quota 403 happened before/internal/exact-review/enqueueor/source-authority, so the durable control plane could not preserve the event, observe the failure, or collapse same-credential retries.The merged quota controls already protect
repository_actionspublication andtarget_app:<owner>review admission. This pre-enqueue workflow lookup was outside both boundaries.Implementation
.github/workflows/sweep.ymlno longer performs an inlinegh apibranch lookup or exposesGH_TOKENto legacy intake./internal/exact-review/branch-authorityroute.ExactReviewQueuedurably stores branch/source reservations, resolves the repository default branch with the target installation's App credential, and never guessesmain.target_app:<owner>circuit. Later same-owner reservations defer to the persisted reset without another request or attempt charge; unrelated owners continue.lanes.review.authority_pending; the existing circuit'saffected_pendingincludes the reservations it blocks. Bay remains observer-only and uses its existing generic circuit renderer.Validation
Current head:
236238166735dd670bc05f55e778a40a01deaf87Current base:
e13791786799f6a51a39806938847bbc48948e5epnpm run build:all— passed.pnpm run lint:dashboard— passed.pnpm run lint:scripts— passed.pnpm run check:docs— passed.pnpm run check:limits— passed; 300/hour and burst 30 are unchanged.test/dashboard-worker.test.tscontracts — 3 passed: signed branchless intake, quota circuit/request collapse/reset recovery, and Bay route/rendering.test/sweep-workflow.test.tscontracts — 2 passed: branchless serializer behavior and storm-amplification prevention.node --test test/clawsweeper.test.ts— 77 passed.git diff --check origin/main...HEAD— clean.The full workflow test file retains unrelated native-Windows
/bin/bashfixture failures; the changed workflow contracts pass on Windows and in the Linux proof environment.Codex review
codex review --uncommitted— no actionable correctness issue.codex review --base origin/mainat this head/base — no discrete actionable regression.Real Behavior Proof
wrangler dev --localWorker routing and signature validation; real SQLite-backedExactReviewQueueDurable Object storage, alarms, and restart persistence; production GitHub App JWT/installation-token/repository-read client; unmodified HTTP transport through the loopback-onlyGITHUB_API_URLseam; public queue/circuit/Bay status.openclaw/openclawrepository read, thentrunk;other/reporeturnsstable; pull request 903 returns the reserved synthetic head. Two branch reservations and one source reservation share the OpenClaw owner; one branch reservation uses the other owner.crabbox run --provider local-container --local-container-image node:24-bookworm --fresh-pr openclaw/clawsweeper#1105 --timing-json --script C:\clawsweeper-work\notes\csw-review-branch-authority-local-container-proof.sh.local-container, leasecbx_9754eb3bbc80, slugcoral-crab, targetlinux,node_24-bookworm; fresh-PR checkout asserted exact head236238166735dd670bc05f55e778a40a01deaf87. Local-container does not emit a separate remote run ID.target_app:openclawactive withaffected_pending=3; two same-owner follow-ups skipped by circuit; no pull read;other/repoadmitted asstable.affected_pending=0; durable records showed items 900/901 astrunk, item 902 asstable, and pull request 903 astrunkwithsourceHeadVerified=trueand the reserved head.docs/proof/review-branch-authority/harness writes redacted queue snapshots, resolved durable records, GitHub method/path/auth-scheme/status trace, Worker logs, andproof-summary.json. Exact proof source-tree hash:dddfb330a9b64f9040d5dc88b5d30f80555add18a033a9f43813af1aaddbd659.An earlier exact-head Crabbox attempt passed all build/lint/docs/tests but invoked the committed shell helper without
bash, so it stopped with permission denied before runtime proof and is not counted as behavior evidence. The successful fresh lease above corrected only that local wrapper invocation.Risks and rollout