Repository navigation
fix(review): gate merges on attached verification - #1271
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 10:10 PM ET / August 28, 2026, 02:10 UTC. ClawSweeper reviewWhat this changesThe branch makes an attached live-verification receipt an identity- and plan-bound input to review status, labels, comment routing, and the final automerge decision. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this PR open for normal maintainer landing review: it is not on current main, its receipt-validation and final exact-head gate are coherently implemented, and the supplied real GitHub final-effect trace addresses the prior authority-proof blocker. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherClawSweeper turns a reviewed PR report and its live-proof receipt into labels and trusted review markers, then its comment router decides whether to invoke GitHub merge. This change makes the receipt state authoritative across those stages and refreshes the exact-head review immediately before merge. flowchart LR
A[Review report] --> B[Attached verification receipt]
B --> C[Identity and plan validation]
C --> D[Review marker and labels]
D --> E[Comment router]
E --> F[Final exact-head check]
F --> G[GitHub merge or pause]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the single authoritative receipt-validation path with its exact-head final gate, retaining the documented maintainer-owned recovery path for execution-environment failures. Do we have a high-confidence way to reproduce the issue? Not applicable as an issue report. The PR body supplies an after-fix production-router trace showing both an allowed real GitHub merge and a newer failed receipt blocking merge before I/O. Is this the best way to solve the issue? Yes. Binding receipts to the reviewed plan and re-reading the latest exact-head review at the final merge boundary removes the competing stale-metadata authority path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 78540e0458bf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Fixes an issue where ClawSweeper could render an attached live verification as failed while stale review metadata still emitted a pass/automerge verdict. The mismatch was visible on openclaw/openclaw#129535, where noisy build and bundler warnings appeared in the captured CLI output even though the attached verification was presented as passing.
Why This Change Was Made
Attached live verification is now an identity-bound authoritative input across report parsing, presentation, labels, trusted review markers, the comment router, and the automerge shepherd. Failed, malformed, legacy, action-only, stale-head, or superseded verification cannot authorize landing; the final merge gate refreshes the exact-head review and comments immediately before merge.
Execution-environment failures remain maintainer/infrastructure-owned and preserve any independently recorded contributor proof. Maintainer proof authorization is durable but scoped to the reviewed head and cannot bypass later findings, security decisions, checks, mergeability, or review state.
User Impact
Operators will no longer see warning-laden or otherwise failed proof treated as a successful merge signal. ClawSweeper now requires an observed
expect_textorexpect_outputresult before attached verification can clear the proof gate, and routes proof-runner setup failures to maintainers instead of contributors.OpenClaw Bay Impact
OpenClaw Bay is unaffected. This changes ClawSweeper review publication and automerge gating only; no Bay dashboard or data contract changes.
Documentation Impact
No public documentation change is needed. Existing ClawSweeper contributor guidance already requires observed real behavior, exact-head review, and current proof before landing; this repair makes runtime enforcement match that contract.
Evidence
FAILbut emitted<!-- clawsweeper-verdict:pass ... -->.needs-humanwithlive_verification=failed; trusted routing and the automerge shepherd both refuse the pass.expect_textorexpect_outputobservation is satisfied.status: needs maintainer proof decision, notstatus: needs proof.tsconfig.jsonandtsconfig.repair.json.git diff --checkpassed.pnpm run checkcannot run from this shared-module worktree because pnpm attempts dependency reconciliation; exact-head Linux CI is the full repository gate.Accepted review findings:
satisfied: true.Production LOC: +867/-195 (net +672) | Tests/test support: +1447/-52 (net +1395).
The production growth establishes one authoritative verification state and exact-head final gate across existing report, label, router, and automerge consumers. It replaces contradictory downstream interpretations rather than adding a compatibility fallback.
Real Behavior Proof
Claim: ClawSweeper does not merge from stale or failed attached verification, and a current exact-head pass still completes the automerge workflow.
Surface: Deterministic comment-router and automerge-shepherd workflow.
Scenarios:
resume-intent-persistence,approve-intent-persistence,final-review-failed-race, andfinal-review-malformed-racewith thetinyfixture.Command/environment:
Observed result: All four scenarios completed with
status: passed. Current exact-head review, resumed intent, and validated maintainer approval reached the merge path; a newer same-head failed or malformed verdict introduced during the final guard blocked merge before the GitHub merge command. Separate operator probes confirmed partial-plan and stale-plan receipts also route to human handling and emit no trusted pass.Artifact/trace: Local E2E output under
/tmp/clawsweeper-final-proof-gate-v4/tiny/resume-intent-persistence,/tmp/clawsweeper-final-proof-gate-approve-v2/tiny/approve-intent-persistence,test-results/automerge-proof-gate/tiny/final-review-failed-race, andtest-results/automerge-proof-gate/tiny/final-review-malformed-race.Hosted final-effect trace: GitHub Actions run https://github.com/openclaw/clawsweeper/actions/runs/33132164764, artifact
automerge-e2e-33132164764-1, records the production comment-router path at the merge boundary:openclaw-shaped/happy-path/08-comment-router.stdout.logrecordsaction: merge,status: merged,merge_method: squash, and merge commit2c7fe9a243371db877876911beffc34c40655813.openclaw-shaped/final-review-failed-race/08-comment-router.stdout.logrecordsaction: merge,status: blocked, reasonexact-head ClawSweeper review has failed live verification; itsgithub-state.jsonrecordsmergedAt: nullandmergeCommitSha: null.openclaw-shaped/final-review-malformed-race/08-comment-router.stdout.logrecordsaction: merge,status: blocked, reasonexact-head ClawSweeper review has malformed live verification; itsgithub-state.jsonrecordsmergedAt: nullandmergeCommitSha: null.Real GitHub final-effect trace: The unchanged candidate head was also run through
dist/repair/comment-router.jsagainst a dedicated private organization test repository using the native GitHub CLI 2.98.0 and a maintainer credential. The harness used the router's explicit trusted-actor injection only for the isolated fixture; repository, token, item, local path, and commit identifiers are redacted here.Allowed exact-head receipt:
Nearest forbidden receipt:
The fault was injected between the initial passing review read and the final snapshot. The production router therefore observed the revoked authority at its final owner boundary and rejected it before real merge I/O, while the paired allowed run reached and completed real GitHub squash-merge I/O.
Rank-up move applied: a refreshed failed exact-head verification was rejected before real merge I/O, and the paired valid exact-head verification reached the allowed final effect.
Limits: The live trace uses the production router and real GitHub transport in an authorized private test repository. It uses a maintainer credential with the fixture-only trusted-actor override rather than a ClawSweeper App installation token; it proves final-effect authorization and revocation ordering, not App-token issuance.
Release Note Context
No changelog edit. ClawSweeper's changelog is release-owned; this is an internal automation correctness repair.