fix: restore automatic high-confidence OpenClaw bug repairs - #972
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 9:43 AM ET / 13:43 UTC. ClawSweeper reviewWhat this changesThis PR restores bounded automatic repair-PR dispatch for eligible OpenClaw bug reviews, adds durable recovery and focused canonical-record hydration, and updates the associated workflows, documentation, and regression tests. Merge readinessKeep this PR open for maintainer landing review. The supplied current-head diff and production evidence support a policy-approved restoration of guarded automatic bug-repair dispatch, and no concrete patch defect is established; however, the read-only shell could not run in this environment ( Priority: P1 Review scores
Verification
How this fits togetherClawSweeper turns reviewed OpenClaw issues into durable repair jobs when eligibility and safety checks pass. Review-publication workflows and scheduled backfill launch bounded repair workers, which hydrate the relevant canonical record and may open one guarded fix PR. flowchart LR
A[Reviewed OpenClaw issue] --> B[Eligibility and safety checks]
B --> C[Durable repair job]
C --> D[Direct publication dispatch]
C --> E[Scheduled backlog dispatch]
D --> F[Focused canonical record hydration]
E --> F
F --> G[Repair worker]
G --> H[Guarded fix pull request]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after a maintainer accepts the explicitly approved source-proven admission policy and the remaining hosted checks complete for the exact current head; retain the single master gate, bounded dispatch cap, and immediate source-state rechecks as the permanent safety boundary. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence from the PR’s linked historical failed Actions run and its current hosted/compiled-runtime after-fix evidence. I could not independently rerun or inspect the source path because read-only shell commands were blocked by the environment. Is this the best way to solve the issue? Yes, conditionally: consolidating the hidden secondary enablement behind the existing master gate and retaining bounded, durable dispatch is the narrowest path described for restoring the intended workflow. The explicit repository-owner policy statement removes the otherwise unresolved product-direction blocker. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 12af8b7d0e0c. 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
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What changes
CLAWSWEEPER_AUTO_IMPLEMENT_ISSUESas the sole automatic bug-repair gate; remove the hidden secondary gate that silently disabled implementation.gpt-5.6-solatxhighreasoning for both Codex and OpenClaw runners while leaving ordinary planning athigh.Actual production evidence
Commit intake ledger: https://github.com/openclaw/clawsweeper/actions/runs/30471621836CLAWSWEEPER_AUTO_IMPLEMENT_REPRO_BUGS=1, with existingCLAWSWEEPER_AUTO_IMPLEMENT_ISSUES=1,CLAWSWEEPER_ALLOW_EXECUTE=1,CLAWSWEEPER_ALLOW_FIX_PR=1, andCLAWSWEEPER_ALLOW_AUTOMERGE=1.CLAWSWEEPER_FIX_PR_MODEL=gpt-5.6-sol,CLAWSWEEPER_FIX_PR_REASONING_EFFORT=xhigh, and restored ordinaryCLAWSWEEPER_CODEX_REASONING_EFFORT=high.Validation
pnpm run build:repairpnpm run buildpnpm run check:staticpnpm run lintnode --test test/repair/issue-implementation-intake.test.ts test/repair/external-messages.test.ts test/repair/process-env.test.ts test/repair/repair-cluster-worker-containment.test.ts test/repair/exact-review-batch-workflow.test.ts test/repair/issue-implementation-dispatch.test.ts test/state-writer-workflow.test.ts test/sweep-workflow.test.ts— 158/158 passed.pnpm run checkencountered an unrelated host-only hang intest/action-ledger-runtime.test.ts; hosted Linux CI is the authoritative full-suite proof.Maintainer policy decision
Repository owner Peter explicitly directed this change in the current session: whenever review identifies an easily fixable bug, automatically generate the PR. That approval includes a small, high-confidence, source-proven OpenClaw bug with a clear root cause and regression validation. Protected, security-sensitive, bulk-filed, existing-PR, and product-decision cases remain blocked. This is the deliberate, explicitly approved source-proven admission policy.
Real behavior proof — current head 6a7800b
Claim: A small source-proven reviewed OpenClaw bug creates exactly one durable repair job, records successful dispatch, suppresses duplicate/open-PR work, enforces configured caps and retry fairness, and reserves
gpt-5.6-solwithxhighreasoning for actual fix execution.Actual compiled production CLI:
env PATH="/Users/steipete/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" node /tmp/clawsweeper-issue-runtime-proof.mjs{ "surface": "actual compiled production issue-intake CLI", "sourceProvenStatus": "queued_for_repair", "durableJobCreated": true, "workerDispatchMarked": true, "duplicateRediscoveryCount": 0, "existingOpenPullRequestStatus": "not_eligible", "blockedJobCooldownMinutes": 30, "freshCandidatePriority": [44, 43], "issueFixModel": "gpt-5.6-sol", "issueFixReasoning": "xhigh" }Real hosted end-to-end positive production proof: https://github.com/openclaw/clawsweeper/actions/runs/30633251006 completed successfully against the actual unresolved source-proven bug openclaw/openclaw#98276. Its prior candidate openclaw/openclaw#98326 is closed and unmerged. Intake hydrated exactly one canonical Worker record, checked the historical PR state, returned
queued_for_repair, createdjobs/openclaw/inbox/issue-openclaw-openclaw-98276.md, posted durable Queued status to the actual issue, committed the job and audit successfully, and dispatched one worker. The first dispatcher used existingmain; because its old worker lacked this PR’s per-issue Sol/xhigh override, that run was stopped before execution. The same durable job was redispatched from a previous commit in this exact PR at https://github.com/openclaw/clawsweeper/actions/runs/30633381659, where the actual issue-execution environment selectsgpt-5.6-solwithxhigh. Earlier negative production proof https://github.com/openclaw/clawsweeper/actions/runs/30631582809 correctly rejected the existing open fix PR for openclaw/openclaw#116458. Canonical hydration completes in about 2 seconds, instead of the former 312-second, 122 MB, 39,225-record full-state hydration; the current head applies that focused path to both repair stages.Live production publication-handoff recovery: before the final commit, the actual queue reported
dispatcher_handoff_stalled, 30 ready publications, zero active batch items, and a stale ten-minute reservation. Successful live deployment https://github.com/openclaw/clawsweeper/actions/runs/30631460703 installed the exact current-head Worker; production immediately returned to three leased batches and 24 actively publishing items, with no stalled-handoff alert. The targeted production-code regression runs the real Durable Object against a stale exact matching dispatch, verifies the reservation is cleared, and confirms a newly preflighted dispatch; old/missing dispatch metadata retain their newer fences.Operational root cause independently repaired: the former Git-backed operational-state repository had grown to 42,208,713 KB, retained 637,717 tracked paths and 701 obsolete scratch branches, and GitHub persistently rejected every new state commit with
fatal error in commit_refs. Full history, stars, forks, and the existing issue are preserved at https://github.com/openclaw/clawsweeper-state-archive-20260731. A fresh https://github.com/openclaw/clawsweeper-state now preserves every live job, result, notification, report, lease, and dashboard artifact in only 3,243 tracked files; authoritative records/ledger/assets remain exclusively in Worker/R2. The successful hosted run above proves its state commit works.Observed fixed failures: missing hydrated canonical-report fallback https://github.com/openclaw/clawsweeper/actions/runs/30627789295; repeated GitHub
commit_refsstate-write failures https://github.com/openclaw/clawsweeper/actions/runs/30627939837 and https://github.com/openclaw/clawsweeper/actions/runs/30628598741. Both are absent in the successful current-head run.Historical closed-PR regression proof: the newly added production-intake tests cover absolute and relative GitHub PR links, Markdown labels, closed ordinary issues masquerading as PR references, unrelated repositories, duplicate-open-PR rejection, and missing/partial lookups. All 38 focused intake cases pass.
Regression proof: 112 additional targeted review, intake, hydration, source-fingerprint, and worker-containment tests passed; another 62 focused workflow, hydration, review-fingerprint, and publication invariants pass after fixing the exact Linux CI failure in https://github.com/openclaw/clawsweeper/actions/runs/30634888159. Broader earlier focused runs passed 203/203. The final cross-lane regression proves identical review and repair hashes for bulk-filed issues, absent canonical records remain safe, protected publication stops immediately, and explicit maintainer override is preserved. Both the main and repair bundles build; complete static checks pass. Fresh final precommit Codex reviews of the implementation and final CI correction found no actionable P0/P1/P2 findings. Both previous committed-review P2 findings are fixed: legacy undispatched jobs without a valid retry deadline are now prioritized ahead of fresh candidates, and malformed successful Worker envelopes (
{}, arrays, missing fields, or invalid revisions) retry at most three times; digest mismatches still fail immediately and signed POST behavior is unchanged.