Repository navigation
fix: recover uncertain auto-merge requests on the same PR - #157197
roboclaw-bot wants to merge 3 commits into
Conversation
Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
OpenClaw-Publication: 2d7322ff-1237-4c88-b314-977691824991 Co-authored-by: steipete <[email protected]>
f65842a to
8901a67
Compare
|
Codex review: needs real behavior proof before merge. Reviewed September 24, 2026, 7:52 AM ET / 11:52 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds a native maintainer command to suspend an uncertain auto-merge attempt, protect the reviewed PR head during release from draft, and require a separate explicit merge recovery. Merge readiness⛔ Blocked before merge - 6 items remain Keep this PR open. Current main lacks this recovery path, and the overlapping open PR is not a proven replacement. The current source addresses the prior head-change finding, but the required GitHub lock has not been installed or proven to reject an unreviewed push. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's native PR workflow combines GitHub PR state, retained merge outcomes, review records, and CI results before requesting draft, ready, or merge transitions. It records the outcome so an interrupted request can be reconciled without blindly repeating it. flowchart LR
A[Uncertain auto request] --> B[Retained outcome]
B --> C[Draft barrier]
C --> D[Reviewed head and CI]
D --> E[Head branch lock]
E --> F[Ready transition]
F --> G[Explicit merge recovery]
G --> H[Verified merge receipt]
Decision needed
Why: The proposed safety boundary depends on repository policy that the PR does not create and that the available live evidence says is absent. Before merge
Findings
Agent review detailsSecurityNeeds attention: The code now checks a head-write fence, but the live GitHub enforcement needed at the ready transition remains unproved. PR surfaceTests +753, Docs +50, Other +316. Total +1119 across 14 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the reviewed head under a verified, administrator-enforced GitHub write lock through readiness and settlement, then restore only the task-owned protection change after the merge receipt is confirmed. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main refuses recovery of an unaccepted auto intent without qualified refusal evidence. This read-only review did not execute the native workflow. Is this the best way to solve the issue? Unclear pending live enforcement proof. The draft barrier and head-lock checks form a coherent path, but the critical GitHub rejection behavior has not been observed with an installed rule. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 074198a6341a. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
Require an existing administrator-enforced read-only branch lock through readiness and settlement. Read the effective policy through the managed maintainer's GraphQL contract without changing repository permissions. Co-authored-by: steipete <[email protected]>
|
This pull request has been automatically marked as stale due to inactivity. |
Related: #156743
What Problem This Solves
Fixes: a network failure during auto-merge submission can leave the native PR workflow unable to retry or cancel, stranding the original pull request.
User Impact
Maintainers can recover on the same PR without deleting the uncertain attempt record or closing and replacing the PR. Recovery requires explicit operator action and preserves normal review, identity, and CI gates.
Why This Change Was Made
An uncertain auto request is neither a rejection nor a confirmed active request. The existing retry and cancellation paths correctly refuse to guess, but offered no way to make progress.
The new path records and confirms a GitHub draft barrier, keeps the PR unmergeable during repair and exact-head verification, then records a replacement-bound readiness transition. Only a separate explicit recovery can request an immediate merge. Lost responses are reconciled without repeating mutations.
Draft is a no-merge barrier, not proof of historical non-execution or a request-generation fence. Because readiness has no atomic expected-head parameter, release now additionally requires an existing, exact-pattern, administrator-enforced read-only lock on the head branch. Force pushes, deletion, and fork syncing must be disabled. The native owner verifies and retains the effective rule identity through readiness and settlement; it never creates, relaxes, removes protection, or deletes the protected branch. A repository administrator owns the narrowly scoped lock setup and restoration—no additional bot privileges are requested.
Evidence
recoveryModecontract; the public CLI always selects ordinary verification. Poisoned-environment regression failed before the correction and passes afterward. Final affected verification/recovery suites: 86 passed.8901a678cd710905843558d51b1ba31d83700f88: draft → ready → draft → ready. Fresh API reads confirmed each state with the same head and no auto-merge request. The draft event intentionally superseded the first CI start; the final ready state owns the landing run. No auto-merge mutation or original-PR mutation was used for this proof. Native interrupted/lost-response behavior remains covered by the isolated fixtures, not a fabricated live failure.Head-change review correction
ref.branchProtectionRulecontract. Repository, ref, head, writer permission, rule identity/pattern and lock flags are bound; an independent canonical Git-ref read follows. Null, forbidden, partial-error, wrong identity, changed-rule and head-drift responses fail closed.roboclaw-bothasMAINTAINaccess to the exact query and the expected ref/head. It returned a null rule because no lock is installed. A non-null installed lock and live rejected-push proof remain pending an administrator-owned, create-only rule on this task’s head branch. No policy or role changes have been made.107602780389stopped during the architecture check because its runner received a shutdown signal; the log shows no source assertion failure before termination. The new head requires fresh CI.Worked on by
Work sessions
View the OpenClaw team session