fix: require verified provenance for main-implemented PR closes - #1212
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 4:15 PM ET / 20:15 UTC. ClawSweeper reviewWhat this changesThe PR hardens implementation-based PR closeouts by requiring verified merged-PR provenance, formal linked-issue evidence, and fresh checks before paired GitHub mutations. Merge readinessKeep open for normal maintainer merge review: no actionable correctness or security defect was found, and the current-head production transport proof covers both accepted and revoked-provenance paths. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherClawSweeper’s apply lane turns reviewed reports into GitHub closeout actions. This change verifies the canonical implementation and linked issue immediately before closing the issue and then its redundant PR. flowchart LR
A[Reviewed closeout report] --> B[Apply eligibility checks]
B --> C[Verified fixing PR]
C --> D[Formal linked issue check]
D --> E[Final freshness and lease check]
E --> F[Close linked issue]
F --> G[Close redundant PR]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the fail-closed provenance and paired-close sequence, leaving candidates without a current formal GitHub closing relationship open for ordinary maintainer review. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a PR, and its supplied exact-head production transport proof exercises the changed apply path with accepted and rejected provenance fixtures. Is this the best way to solve the issue? Yes: querying GitHub’s formal closing relationship and rechecking it under the linked issue’s mutation lease is narrower and safer than inferring close authority from commits or cross-references. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2da70c23b043. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (21 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
610a49e to
7ed7b6d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4313bf3 to
95eba9f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
cecd1da to
81e2845
Compare
|
@clawsweeper review Current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Fail closed when ClawSweeper considers closing a redundant implementation PR and its one linked originating issue. The apply path now requires verified canonical implementation evidence, an independently reviewed paired issue, a live formal GitHub closing relationship, and final eligibility checks immediately before mutation.
Canonical evidence and live disposition
The redundant candidate is openclaw/openclaw#78035. The canonical implementation is openclaw/openclaw#126530, merged at
3fe833dfa4084ad79d4545093f39f192c2108317.The originating issue is openclaw/openclaw#77897. A live GitHub GraphQL read shows that #126530 is merged, #77897 is still open and has generic
CrossReferencedEvententries, but #126530 has noclosingIssuesReferences(excludeUserLinked: true)entry for #77897. Therefore this real target intentionally remains open: matching behavior, prose, or a generic cross-reference is not sufficient authority for paired destructive closeout.Authorization and closeout behavior
PullRequest.closingIssuesReferences(first: 100, excludeUserLinked: true)relation instead of acceptingCrossReferencedEventtimeline entries.updated_atafter ClawSweeper's verified self-comment, while still rejecting any title, body, metadata, lock, label, bot, or human activity drift.Real GitHub transport proof
Claim. The production apply owner sends no close request for a generic-reference-only canonical PR, but closes an independently reviewed exact same-repository issue/PR pair in issue-before-PR order when the merged canonical PR formally closes that issue.
Exact environment. AWS Crabbox Linux
c7a.8xlarge, runrun_9f4a31ad720a, leasecbx_f3ae7fc12be1(jade-crayfish), exit 0; the lease was released and no AWS Crabbox leases remain. The raw remote checkout was reconstructed from a verified Git bundle containing current heade229f5f4676b8353401779109bf39499dba28fb0and base2da70c23b043609f338c2b05eb2d5d7f091946f3. The harness then verified the exact committed blob OID for every changed file before enabling mutation.The run downloaded official GitHub CLI
2.88.1and verifiedgh_2.88.1_linux_amd64.tar.gzagainst the official release checksum36352a993b97e9758793cdb87f9ba674bd6d88c914488e122be78a1962203803, installed the frozen lockfile, ranpnpm run build:all, and invoked the built production apply path through the realghtransport.The proof reused the existing personal E2E repository brokemac79/clawsweeper-e2e-target-target; it did not create a repository under
openclaw.Rejected lane:
Related to #15.Accepted lane:
Merged canonical PR #9 formally says
Fixes #14.The production path closed issue #14 before candidate PR #16, then verified both durable archives (
14.md,16.md).Final-boundary revocation lane:
After the initial valid provenance checks, the harness reopened Limit protected audit failures to live records #14/fix: wrap JSON.parse in ghJson/ghJsonLines with contextual error messages #16 and changed canonical PR Publish audit health in README #9 from
Fixes #14toRelated to #14on the second linked-issue mutation lease.The production apply path re-read formal provenance under that lease immediately before the issue-close side effect, rejected the close, and the real transport wrapper observed zero close requests.
Issue Limit protected audit failures to live records #14 and candidate PR fix: wrap JSON.parse in ghJson/ghJsonLines with contextual error messages #16 both remained open. The harness restored canonical PR Publish audit health in README #9 to
Fixes #14in afinallyblock and verified the restored fixture afterward.Proof boundary. The live run used the personal
brokemac79GitHub token and configured that identity as the trusted E2E comment author. The fixtures and review records are intentionally synthetic. This proves production apply behavior and actual GitHub API side effects through the real transport, but it does not claim deployed GitHub App authentication equivalence.Validation and review
pnpm run build:allpassed.apply-label-sync, PR coverage recheck, fixed-SHA resolution, paired close, and retry policy.pnpm run check:staticpassed inrun_226719f08cde, including the full 744-file format check.node --test test/fixed-sha-pull-resolution.test.tspassed: 18/18.git diff --checkpassed.origin/mainfound no actionable correctness issue.2da70c23b043609f338c2b05eb2d5d7f091946f3, heade229f5f4676b8353401779109bf39499dba28fb0found no discrete correctness or security defect and reported overall correctnesspatch is correct.git rebase origin/mainis a no-op: the branch contains current base2da70c23b043609f338c2b05eb2d5d7f091946f3and is 0 commits behind.Bay impact
OpenClaw Bay is unaffected: this changes internal apply-time GitHub closeout authorization and record sequencing, not Bay data contracts, routes, rendering, or controls.