Skip to content

Resume completed automerge verdicts safely - #691

Merged
hxy91819 merged 1 commit into
mainfrom
feature/automerge-verdict-resume
Jul 19, 2026
Merged

hxy91819 merged 1 commit into
mainfrom
feature/automerge-verdict-resume

Conversation

@hxy91819

Copy link
Copy Markdown
Member

Summary

  • re-dispatch the exact durable verdict when an automerge command reuses a completed review
  • preserve an exact-head maintainer approval across later verdict processing on the same head
  • add deterministic host/container E2E scenarios for lost verdict handoff and behind-then-resume approval

Root cause

Completed-review reuse only updated the repair timeline and did not requeue the already-published exact verdict. Separately, the repair-loop resume watermark ignored maintainer_approve_automerge, so a later needs-human verdict on the same reviewed head could close a gate the maintainer had already approved.

The new dispatch attempt is deterministic and remains bound to the exact item and durable verdict comment. Approval persistence remains bound to the explicitly approved head SHA and expires when the contributor head changes.

Validation

  • focused repair unit tests: 127/127 passed
  • host automerge E2E: approve-intent-persistence and completed-verdict-resume passed
  • Node 24 local-container E2E using clawsweeper-automerge-e2e-base:local: both scenarios passed
  • pnpm run check passed, including unit, repair, changed/full coverage, and formatting
  • local autoreview: 0 accepted/actionable findings
  • staged gitleaks scan: no leaks found

@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.

@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. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 2:03 AM ET / 06:03 UTC.

Summary
The PR re-dispatches a completed same-head automerge verdict, retains exact-head maintainer approval during later repair-loop processing, and adds unit plus automerge E2E coverage.

Reproducibility: yes. at source level: the described paths are directly covered by deterministic automerge E2E scenarios for completed-verdict resume and exact-head approval persistence, although this review could not independently execute them.

Review metrics: 2 noteworthy metrics.

  • Repair surface: 7 files affected; 240 additions, 13 deletions. The focused implementation and E2E additions alter automerge coordination rather than ordinary application behavior.
  • New end-to-end scenarios: 2 scenarios added. The scenarios cover both completed-verdict resumption and exact-head approval persistence.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
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:

  • Confirm the in-progress production automerge-flow check passes on the exact PR head.

Risk before merge

  • [P1] This changes durable automerge verdict routing; maintainers should verify the pending production automerge-flow check against the exact head before merge.

Maintainer options:

  1. Confirm production automerge flow (recommended)
    Wait for the exact-head production automerge-flow check, then merge if it verifies completed-verdict replay and exact-head approval persistence without duplicate dispatch.
  2. Pause if live behavior differs
    Hold the PR if the production flow exposes duplicate verdict routing or approval that persists across a changed contributor head.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Require the production automerge-flow check to pass on the current head before merging.

Next step before merge

  • No automated repair is needed: the PR already supplies a focused implementation, and the remaining action is ordinary exact-head maintainer/check review.

Security
Cleared: The reviewed diff changes local repair routing and test fixtures without adding dependencies, workflow permissions, secrets handling, downloads, or third-party execution.

Review details

Best possible solution:

Merge only after the exact-head production automerge-flow validation confirms that reused verdicts are delivered once and that a new contributor head still clears prior approval.

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

Yes, at source level: the described paths are directly covered by deterministic automerge E2E scenarios for completed-verdict resume and exact-head approval persistence, although this review could not independently execute them.

Is this the best way to solve the issue?

Yes, based on the supplied diff: reusing the durable exact verdict and binding approval persistence to the approved head is narrower than adding another review or broadening approval state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 05056e4df480.

Label changes

Label changes:

  • add P2: The PR repairs a bounded but important automerge workflow failure without evidence of an active user-facing emergency.
  • add merge-risk: 🚨 automation: The patch changes review dispatch and durable automerge-verdict routing, where an incorrect replay could affect automation behavior despite unit coverage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored repair PR reports real host and local-container E2E validation; the external-contributor proof gate does not apply.

Label justifications:

  • P2: The PR repairs a bounded but important automerge workflow failure without evidence of an active user-facing emergency.
  • merge-risk: 🚨 automation: The patch changes review dispatch and durable automerge-verdict routing, where an incorrect replay could affect automation behavior despite unit coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored repair PR reports real host and local-container E2E validation; the external-contributor proof gate does not apply.
Evidence reviewed

What I checked:

  • Focused repair scope: The patch changes the repair comment router and review-dispatch coordination so completed same-head reviews carry their durable comment ID into verdict re-dispatch, while approval resume state remains restricted to the exact approved head. (src/repair/comment-router.ts:2093, f39dd26e4e47)
  • Exact-head approval guard: The patch accepts maintainer approval as resume state only when the recorded approved head equals the command's reviewed head, preventing approval from surviving a contributor push. (src/repair/comment-router-core.ts:749, f39dd26e4e47)
  • Regression coverage: The PR adds focused unit coverage for exact-head approval expiration and E2E scenarios for behind-then-resume approval and completed-verdict resumption. (test/e2e/automerge/run.mjs:13, f39dd26e4e47)
  • PR validation statement: The PR body reports focused repair tests, deterministic host and local-container automerge E2E scenarios, and a passing repository check; the provided context does not include the raw artifacts, so this is supporting rather than independently replayed evidence. (f39dd26e4e47)

Likely related people:

  • hxy91819: Authored the focused automerge-resume patch and supplied the associated deterministic E2E validation context; broader current-main feature ownership could not be established from the available read-only inspection session. (role: current repair contributor; confidence: low; commits: f39dd26e4e47; files: src/repair/comment-router.ts, src/repair/comment-router-core.ts, test/e2e/automerge/run.mjs)
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.

@hxy91819
hxy91819 merged commit a4461d2 into main Jul 19, 2026
13 checks passed
@hxy91819
hxy91819 deleted the feature/automerge-verdict-resume branch July 19, 2026 06:11
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant