Skip to content

feat: edit session PR details without publishing source - #174945

Merged
shakkernerd merged 2 commits into
mainfrom
feat/pr-details-edit
Oct 17, 2026
Merged

shakkernerd merged 2 commits into
mainfrom
feat/pr-details-edit

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Changing an existing session PR's title or description currently requires a capability the publication tool does not expose. Passing a new body to ordinary publication republishes workspace changes while retaining the existing PR description. That can unintentionally include unfinished or untracked files in a request intended only to correct PR text.

User Impact

github_publish gains action: "edit" for the current session's existing open shared PR, including guest-created PRs. It resolves the latest completed publication within the current saved workspace binding, so a later failed source publication does not hide the existing PR. Closed PRs remain read-only. Call it without changes to read metadata, then supply only the fields to change with their observed values, publication request ID, and expected head. Omitted fields and the existing attribution/footer remain unchanged. Editing does not capture or publish workspace source and cannot change PR lifecycle state.

Why This Change Was Made

The existing Gateway action owner already binds the caller to the saved publication and rechecks current actor and publisher authority. This change adds metadata editing there and sends only title/body fields to GitHub. Stale observed values are rejected, and a lost write response is reconciled by reading the same PR. These are stale-input checks, not atomic GitHub compare-and-swap guarantees against simultaneous external edits.

Ordinary source publication keeps its existing semantics. Its tool help now explicitly says that title/body are creation-only, while guest landing and closure restrictions remain unchanged. No storage, configuration, or dependency migration is required.

Evidence

The registered tool/Gateway regression fails on the baseline with missing scope: operator.write. It uses the existing publication coordinator and a real dirty Git workspace; only remote GitHub transport is simulated. Candidate checks cover body-only and title-only edits, preserved HEAD/index/diff/untracked bytes, unchanged attribution, stale inputs, revoked authority, rejected writes, and a lost response followed by a repeat request.

Remote formatting/lint, protocol generation, and selected consumer type checks pass. The initial 42-file related batch passed 516 tests; unchanged results are retained. The review correction passed every selected compiler graph and 128 tests across the action suite and six related reader/registration files. It reproduces the pre-fix two-edit attribution bypass and metadata lookup failure after a rejected source publication on both workspace backends, then verifies the corrections.

pnpm test src/gateway/github-publication-actions.test.ts --maxWorkers=1 passed all 26 cases in 92.20 seconds wall time on the qualified remote runner. The six other related files passed 102 tests in 163.74 seconds through the native runner. These totals include setup and existing controls; the new cases reuse the persisted actor/session and real-Git fixture without timers or Gateway boots.

An additional temporary scenario exercised the metadata handler with a different durable guest profile, session read/write scopes, and explicit conversation membership. It passed ordinary chat admission and the registered shared-receipt read, then rejected a valid metadata edit before transport. The scenario was loaded into the existing action harness against the unchanged production tree and restored the test file afterward. The existing creator-policy regressions remain in github-publication-session-access.test.ts.

{
  "ordinaryChatAdmitted": true,
  "sharedReceiptReadable": true,
  "metadataEditAccepted": false,
  "error": "The original GitHub publication requester is no longer authorized.",
  "gitHubCommands": 0,
  "metadataWrites": 0,
  "titleAndBodyUnchanged": true
}

Independent engineering and adversarial review is clean. Final-head CI completed with 57 successful jobs and the updater mock-export ratchet plus its derived gate failing. Main subsequently repaired that factory in #174947. The actual checker passes on the repaired target, with all 13 causal inputs identical in the prospective merge result; the native landing record retains the failed statuses and their repaired-baseline qualification.

The original guest completed the live edit from an ordinary request, choosing github_publish with action: "edit". Only the first-line Related: #168896 became Fixes #168896; the remaining body, title, head, changed-file data, and open draft state stayed unchanged. The retained consumer uses the exact changed source/test blobs, its frozen dependencies, and original native build stamps. The public recording shows the update and reload; the private conversation is excluded.

Visual evidence

Open preview

Before After
Existing draft PR description begins Related: #168896 The same draft PR description now begins Fixes #168896

Actual public PR update and reload; idle time shortened

proof.mp4

Visual verification

  • Baseline: f34b77ac614e9f6dcc9c72dd3fc7ad8b54fbee35
  • Exact head: df21e9266e226784f5f999ea43704945495334b7
  • Scenario: In the original guest conversation, request the Related-to-Fixes description correction. Observe the existing public draft update and reload it to confirm persistence.
  • Runtime/build: Retained guest lab ac0535368085f1e2e65f9b423bc5b7e0004f9470; all 13 changed source/test paths match df21e92, with original native build stamps. GitHub is the external result surface.
  • Description change: Only Related: [Docs Bug]: system event session-key reference promises a fallback for rejected targets #168896 becomes Fixes [Docs Bug]: system event session-key reference promises a fallback for rejected targets #168896; every remaining byte is identical.
  • Source and lifecycle: Head fb9b3d5, the single docs file diff, title and open draft state are unchanged.
  • Actual tool operation: The original guest selected github_publish action edit from an ordinary request; no source publication occurred.
  • Capture framing: 1280×720 browser viewport; identical 940×260 crop at x20,y112.
  • Read-only GitHub before/after comparison passed for body, title, head, file diff, state and draft status.
  • The existing saved conversation selected the metadata action with the observed head/body preconditions.
  • Cropped screenshots use the same viewport, theme, route and framing.
  • Recording uses native browser screencast frames; long idle intervals are shortened. The private guest conversation is excluded.

@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: df21e9266e226784f5f999ea43704945495334b7
  • Maintainer: @shakkernerd
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/method-scopes.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@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 17, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds a session-bound action for editing an existing PR’s title or description without publishing workspace files.

Example: A guest corrects the closing reference in an existing draft while unfinished workspace changes remain.

  • Before: The description begins with “Related:”; ordinary publication cannot edit it and can publish workspace changes.
  • After: The description begins with “Fixes:”, while head fb9b3d5, the title, file diff, and draft state remain unchanged.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Useful implementation with live visible results, relevant authority controls, and no remaining actionable findings; inherited red CI retains its native landing qualification.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots and the source-qualified live account show the original guest changing the existing draft description through github_publish edit; supplied production-owner evidence rejects a noncreator guest before transport and revokes an admitted creator during the awaited read.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A session user cannot correct an existing PR’s title or description through the supported publication tool without invoking source publication.
Reason: The maintainer-authored direction adds a useful operation to its existing owner, with narrow targeting and no configuration or storage expansion.

Merge readiness

✅ Ready for maintainer review

This maintainer-authored PR fills a useful session capability gap. The prior finding is fixed, supplied authority evidence addresses the previous review, and no actionable code findings remain.

Priority: P2
Reviewed head: df21e9266e226784f5f999ea43704945495334b7

Before merge

None.

Findings

None.

Agent review details

How this fits together

The agent tool sends metadata intent to the existing Gateway publication owner, which resolves the session’s saved PR, checks current authority, and sends a title/body-only GitHub PATCH.

flowchart LR
  A[Guest request] --> B[GitHub publish tool]
  B --> C[Gateway action owner]
  C --> D[Current requester authority]
  C --> E[Saved publication receipt]
  D --> F[GitHub metadata PATCH]
  E --> F
  F --> G[Observed PR result]
Loading

Technical review

Best possible solution:

Land metadata editing through the existing Gateway action owner while preserving source-publication and lifecycle authorization contracts.

Do we have a high-confidence way to reproduce the issue?

Current-main source lacks a metadata-edit action, and ordinary publication retains existing PR text; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Extending the existing publication owner avoids credentials in the sandbox, arbitrary PR targeting, and a competing publication path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9434e82117c8.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit bf90074 adds src/gateway/github-publication-actions.ts:159 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bf90074c33e2; files: src/gateway/github-publication-actions.ts)
  • Peter Steinberger: Raw commit ae7f17a adds src/agents/tools/github-publish-tool.ts:39 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ae7f17a4eb9d; files: src/agents/tools/github-publish-tool.ts)

PR surface

Source +145, Tests +279, Docs +16. Total +440 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 175 30 +145
Tests 5 291 12 +279
Docs 1 17 1 +16
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 483 43 +440

Labels

Label changes:

  • add P2: Useful, bounded improvement that lets session users correct PR text without publishing unfinished source.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Useful, bounded improvement that lets session users correct PR text without publishing unfinished source.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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 (1 earlier review cycle)
  • reviewed 2026-10-17T01:59:00.091Z sha 29e3809 :: needs real behavior proof before merge. :: [P2] Update guest tool-registration expectations for metadata editing

Reviewed October 16, 2026, 11:35 PM ET / October 17, 2026, 03:35 UTC (Revision 2).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 17, 2026
@shakkernerd shakkernerd self-assigned this Oct 17, 2026
@shakkernerd
shakkernerd merged commit d14bb91 into main Oct 17, 2026
159 of 163 checks passed
@shakkernerd
shakkernerd deleted the feat/pr-details-edit branch October 17, 2026 03:46
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Added: Session users can edit their associated pull request title or description without publishing workspace changes.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
)

Allow admitted session users to edit the title or description of their associated pull request without publishing workspace changes. Preserve saved publication ownership, attribution, and existing lifecycle permissions.
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. security-sensitive-changed size: L 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.

[Docs Bug]: system event session-key reference promises a fallback for rejected targets

1 participant