Skip to content

fix: let maintainer automerge resume paused PRs#385

Merged
clawsweeper[bot] merged 2 commits into
mainfrom
feature/automerge-resume-paused-pr
Jul 2, 2026
Merged

fix: let maintainer automerge resume paused PRs#385
clawsweeper[bot] merged 2 commits into
mainfrom
feature/automerge-resume-paused-pr

Conversation

@hxy91819

@hxy91819 hxy91819 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Fix the comment router pause guard so a fresh maintainer @clawsweeper automerge command can resume a PR after @clawsweeper stop left it paused for human review.

Root Cause

openclaw/openclaw#93209 exposed a replay-guard bug in the automerge command router. The PR had an older shared automerge status comment, then a later @clawsweeper stop removed clawsweeper:automerge and added clawsweeper:human-review. When a maintainer later posted a new @clawsweeper automerge, pausedModeStatusBlocksReplay() saw the pause label plus the old status comment and classified the fresh maintainer command as skipped. That meant both approve and automerge could fail to recover the paused lane without manual label removal.

Changes

  • Allow only a fresh non-bot maintainer mode command to bypass the paused-mode replay guard.
  • Keep bot/replay/label-sweep status handling blocked while a pause label remains.
  • Add regression assertions for the old shared automerge status plus human-review pause case.

Validation

  • pnpm run build:repair && node --test test/repair/comment-router-core.test.ts
  • pnpm run check

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed. Reviewed July 2, 2026, 2:46 AM ET / 06:46 UTC.

Summary
The branch adds a pause-history check so newer authorized maintainer autofix/automerge comments can resume paused PRs while bot and replay paths stay blocked, with regression coverage.

Reproducibility: yes. by source inspection: current main blocks paused mode replay whenever a pause label and existing mode status response are both present, before the router can remove pause labels for a later maintainer command. I did not execute the router because this review is read-only.

Review metrics: 2 noteworthy metrics.

  • Changed surface: 3 files, +129/-2. The patch is small, but it touches automerge command routing, so the focused regression tests matter.
  • Current checks: 8 successful, 1 skipped notify. The exact head has green CI signal while live pause-history behavior remains a maintainer risk decision.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] Merging changes live ClawSweeper automerge/autofix pause recovery: a newer authorized maintainer mode command after a recorded pause can clear pause labels and restart automation, while bot and replay paths remain paused.
  • [P1] The helper intentionally fails closed when no matching stop or human-review control entry is recorded, so incomplete history can still leave a paused PR requiring manual label handling.

Maintainer options:

  1. Land guarded resume after acceptance (recommended)
    Accept that a newer authorized autofix/automerge command after a recorded pause may clear pause labels and restart the automation lane while replay and bot paths remain blocked.
  2. Request live router proof
    Ask for redacted router output or a scratch run of stop followed by maintainer automerge if maintainers want full ledger/comment-history proof before merge.
  3. Keep paused PRs manual-only
    Pause or close if maintainers decide that a human-review label should require manual label removal rather than command-based resume.

Next step before merge

  • [P2] No repair job is needed; the PR is already automerge-opted with no actionable line-level defect, and the remaining question is maintainer acceptance of the automation policy risk.

Security
Cleared: The diff changes internal command routing and tests only, adding no dependencies, workflow permissions, secret handling, or third-party execution.

Review details

Best possible solution:

Land the guarded router change after maintainers accept command-based resume as the desired pause policy, preserving fail-closed behavior when pause history is missing.

Do we have a high-confidence way to reproduce the issue?

Yes by source inspection: current main blocks paused mode replay whenever a pause label and existing mode status response are both present, before the router can remove pause labels for a later maintainer command. I did not execute the router because this review is read-only.

Is this the best way to solve the issue?

Yes, this is a narrow fix for the stated resume path: authorization is resolved before the bypass, trusted-bot replay remains blocked, and only newer autofix/automerge commands after a recorded pause can resume the lane.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0c85aae0ecbc.

Label changes

Label changes:

  • add status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Not applicable: The external-contributor proof gate does not apply because the GitHub context reports a MEMBER author; PR validation and CI remain useful review evidence.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: 🚀 automerge armed.

Label justifications:

  • P1: The PR fixes a live ClawSweeper automerge resume failure that can block maintainer-command automation on real PRs.
  • merge-risk: 🚨 automation: The diff changes paused automerge/autofix command replay behavior, which CI cannot fully prove against live status-comment history.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Not applicable: The external-contributor proof gate does not apply because the GitHub context reports a MEMBER author; PR validation and CI remain useful review evidence.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully; its automation-safety guidance and member-authored non-closeable rule were relevant to this review. (AGENTS.md:1, 0c85aae0ecbc)
  • Current main blocks the reported resume path: Current main returns true from pausedModeStatusBlocksReplay whenever pause labels and an existing mode status response are present, with no newer-maintainer-command exception. (src/repair/comment-router-core.ts:773, 0c85aae0ecbc)
  • Router reaches the pause guard before clearing labels: The autofix/automerge classifier calls pausedModeStatusBlocksReplay before building remove_label actions for pause labels, so an old status marker can block a later maintainer command on main. (src/repair/comment-router.ts:650, 0c85aae0ecbc)
  • PR narrows the bypass: The PR adds maintainerModeCommandCanResumePausedMode, rejecting trusted bots, limiting the path to autofix/automerge, and requiring the command timestamp to be newer than a recorded pause. (src/repair/comment-router-core.ts:786, 42999ea735a5)
  • Regression coverage added: The PR adds assertions for old shared automerge status plus human-review pause behavior, stale maintainer commands, and trusted-bot replay remaining blocked. (test/repair/comment-router-core.test.ts:531, 42999ea735a5)
  • CI and mergeability checked: GitHub reports the PR head cleanly mergeable with 8 successful checks and 1 skipped notify check. (42999ea735a5)

Likely related people:

  • Vincent Koc: git blame shows the paused replay guard, resume timing helper, and classifier call path came from the durable exact-admission router work, with adjacent human-review pause work the next day. (role: introduced current router behavior; confidence: high; commits: ac8f2c5e61c2, 25a378a5b7d9; files: src/repair/comment-router-core.ts, src/repair/comment-router.ts)
  • brokemac79: Recent main history shows adjacent PR close-review routing work touching the same router and regression-test files. (role: recent adjacent contributor; confidence: medium; commits: 84796f0c9b0c; files: src/repair/comment-router-core.ts, src/repair/comment-router.ts, test/repair/comment-router-core.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 Urgent regression or broken agent/channel workflow affecting real users now. labels Jul 2, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. label Jul 2, 2026
@hxy91819 hxy91819 marked this pull request as ready for review July 2, 2026 03:37
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hxy91819

hxy91819 commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@hxy91819

hxy91819 commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=42999ea735a57cc1422ba6f3010a95b61f8a38e1)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-07-02T06:47:16Z
Merge commit: f2fc64e0bc74

What merged:

  • The branch adds a pause-history check so newer authorized maintainer autofix/automerge comments can resume paused PRs while bot and replay paths stay blocked, with regression coverage.
  • Reproducibility: yes. by source inspection: current main blocks paused mode replay whenever a pause label an ... pause labels for a later maintainer command. I did not execute the router because this review is read-only.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix: block stale maintainer pause replays

The automerge loop is complete.

Automerge progress:

  • 2026-07-02 06:41:15 UTC review queued 42999ea735a5 (queued)
  • 2026-07-02 06:47:07 UTC review passed 42999ea735a5 (structured ClawSweeper verdict: pass (sha=42999ea735a57cc1422ba6f3010a95b61f8a3...)
  • 2026-07-02 06:47:18 UTC merged 42999ea735a5 (merged by ClawSweeper automerge)

@clawsweeper clawsweeper Bot added clawsweeper:automerge Maintainer opted this ClawSweeper PR into bounded ClawSweeper-reviewed automerge status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 2, 2026
@clawsweeper clawsweeper Bot merged commit f2fc64e into main Jul 2, 2026
11 checks passed
@clawsweeper clawsweeper Bot deleted the feature/automerge-resume-paused-pr branch July 2, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this ClawSweeper PR into bounded ClawSweeper-reviewed automerge merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant