Skip to content

feat: edit verified pull requests without preparing source - #188904

Merged
shakkernerd merged 2 commits into
mainfrom
guest-pr-explicit-edit
Oct 31, 2026
Merged

shakkernerd merged 2 commits into
mainfrom
guest-pr-explicit-edit

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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_publish edit action accepts pullRequestUrl without 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:

Case Result
Linked guest edits their own PR from an ordinary conversation Read current metadata, then update the body using the observed head and expected body. No repository/worktree association or publication receipt created; default session directory, identity and configuration preserved.
Current maintainer edits another PR in that conversation Conditional body edit succeeds without a linked-author identity. The shared publisher is the PR author; this does not establish a different physical human from the author.
Following linked guest attempts an actual write to that PR Rejected by the edit owner's authorship check, with valid current preconditions. Both PRs and permissions unchanged.
Conversation already bound to a different PR Explicit-target title edit succeeds; the unrelated binding, two receipts and pending file bytes remain unchanged.

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, build 2026.10.9-cf47fe610004-2026-10-31T03-22-39.535Z. The metadata implementation and relevant owner contracts were qualified against review head 17ba16b3b6d3400c732ab6146e986573873adb55 after the required prerequisite rebases. This is retained behavior evidence, not execution of the newer dependency lock.

Visual evidence

Open preview

Before After
Explicit PR description edit is rejected by the URL guard The same PR description is updated through the shipped tool without preparing source

Submitted conditional edit request through settled result

p3-write-after.mp4

Visual verification

  • Baseline: 7df7ac751819fb52cebb518003855aea322ccbb9; explicit-URL guard and schema match baseline 899e747
  • Exact head: 17ba16b3b6d3400c732ab6146e986573873adb55
  • Scenario: An ordinary linked-guest conversation reads a verified PR and changes only its description using the observed head and body. No repository/worktree association is created; the ordinary default session root is retained.
  • Runtime/build: Captured on integrated runtime cf47fe610004ccd02a87ddd8f3dcd19797d54689, build 2026.10.9-cf47fe610004-2026-10-31T03-22-39.535Z. Metadata behavior is source-qualified to the preserved PR patches at 17ba16b; this is not execution of the newer target lock.
  • Before: The explicit URL is rejected before PR inspection or mutation.
  • After: One conditional body edit succeeds; target head, title, branches, open state and comments remain unchanged.
  • Source preservation: No managed source association or publication receipt is created; default sessionRoot and profile/config facts remain unchanged.
  • The 970×720 crops use the same 1280×720 viewport and theme. A fresh ordinary conversation under the same guest profile preserves the unbound condition after the original conversation acquired other work.
  • The baseline displays its native raw error; the after displays its native structured result. Values are fully legible; this comparison makes no layout claim.
  • Actual capture provenance remains cf47. Range-diff and metadata-owner/source-contract qualification bind retained evidence to the exact review head.
  • Live current-maintainer and following-guest controls, plus an unrelated bound-PR/pending-work control, passed separately. Controlled narrowed-scope and mid-call revocation evidence remains native-only with synthetic GitHub I/O.
  • All six selected PNGs and every frame of the four selected recordings were inspected. Redactions preserve decisive request and result fields; retained SHA-256 digests identify the inspected and uploaded bytes.
  • The write and denial recordings begin with an already-submitted request and show processing through the result; they do not show the Send click. The supplemental unrelated-target still is a normalized final state, not a matched transition.

The 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.

Explicit read Maintainer edit Guest write refused Unrelated association preserved
Read result Maintainer edit result Guest write refusal Explicit target result

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.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: M labels Oct 31, 2026
@shakkernerd shakkernerd self-assigned this Oct 31, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The edit rejects pullRequestUrl before inspecting the PR.
  • After: The description changes from “Adds a shipping status example.” to “Adds a shipping status example and documents its fields.” without importing source.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused implementation with credible shipped behavior evidence and distinct real-owner authority controls.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected shipped-tool images show the baseline refusal, successful explicit read/body edit, maintainer edit, and foreign-guest denial. Reported passing registered-action controls use real requester/session owners and synthetic GitHub I/O to establish revocation rejection before PATCH with zero writes. The integrated capture revision and its qualification limits are disclosed; unavailable video playback does not invalidate the inspectable images and authority controls.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An authorized metadata-only request fails unless the conversation first prepares source or has a publication receipt.
Reason: Maintainer-authored direction removes unnecessary workspace preparation while retaining the existing verified-author and operator boundaries.

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
Reviewed head: 17ba16b3b6d3400c732ab6146e986573873adb55

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Metadata target selection changes intended behavior with a stated reason (d14bb91: Metadata editing was separated from source publication and initially restricted to the session’s published PR.)
  • Imported-target validation and source write eligibility changes intended behavior with a stated reason (4f9aa4c: Imported actions retained verified identity and target checks while using source-write preflight for bound PR operations; this PR explains why explicit metadata edits do not require source push permission.)
  • Current-head metadata preconditions keeps the original intent (f9c535c: Metadata edits use the freshly observed head rather than requiring equality with a historical publication receipt.)
  • Generated protocol validation keeps the original intent (f52fb07: Fixed-schema predicates are generated from canonical schemas instead of compiled at runtime; the predicate change matches the added optional schema field.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit d14bb91 adds src/gateway/github-publication-actions.ts:140 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d14bb91c7c97; files: src/gateway/github-publication-actions.ts)

PR surface

Source +72, Tests +230, Docs +13, Other +2. Total +317 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 101 29 +72
Tests 3 247 17 +230
Docs 1 19 6 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 11 369 52 +317

Review metrics

Metric Value Why it matters
Protocol addition 1 optional edit parameter pullRequestUrl selects an explicitly verified target; no configuration option or persisted association is added.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A focused improvement removes unnecessary source preparation from authorized PR metadata edits.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-31T01:14:13.604Z sha bb87cc325cf7d74f9727daf44c910b3e9dbec086 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-31T05:20:39.934Z sha 17ba16b :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 1:27 AM ET / 05:27 UTC (Revision 3).

@shakkernerd
shakkernerd force-pushed the guest-pr-maintainer-assistance branch from 040d7f9 to cf8c2ee Compare October 31, 2026 02:53
@shakkernerd
shakkernerd force-pushed the guest-pr-explicit-edit branch from 1baf6a1 to a02dc50 Compare October 31, 2026 03:15
Base automatically changed from guest-pr-maintainer-assistance to main October 31, 2026 03:24
@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Oct 31, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@shakkernerd
shakkernerd merged commit 526371e into main Oct 31, 2026
254 of 257 checks passed
@shakkernerd
shakkernerd deleted the guest-pr-explicit-edit branch October 31, 2026 06:14
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Added: authorized PR title and description edits by URL without importing source or replacing the session workspace.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…188904)

Explicit PR title and description edits now work without importing source, while preserving current-requester checks and existing workspace associations.
RomneyDa added a commit that referenced this pull request Nov 17, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant