Repository navigation
[codex] Route PR close reviews to autoclose - #371
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 3:11 PM ET / 19:11 UTC. Summary Reproducibility: yes. Source inspection shows current main maps PR close decisions to needs-human markers, while the PR head emits close-required metadata and routes it through trusted autoclose gates. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the guarded router fix after normal maintainer and CI gates, then run any backlog sweep separately with live rechecks and explicit maintainer approval. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main maps PR close decisions to needs-human markers, while the PR head emits close-required metadata and routes it through trusted autoclose gates. Is this the best way to solve the issue? Yes. Reusing the existing autoclose path with head, confidence, reason, policy, protected-signal, activity, updated_at, and source-revision gates is the narrow maintainable fix; the backlog sweep should stay separate from this patch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 323f7bdf7236. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
* route PR close reviews to autoclose * gate trusted PR close autoclose * tighten trusted close gates * Preserve retry close comment sync * Gate product direction trusted closes * Mirror live trusted close gates * Pass trusted close classifier context * Gate trusted close comment churn by source revision * Ignore advisory labels in source revisions --------- Co-authored-by: Dallin Romney <[email protected]>
Summary
clawsweeper-verdict:closeandclawsweeper-action:close-requiredmarker for pull request reports whose structured decision isclose.needs-human.Root cause
PR close reviews rendered visible close language such as
So I'm closing this here, but the hidden automation marker was stillclawsweeper-verdict:needs-human. That made the public comment and the automation contract disagree: maintainers saw a close recommendation, while the router treated the same comment as a human-review pause.Back-sweep list
The 2026-06-25 scan found 138 currently-open OpenClaw PRs with ClawSweeper duplicate/superseded close-language comments. These are the items to close in a follow-up back sweep after this lands, with live state rechecked immediately before mutation.
Scan candidate count: 436; verified matching open PRs: 138.
Buckets: 75 close recommendation left open; 63 contradictory keep-open/closing comment.
Real Behavior Proof
Captured locally on 2026-06-26 against commit
4db25bdbb99d8c8bf2b1f2dd43e1a73fe49545e0afterpnpm run checkcompleted successfully.This head includes the source-revision gate requested by ClawSweeper: PR close markers now carry
source_revision, trusted close parsing carries that value into autoclose commands, and the live close gate recomputes the source revision before allowing ClawSweeper-comment churn to bypassupdated_atdrift.The proof script imports the built
distmodules, renders a PR close report, parses the rendered trusted ClawSweeper comment, and evaluates the live trusted-close gate used during classification and immediately before autoclose execution.This shows:
clawsweeper-verdict:closeandclawsweeper-action:close-requiredwith reviewed head SHA, reviewed item timestamp, review timestamp, source revision,action_taken=proposed_close, and close reason.source issue/PR changed since trusted close review.updated_atdrift, protected labels, and low confidence still block before mutation.Source-Revision Label Proof
Captured locally on 2026-06-26 against commit
4db25bdbb99d8c8bf2b1f2dd43e1a73fe49545e0afterpnpm run checkcompleted successfully.{ "commit": "4db25bdbb99d8c8bf2b1f2dd43e1a73fe49545e0", "report_revision": { "advisory_label_churn_same": true, "user_label_drift_changes": true, "protected_label_drift_changes": true }, "repair_revision": { "advisory_label_churn_same": true, "user_label_drift_changes": true, "protected_label_drift_changes": true }, "trusted_close_gate": { "advisory_label_churn": null, "user_label_drift": "source issue/PR changed since trusted close review", "protected_label": "protected label: release-blocker" } }This shows ClawSweeper-owned advisory label sync no longer changes report-time or router-time source revisions, while user labels and protected labels still block the trusted close path.
Validation Output
Validation
The exact relevant command outputs are included above. Summary:
pnpm run checkpassed locally on Node 26.3.0 / pnpm 10.33.2.4db25bdbb99d8c8bf2b1f2dd43e1a73fe49545e0(pnpm checkand Windows Codex launcher succeeded).Notes
This PR changes the gated close route only; it does not run a live apply/close back-sweep. The 138-item sweep remains a separate maintainer decision and should be launched only after maintainers explicitly accept the live autoclose/back-sweep risk and choose the desired dry-run or sampling level.
The back-sweep list intentionally includes the full 138-item scan requested by maintainers. The close executor should still re-fetch each item before closing so already-closed PRs, changed heads, or new human follow-up are skipped according to current gates.