Skip to content

fix(automerge): preserve maintainer resume intent#680

Merged
hxy91819 merged 1 commit into
mainfrom
feature/automerge-already-enabled-resume
Jul 18, 2026
Merged

fix(automerge): preserve maintainer resume intent#680
hxy91819 merged 1 commit into
mainfrom
feature/automerge-already-enabled-resume

Conversation

@hxy91819

Copy link
Copy Markdown
Member

Root cause

When automerge was already labeled and had an existing job/status, a fresh authorized @clawsweeper automerge command was recorded as skipped. Canonical needs-human exact reviews only recognize executed or waiting maintainer automerge ledger entries, so the explicit retry could not resume landing and the PR was paused for human review.

Fix

Record an authorized human replay as an executed no-op resume intent. Keep trusted-bot label sweeps skipped so automation cannot manufacture maintainer approval. All exact-head, checks, merge-state, security, and match-head gates remain unchanged.

Proof

  • Focused old/new production-flow E2E: the fix(automerge): merge ready behind heads directly #679 candidate returns skipped; this candidate records resume intent and merges the same direct-behind canonical-verdict scenario.
  • pnpm run build:repair
  • node --test dist/repair/comment-router-core.test.js
  • pnpm run check (local run started; all completed stages green at PR creation)
  • autoreview: clean, 0 actionable findings, patch is correct (0.87)
  • gitleaks: no finding in the three changed files; repository-wide existing findings are outside this diff.

@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

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Review the exact production fix head before merge. Focus on whether recording an authorized human replay as resume intent preserves trusted-bot and exact-head safety boundaries.

@clawsweeper

clawsweeper Bot commented Jul 18, 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.

Re-review progress:

@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 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 6:00 PM ET / 22:00 UTC.

Summary
The branch records an already-enabled authorized human automerge replay as an executed no-op resume intent while preserving skipped outcomes for trusted-bot sweeps.

Reproducibility: yes. source-reproducible with medium confidence: the prior classification visibly returns skipped when automerge is already enabled, while the existing approval predicate recognizes executed or waiting maintainer automerge entries. A completed production-flow run is still needed to confirm the full external path.

Review metrics: 2 noteworthy metrics.

  • Patch surface: 3 files affected; 62 added, 4 removed. The change is limited to command classification, terminal acknowledgement, and focused regression coverage.
  • Authorization regression cases: 2 explicit outcomes. The test separately covers human replay as executed and trusted-bot replay as skipped.

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:

  • Confirm the completed production automerge flow and pnpm check results on the current head before merging.

Risk before merge

  • [P1] This changes an executed ledger signal that canonical landing review consumes as maintainer intent; merge only after the production automerge flow confirms exact-head, checks, and trusted-bot boundaries remain fail-closed.

Maintainer options:

  1. Complete the real automerge-flow gate (recommended)
    Wait for the production automerge flow to pass on this exact head before merging because this patch changes the authorization ledger consumed by landing automation.
  2. Pause if the flow exposes a boundary regression
    Do not merge if the integrated flow permits trusted-bot label activity to record resume intent or bypasses the existing exact-head and check gates.

Next step before merge

  • Review the completed production automerge-flow result and approve this member-authored change through normal maintainer review; there is no narrow repair finding to dispatch.

Security
Cleared: The patch changes internal command-status handling only; it adds no dependency, workflow permission, secret, artifact-download, or external execution surface.

Review details

Best possible solution:

Retain the narrow human-versus-trusted-bot distinction, land it only after the completed production flow proves a human replay can resume an exact reviewed head without allowing label sweeps to manufacture approval.

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

Yes, source-reproducible with medium confidence: the prior classification visibly returns skipped when automerge is already enabled, while the existing approval predicate recognizes executed or waiting maintainer automerge entries. A completed production-flow run is still needed to confirm the full external path.

Is this the best way to solve the issue?

Yes, conditionally: recording a human replay as a terminal executed no-op is the narrowest way to preserve explicit resume intent while leaving trusted-bot sweeps skipped; the integrated production-flow check should verify the unchanged safety gates before merge.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 06552f27f8ba.

Label changes

Label changes:

  • add P2: This is a bounded correctness change in merge automation that can affect contributor landing flows but is not an emergency outage.
  • add merge-risk: 🚨 automation: The patch changes the command-status ledger that controls whether automerge review resumes landing.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 is a member-authored internal automation PR, so the external-contributor real-behavior-proof gate does not apply; completed production-flow check evidence should still be reviewed before merge.

Label justifications:

  • P2: This is a bounded correctness change in merge automation that can affect contributor landing flows but is not an emergency outage.
  • merge-risk: 🚨 automation: The patch changes the command-status ledger that controls whether automerge review resumes landing.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 is a member-authored internal automation PR, so the external-contributor real-behavior-proof gate does not apply; completed production-flow check evidence should still be reviewed before merge.
Evidence reviewed

What I checked:

  • Narrow authorization split: The new helper returns an executed resume-intent outcome only when trustedBot is false, while trusted-bot replays retain the existing skipped outcome; the command router uses that helper only for commands blocked because the repair-loop mode is already enabled. (src/repair/comment-router-core.ts:704, b0724293a282)
  • Acknowledgement follows new terminal outcome: The router expands terminal maintainer-command acknowledgement from only skipped to both executed and skipped statuses, so a human no-op resume command receives the same terminal handling without entering the ready-command execution path. (src/repair/comment-router.ts:2764, b0724293a282)
  • Focused regression coverage: The added test distinguishes human and trusted-bot outcomes and verifies that the recorded human automerge entry satisfies the existing needs-human approval predicate. (src/repair/comment-router-core.test.ts:44, b0724293a282)
  • Adjacent current-main provenance: The related direct-BEHIND automerge change was merged as current main commit 06552f27f8ba184c1008a9856247c99ffd5d7216 from fix(automerge): merge ready behind heads directly #679; this PR is a follow-up for the resume path that the earlier change exposed. (src/repair/comment-router.ts:1071, 06552f27f8ba)
  • Automation validation remains pending: The provided PR check state shows the production automerge flow and pnpm check runs still in progress, so the claimed real production-flow result is not yet independently confirmed by completed check evidence. (b0724293a282)

Likely related people:

  • hxy91819: Authored the adjacent direct-BEHIND automerge implementation already merged to current main and this follow-up resume-intent path. (role: recent area contributor; confidence: high; commits: 06552f27f8ba, b0724293a282; files: src/repair/comment-router.ts, src/repair/comment-router-core.ts, src/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.

@hxy91819
hxy91819 merged commit 3f2bcaa into main Jul 18, 2026
13 checks passed
@hxy91819
hxy91819 deleted the feature/automerge-already-enabled-resume branch July 18, 2026 22:10
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