Repository navigation
feat(github): support asynchronous PR merges - #163579
Conversation
|
🦞👀 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. |
|
Codex review: blocked before merge. Reviewed October 6, 2026, 8:12 AM ET / 12:12 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR adds asynchronous squash-merge submission, saved request identifiers, polling and recovery to OpenClaw’s PR landing scripts, with lifecycle coverage and GitHub skill guidance. Merge readiness⛔ Blocked before merge - 2 items remain The corrective head resolves the prior protected-wrapper finding, and the supplied authority-boundary proof is sufficient. The feature remains absent from current main; the prerequisite Octopool correction remains unmerged. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s PR landing scripts consume reviewed commits and GitHub admission evidence, then submit merges through the configured GitHub wrapper. Retained outcomes govern reconciliation, completion comments and cleanup. flowchart TD
A[Reviewed PR head] --> B[Admission checks]
B --> C[Retained merge intent]
C --> D[Protected GitHub wrapper]
D --> E[GitHub asynchronous merge]
E --> F[Saved request and polling]
F --> G[PR and tree verification]
G --> H[Completion and cleanup]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +179, Docs +52, Other +150. Total +381 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Coordinate the wrapper upgrade with this feature while preserving head-pinned admission, durable reconciliation and verified completion. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: current main lacks this asynchronous lifecycle, and the supplied wrapper evidence directly exercises the corrected authority boundary. Is this the best way to solve the issue? Yes. Extending the existing dispatch and retained-outcome owners is a focused approach, provided the protected-wrapper prerequisite lands first. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bfde36e86028. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Head ca07a71 requires the async structural guard before dispatch. Dependency fix and protected-wrapper allowed/rejection proof: openclaw/octopool#231 . The PR body includes the installed older-wrapper reproduction and actual OpenClaw-to-Octopool zero-child refusal proof. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* feat(github): support asynchronous PR merges * test(pr): align merge fixtures with current API contract * fix(pr): require protected async merge authority
What Problem This Solves
OpenClaw's GitHub tooling does not yet support GitHub's generally available asynchronous merge requests.
User Impact
The protected-wrapper correction is implemented in Octopool PR #231. Async submission and polling now put
X-Octopool-Require: merge-async-v1first afterapi, before any option an older wrapper might delegate. Protected old wrappers refuse before rewriting or child GitHub I/O; use a build containing that Octopool fix. Never remove the marker, disable protection, or select a raw CLI to work around refusal. No Worker deployment or credential change is required.The dependency merged as c75889dc406b, with a landed tree identical to tested head 32fb0b8. Both Linux and Windows CI passed. OpenClaw current-head CI passed, and the native workflow squashed the exact reviewed head ca07a71 as 38ed3ed9ab42. Remote main contains the landed commit; native completion is verified.
Native immediate squash merges can submit a reviewed, head-pinned async request and resume by checking its saved UUID without submitting another merge. The bundled GitHub skill explains the same API and its queue and stack semantics.
Acceptance is not merge completion: existing PR, commit, and tree verification still gates completion and cleanup. Single-PR admission rejects stacks because GitHub can also merge open downstack PRs. Existing auto-merge, queue, admin, and alternate transport contracts remain in place.
Why This Change Was Made
Use GitHub's async merge API through the existing GitHub subprocess and merge-outcome owners. The request UUID is retained before polling; failures, conflicts, expired results, and lost replies require reconciliation instead of automatic resubmission.
The production growth is for the new API response contract and durable asynchronous request lifecycle. No new configuration, dependencies, or storage owner is introduced.
Evidence
Current candidate
ca07a714938ef35ec4c5979de4d74daa192bba4aadds the mandatory guard to async PUT and UUID GET, preserves its first-option ordering, and documents the upgrade contract. The earlier head0d3f50e6e62f6df0f73737a082b55013d0003abealready integrated mainc949e281be43f7f7cb590889b38eb34f41f2eade; its CI run passed 46 jobs. That is prior-head evidence, not current-head CI.e2eae0a) with a synthetic child: without marker, one child receivedrebase; marker-first exited 1 with zero children. Then ran this OpenClaw head's actualmerge-rest -> execPrGh -> PATH gh -> Octopoolpolling path: marker stayed first and the old wrapper refused with zero child GitHub calls.OPENCLAW_GH_BIN, withOCTOPOOL_GH_PATHretaining the original configured PATH writer. Binary SHA-256:28148b1df3d759ecf5ce566c44049ba13957c6029a32864c0c0d298db1d57caf. Existing policy/configuration and credential sources remain unchanged; no global install or Worker deployment occurred. OpenClaw's actual wrapper verified the same writer identity and a live merge-status GET returned HTTP 204. Current empty policy is pass-through; active-policy refusal is established by built-shim fixtures, not that live read.openclaw/ci-gatesucceeded. The exact-head ClawSweeper review has no code/security findings and accepts the authority proof. Its remaining dependency-first and configured-wrapper conditions are now both satisfied by the merged dependency and qualified scoped writer above. The OpenClaw head is unchanged; no rating-only re-review is requested.Earlier proof
status: merged, and its known merge commit. This checks the live endpoint contract; it does not claim a new async merge was executed.e687585a9c60741fd63ebb62ccafbddf78dcb87c, including the affected lifecycle suites, changed-file/boundary checks, lint, type checks, guards, and dependencies.Historical measured test cost
Observed on the prior
e687585a9c60hosted CI run; these are CI measurements, not an isolated local single-worker benchmark. Suite wall time is the test-file duration reported by Vitest. CI seconds measure the containing job from start to completion and include setup and any other suites in that job.These suites exceed 30 seconds because they exercise real Git repositories, supervised native subprocess dispatch, retained Git objects, compare-and-swap outcome updates, and operation-lock recovery. Pure response-parser mocks cannot prove those boundaries; the ten lightweight CLI cases cover the response contract separately. Shared test-support changes are covered by these four existing suites.