Repository navigation
improve: hand pending PR checks to GitHub auto-merge - #154307
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 September 20, 2026, 11:26 PM ET / September 21, 2026, 03:26 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR lets the native landing workflow submit GitHub auto-merge while required checks are pending, updates agent instructions and regression coverage, and applies the existing Node shutdown policy to release-check test children. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the maintainer-requested handoff remains absent from main and the latest release. No introduced correctness defect was found, but the documented release-check timeout investigation remains incomplete. Priority: P2 Review scores
Verification
How this fits togetherThe native PR tooling consumes review records, prepared commits, and GitHub checks to submit merge requests. GitHub then enforces repository rules, while the tooling retains request state for reconciliation and cleanup. flowchart TD
A[Completed PR review] --> B[Prepare exact head]
B --> C[Record pending checks]
C --> D{Required checks failing?}
D -->|Yes| E[Stop submission]
D -->|No| F[Submit pinned merge request]
F --> G[GitHub enforces merge rules]
G --> H[Retain outcome for reconciliation]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +193, Docs +20, Other +44. Total +257 across 12 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one native merge owner for pending and completed-check modes, with GitHub enforcing required gates and retained records distinguishing acceptance from completion. Do we have a high-confidence way to reproduce the issue? Not applicable to the primary workflow enhancement: main and the latest release explicitly reject pending checks. The separate release-check timeout was not reproduced in this read-only review. Is this the best way to solve the issue? Yes: extending the existing preparation and merge owners avoids a competing scheduler, preserves completed-evidence modes, and delegates waiting to GitHub's enforced rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d6b6253b965d. LabelsLabel justifications:
EvidenceWhat 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 (1 earlier review cycle)
|
Closes #154304
What Problem This Solves
Agents wait for CI and repeatedly read GitHub before requesting auto-merge, so the native workflow gets little benefit from GitHub owning the wait.
User Impact
After completed review, agents can submit one prepared-head auto-merge request and stop polling while GitHub waits for required checks and reviews. Already failing required checks still block submission; no admin bypass is added.
Why This Change Was Made
The agent default now uses
OPENCLAW_PR_GATES_REMOTE=github scripts/pr prepare-run <PR>followed byscripts/pr merge-run <PR> --auto-merge. Pending preparation never claims successful proof. The existing merge owner admits GitHub's pending-checkBLOCKEDstate, preserves contributor attribution and uncertain-request recovery, and returns an accepted pending outcome without a watcher.This mode relies on the enforced PR
openclaw/ci-gate(CI plus applicable security review), replacing separate scheduled Testbox proof. Completed-evidence modes remain available. Head matching applies at submission; GitHub can retain auto-merge after a later collaborator push, so a changed head is new review work.Evidence
Required checks are still pending; preparation regressions also fail against original owners.--auto --match-head-commitrequest, reads required checks once, performs no hosted verification/CI watcher, retains pending state, and does not comment or clean up early.openclaw/ci-gatebound to GitHub Actions, stale approvals dismissed on push. No repository setting or enforced rule changed.Local test cost (single worker, repository test wrapper):
pr-prepare-gates.test.ts11.49 s wall (80 tests);pr-merge-hosted.test.ts59.42 s wall (24 tests); selectedpr-merge-outcome.test.ts62.43 s wall (32 tests, 341 skipped). The two longer fixtures exercise real Git, Bash, the process lock, and retained dispatch/recovery state; a mocked helper would not prove that handoff. Fixtures reuse suite setup. CI run 35554464414: preparation test bodies totaled 5.320 s (80 cases); hosted handoff bodies 22.272 s (24 cases), including 4.053 s for the seven new pending-handoff rows; the full 373-case merge-outcome file took 442.50 s wall. The failed release-check case took 120.089 s. Per-file wall times for preparation, hosted handoff, and release-check were not emitted by the verbose CI reporter.Release-check fixture repair
The sparse release-check fixture now applies the existing test runtime policy to its Node CLI children. Those children previously omitted
--no-concurrent-sparkplug, leaving their explicit error exits exposed to the documented Node 24 compiler shutdown deadlock. The existing sparse-import probe now verifies the child's actual runtime arguments; no extra process, timeout increase, retry, or weaker package assertion was added.The new probe failed on the original child-launch code and passes with the repair. On exact CI Node 24.19.0, all 20 standalone full-file runs passed (14 tests each; 22.212–37.992 seconds wall, mean 25.971 seconds). All three full original-order shard runs passed: 31 files and 934 tests each (two intentional skips), in 404.80, 412.37, and 441.79 seconds. The formerly timing-out case took 19.717, 19.259, and 19.112 seconds. The observed file order matched the original CI order in all three runs. Missing local dependency links and archive tools were repaired before counting the clean runs; no source changes or timeout increases accommodated the environment.
CI run 35554464414 timed out this case at 120 seconds. That intermittent timeout did not reproduce in the original-order baseline or ten standalone baseline repeats, so its precise cause remains unconfirmed; the reproduced defect is the missing child runtime policy. Exact-head CI run 35556981010 and Security Review passed. GitHub auto-merged this head as cdd01a1 at 2026-09-21 03:34 UTC; the remaining local shard repeats completed afterward. The cached failing log contains only the aggregate test timeout, without child command checkpoints or exit/close stacks, so it cannot distinguish import, execution, or shutdown.
Follow-up: the same release-check120-second timeout recurred in CI run35559425575 on the subsequent API-fallback PR#154376. The Node runtime-policy omission was real, but its repair is insufficient to resolve the intermittent timeout. Child-process investigation continues there; the earlier passing repetitions do not establish causality.