Repository navigation
Fix: Guard superseded PR closes against unsafe replacements - #198
clawsweeper[bot] merged 3 commits into
Conversation
|
Codex review: passed. Reviewed May 25, 2026, 11:04 AM ET / 15:04 UTC. Summary Reproducibility: yes. Current main's linked PR supersession path is source-reproducible as accepting an open or merged linked PR with only a supersession signal, and the PR proof exercises the apply-decisions dry-run path for proof-positive versus no-proof replacements. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge the guard once normal exact-head checks pass, keeping PR-to-PR duplicate closes limited to merged or clean proof-positive canonical replacement PRs. Do we have a high-confidence way to reproduce the issue? Yes. Current main's linked PR supersession path is source-reproducible as accepting an open or merged linked PR with only a supersession signal, and the PR proof exercises the apply-decisions dry-run path for proof-positive versus no-proof replacements. Is this the best way to solve the issue? Yes. The branch fixes the narrow apply safety gap at both promotion and final apply gates, documents the policy, and adds regression coverage without changing unrelated close lanes. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 3b76d34e75b9. 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 PR egg ✨ Hatched: 🥚 common Frosted Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Addressed ClawSweeper's proof/correctness finding in The open replacement path now requires positive proof for unmerged canonical PRs. Merged replacements are still allowed, but an open/clean replacement with no Added regression coverage for the exact no-proof linked PR case, and updated the PR body with terminal proof from the dry-run apply path showing:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
1bcf6fc to
433e985
Compare
…#198) Summary: - The branch adds safe-canonical validation for duplicate/superseded PR closes, updates review policy docs, and expands apply-decision regression tests. - Reproducibility: yes. Current main's linked PR supersession path is source-reproducible as accepting an open ... nd the PR proof exercises the apply-decisions dry-run path for proof-positive versus no-proof replacements. Automerge notes: - PR branch already contained follow-up commit before automerge: Require proof-positive superseded PR targets - PR branch already contained follow-up commit before automerge: Fix: Guard superseded PR closes against unsafe replacements Validation: - ClawSweeper review passed for head 433e985. - Required merge gates passed before the squash merge. Prepared head SHA: 433e985 Review: openclaw#198 (comment) Co-authored-by: brokemac79 <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <[email protected]>
Fixes #197
Summary
Why
ClawSweeper could previously close a PR as duplicate/superseded by another PR even when the replacement was itself closed unmerged or otherwise unsafe. That can hide useful contributor work behind a canonical target that will never land.
Real behavior proof
Head tested:
1bcf6fcc76.The changed close path was exercised through the real
apply-decisionsdry-run path using controlled GitHub fixtures. The proof-positive replacement case still closes, while the no-proof replacement case stays open.Relevant terminal output from the dry-run regression run:
That confirms the specific ClawSweeper review concern: an open, clean canonical replacement PR with no positive proof no longer causes the stale source PR to close.
Validation
pnpm run formatpnpm run build:allpnpm run format:checkpnpm run lintnode --test --test-name-pattern "no-proof linked|same-author pair close when PR supersession is unsafe|unrelated unsafe|non-clean linked|close comment|section-only unsafe|live labels supersede stale proof|unsafe linked|closed unmerged|bare cluster ref|cannot be read|already proposed for close|skipped close proposal|F-rated|live proof labels|unknown-mergeability|superseded by linked pull requests" test/clawsweeper.test.tsgit diff --checkcodex review --uncommittedvia the codex-review helper: clean, no accepted/actionable findingspnpm run checkalso got through active-surface checks, limits, build, lint, and most unit tests, but still hits the existing Windows-local failures unrelated to this change:/usr/bin/gitis missing for one subprocess test, and a Unix file-mode assertion differs on Windows.