Repository navigation
feat: edit verified pull requests without preparing source - #188904
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: needs maintainer review before merge. What this changesThis PR allows authorized callers to edit a verified PR’s title or description by URL without preparing its source. Example: A linked guest updates shakkernerd/openclaw-guest-pr-demo#85 from an ordinary conversation.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a useful, maintainer-approved capability missing from current main, with no actionable code findings; the required CI rollup remains unresolved. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe github_publish tool sends metadata requests to the Gateway, which verifies requester and PR authority, applies conditional GitHub edits, and returns observed metadata. flowchart LR
A[Conversation request] --> B[GitHub publish tool]
B --> C[Gateway action owner]
C --> D[Verified PR inspector]
D --> E[Current requester authority]
C --> F[GitHub metadata API]
F --> G[Observed edit result]
Technical reviewBest possible solution: Use the existing verified inspector and metadata owner for explicit targets while preserving session associations and live authority checks. Do we have a high-confidence way to reproduce the issue? Current main rejects edit requests containing pullRequestUrl at the tool guard, matching the supplied baseline screenshot. Is this the best way to solve the issue? The implementation is appropriately narrow: explicit target verification feeds the existing conditional edit path without creating another permission policy or persistent owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b513040e6606. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +72, Tests +230, Docs +13, Other +2. Total +317 across 11 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 31, 2026, 1:27 AM ET / 05:27 UTC (Revision 3). |
040d7f9 to
cf8c2ee
Compare
1baf6a1 to
a02dc50
Compare
a02dc50 to
17ba16b
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Added: authorized PR title and description edits by URL without importing source or replacing the session workspace. |
…188904) Explicit PR title and description edits now work without importing source, while preserving current-requester checks and existing workspace associations.
Allow initial guest PR preparation from the recorded project's published history while preserving unpublished work and original PR identity. (cherry picked from commit 2757947) Stable adaptation: preserve the existing linked-identity fixture; expand its options type and allocate exactly 89 regression LF instead of 84. Production and documentation patches are unchanged from the source. Companions: #188785 is present-equivalent. Later #188784, #190223, #190576, #190542, #195413, #197229, #197243, #199717, #195787, #197510, #193664, #199851, #199864, #197656, #198851, #193873, #197594, #189006, #188904, #194025, #196200, #192283, #189010, #188816 and e0466ff are not prerequisites to this scoped repair; retain their separate intake dispositions. No later PR-number mentions. Proof: baseline 4 failed/20 passed through registered agent action; fixed 41/41 across preparation, refresh and base-action suites. Type-aware lint4, formatting5, docs MDX1419 and diff check pass. No live GitHub or full release qualification claim. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Editing a pull request's title or description currently requires a prepared PR workspace or a completed publication in the conversation. The tool rejects an explicit PR URL before verification, so an unavailable or failed source preparation also blocks a metadata-only request.
User Impact
The existing
github_publishedit action acceptspullRequestUrlwithout a repository or worktree association. Guests can edit a verified PR they own, and current authorized maintainers can help through the existing inspection policy. An explicit URL selects that PR for the request and preserves any existing conversation workspace or PR association.Callers read the metadata first, then repeat the URL with the observed head commit and expected title or body. The existing concurrent-edit checks and attribution protection still apply. This action does not import source, commit changes, push a branch, or change the PR's state.
Why This Change Was Made
The edit action now resolves an explicit target through the existing verified PR inspector and uses its observed details in the existing metadata-edit path. That keeps target identity, current-requester authorization, field preconditions and uncertain-response reconciliation together. Metadata edits can proceed when the source fork is gone or source-push permission is unavailable, provided the PR can still be verified and GitHub accepts the metadata operation.
This contribution builds on merged #188784 for current maintainer eligibility and the imported-PR receipt boundary. It adds no persistent PR association or separate permission policy. Canonical tool guidance and GitHub identity documentation describe the explicit read/write contract.
Evidence
The regression failed at the explicit-URL guard on the baseline while all 16 existing owner cases passed. The real guest flow reproduced the same read and conditional-write refusal.
The real agent/tool/GitHub path then passed these cases:
Focused formatting, lint, affected Gateway test types and all 78 cases across action, adoption, tool and prompt-prefix files passed. Session and requester owners are real; GitHub I/O is synthetic in these tests. Coverage includes unauthorized/private/stale targets, a deleted source fork, concurrent-edit guards, requester revocation before PATCH with zero writes, and reconciliation after a lost response. Narrowed selected scope and immediate pre-PATCH revocation were not exercised live; their native owner tests remain distinct from the live guest-denial case. Schema and unchanged consumer checks retain their qualified passing results.
The action file passed 33 cases in 81.89 seconds and adoption passed four in 63.36 seconds; the exact 230 net test lines are allocated. Current CI is green. The initial 16 KB Android attempt failed during SDK installation before product tests. Its unchanged-workflow recovery executed all 13 native cases with zero failures, errors or skips, including the measured 16 KB page-size check and production TLS cases.
The live captures use integrated source
cf47fe610004ccd02a87ddd8f3dcd19797d54689, build2026.10.9-cf47fe610004-2026-10-31T03-22-39.535Z. The metadata implementation and relevant owner contracts were qualified against review head17ba16b3b6d3400c732ab6146e986573873adb55after the required prerequisite rebases. This is retained behavior evidence, not execution of the newer dependency lock.Visual evidence
Submitted conditional edit request through settled result
p3-write-after.mp4
Visual verification
17ba16b3b6d3400c732ab6146e986573873adb55The write recording shows the submitted request through its settled result; it does not include the Send click. Before/after use the same crop and theme, with native Raw error versus Tree result views. The fresh conversation preserves the ordinary unbound condition; no layout comparison is claimed.
Read recording · Maintainer edit recording · Guest write refusal recording
The unrelated-target image is a normalized final-state capture; retained state assertions establish binding and file preservation. The denial recording starts after submission and shows the decisive authorship refusal; its secondary guidance extends beyond the visible panel.