Skip to content

fix: let maintainers prepare PRs in guest conversations - #188784

Merged
shakkernerd merged 3 commits into
mainfrom
guest-pr-maintainer-assistance
Oct 31, 2026
Merged

shakkernerd merged 3 commits into
mainfrom
guest-pr-maintainer-assistance

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A maintainer helping in a guest's conversation can have permission to act there and still be refused when preparing its pull request. Preparation requires the conversation's creator and then requires the PR author to match the requester's linked GitHub account.

User Impact

A current caller with full operator write permission can prepare or continue the verified PR without being its creator or author. The operation uses the configured publisher and the conversation's writable sandbox. Guests retain their identity, repository-access and action requirements.

A maintainer's update to an imported PR cannot make it eligible for later guest publication, even when its branch name matches the conversation's branch. Native-publication continuation and previously admitted bindings retain their behavior.

Why This Change Was Made

The creator and author checks recognize the same current action authority, intersecting the admitted requester's permissions with the selected tool caller's capability. Both remain live across GitHub reads and workspace effects. Unbound preparation retains the selected requester through its existing handoff; the resumed conversation does not inherit the finished tool context.

The existing PR binding records whether the exact PR had a verified publication in this conversation before its first binding. Refresh and recovery preserve that fact. Imported-update receipts remain available for status and reconciliation but cannot establish guest authorship eligibility. Older bindings without the new field retain their existing checks. The field adds no permission or receipt-retention dependency.

Evidence

The baseline registered public/private maintainer cases fail with the creator-only error. The focused owner suite passed 196 cases across 14 files, with formatting, lint and selected production/test type checks. It covers initial classification, matching and differing branch names, native and legacy continuation, refresh/restart/reset, workspace reuse and current-authority controls. The exact per-change allocation funds 221 net test/helper lines for these distinct regressions; the shared baseline is unchanged.

After resolving the base-branch conflict, the preparation and refresh suites passed all 53 cases with its locked dependencies. Formatting, lint, the selected gateway type graph and whitespace checks also passed. Integration required a one-line fixture correction so GitHub account reads work alongside repository reads.

Actual Guest Lab verification passed managed and unbound maintainer preparation, one update to the original foreign PR, refusal of the following genuine guest publication with pending work retained, explicit foreign-author refusal, legacy continuation after cold boot, protected inspection denial and second-guest chat admission denial. Configuration, profiles and identities remained unchanged.

The live build is the qualified P1/P2/R5/R6 composition shown below, not a claim that a standalone PR head was deployed. Same-profile scope narrowing, mid-call role/device revocation and the equal-branch edge remain native registered-test evidence. The second guest could not submit through the UI, so its deeper preparation guard was not exercised live. The unbound screenshot is final-state evidence only; that separate recording has a 16.499 second middle gap. A separate read-only inspection establishes the author refusal; the wrapped publication error is not presented as a captured inner stack.

Visual evidence

Before After
Maintainer preparation refused by the conversation-creator check The current maintainer successfully prepares the original PR

Managed preparation: request through settled result

p2-managed-after.mp4

Visual verification

  • Baseline: 899e747
  • Exact head: 0d70033ab4b8994471689cafeff9fe7a3c7b8879
  • Scenario: A current full-write maintainer prepares the guest’s existing PR in the same guest-created managed conversation before any PR binding.
  • Runtime/build: OpenClaw 2026.10.9; build 2026.10.9-0d70033ab4b8-2026-10-31T01-15-47.585Z. Qualified runtime composition includes P1, P2, R5 and R6; it is not a deployment claim for an individual PR head.
  • Before → after: Creator-only refusal → prepared; headChanged:false; no conflicts.
  • Preservation: Original PR head, creator, owner and required sandbox preserved.
  • Following guest control: After a separate maintainer update of an imported PR, the genuine guest publication was refused; remote head and pending guest work remained unchanged.
  • The same managed fixture was clean and unbound before both requests.
  • Before uses the retained899 runtime; after uses the qualified0d composition.
  • Native actor, action, result and workspace receipts were independently checked.
  • The managed recording is complete. Manual review used full-sequence contact sheets; decoded-frame redaction checks cover all573 frames.
  • The supplemental unbound image is final-state only: its separate recording has a16.499-second middle-handoff gap and is not presented as a complete clip.
  • Same-profile scope intersection, role/device revocation and same-name branch controls are native registered-path evidence, not live UI claims.
  • Both captures show the settled end of the same conversation. The longer prepared-result panel changes the final scroll offset; viewport, crop and initial fixture remain matched.
Requester handover and compatibility controls

All controls below ran on the same qualified runtime composition.

Maintainer update of the original PR Following guest publication refused
Maintainer publication succeeds on the original PR Following guest publication fails and work is retained

Maintainer update recording:

p2-maintainer-update.mp4

Following guest refusal recording:

p2-foreign-receipt-guest-denial.mp4
Separate foreign-author inspection refusal Protected inspection requires operator write
Read-only inspection refuses an unlinked PR author Guest protected action is refused for missing operator write scope
Legacy binding continues after cold boot Second guest cannot send into the conversation
Existing PR continuation remains available Second guest sees a disabled composer and sending is unavailable

The prepared JSON above the second guest’s disabled composer is existing maintainer history, not a second-guest result.

Unbound preparation final state (no complete handoff clip is claimed):

The unbound conversation adopts and prepares the original foreign PR

@clawsweeper

clawsweeper Bot commented Oct 30, 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 gateway Gateway runtime agents Agent runtime and tooling size: M labels Oct 30, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Allows currently authorized full-write maintainers to inspect and prepare another person's PR in a guest conversation.

Example: A full-write maintainer prepares shakkernerd/openclaw-guest-pr-demo#85 in a guest-created conversation.

  • Before: Preparation refuses because the maintainer did not create the conversation.
  • After: Preparation returns status prepared without changing the conversation's creator or granting later guest turns maintainer authority.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful and coherent, with inspected product evidence and focused authority and compatibility controls; the live evidence is correctly qualified as a combined runtime.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected Guest Lab screenshots show managed and unbound preparation, maintainer publication, subsequent guest rejection, foreign-author rejection, and legacy continuation on the explicitly qualified combined runtime. Registered production-owner controls cover narrowed or missing selected authority and revocation after fetching before workspace mutation, plus guest denial before another push. The second-guest screenshot proves chat admission denial only, and the unbound screenshot proves final state only; neither is treated as deeper guard or continuous-handoff proof. Video inspection was unavailable locally and through browser fallback.
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 maintainer helping in a guest conversation cannot prepare its PR because existing checks require the conversation creator and linked PR author.
Reason: The maintainer-authored direction has clear operational value, uses existing authority boundaries, and explicitly preserves guest restrictions and legacy continuation.

Merge readiness

✅ Ready for maintainer review

This PR provides useful, maintainer-approved assistance in guest conversations while preserving guest restrictions; no actionable introduced defect was found.

Priority: P2
Reviewed head: cf8c2eec62b0116ea5a41122f00c98d3a8938970

Before merge

None.

Findings

None.

Agent review details

How this fits together

The github_publish tool calls Gateway inspection and workspace-preparation owners, which combine current requester authority, GitHub facts, publication receipts, and session bindings before accessing or updating the managed workspace.

flowchart TD
  A[Conversation tool caller] --> B[Gateway action]
  B --> C[Current requester authority]
  C --> D[Verified GitHub inspection]
  D --> E[Managed workspace preparation]
  E --> F[Session PR binding]
  F --> G[Later publication eligibility]
Loading

Technical review

Best possible solution:

Use the existing requester, inspection, handoff, and workspace owners to permit current maintainer assistance while keeping imported receipts separate from guest authorship.

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

Current-main source deterministically rejects a noncreator maintainer before preparation, and the supplied baseline screenshot shows that same refusal; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is a focused extension of existing owners: one action-authority intersection serves inspection and preparation, existing handoff retains the requester, and minimal binding metadata prevents update receipts from becoming guest authority.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned contribution and current main: Reviewed the introduced merge-base-to-head diff. Current main still contains the creator-only preparation restriction and linked-author inspection policy, so the central capability remains unimplemented there. (src/gateway/github-pr-workspace-preparation.ts:84, dda109cacbbe)
  • Live authority intersection: Assistance intersects admitted requester scopes with the selected tool caller's scopes and retains both live assertions; workspace and GitHub operations consume those assertions. (src/gateway/github-publication-requester.ts:100, cf8c2eec62b0)
  • Imported receipts do not grant authorship: The first binding records external versus session-publication origin, refresh preserves it, and author-eligibility reads exclude external-PR update receipts while ordinary status reads retain them. (src/gateway/github-publication-shared-read.kernel.ts:115, cf8c2eec62b0)
  • Authority and compatibility controls: Registered-path tests cover missing or narrowed selected authority and role revocation after fetching, asserting unchanged workspace state; publication tests reject a subsequent guest request after a maintainer update, including matching branch names. (src/gateway/github-pr-workspace-preparation.test.ts:81, cf8c2eec62b0)
  • Inspected shipped-entry-point evidence: Inspected before/after preparation screenshots, maintainer publication, subsequent guest failure, separate foreign-author rejection, protected-action rejection, legacy continuation, second-guest admission denial, and unbound final state. The PR explicitly qualifies its combined runtime and limits each scenario's claim. (cf8c2eec62b0)
  • Media inspection limitation: The prepared video manifest reports ffprobe failed: spawnSync ffprobe ENOENT; browser fallback returned Cache miss. Screenshots remained inspectable, so this limitation does not establish missing contributor proof.

Likely related people:

  • Shakker: Raw commit 9218dca adds src/gateway/github-pr-workspace-preparation.ts:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9218dca35cbf; files: src/gateway/github-pr-workspace-preparation.ts)
  • Ayaan Zaidi: Raw commit 4ececc4 adds src/gateway/github-pr-workspace-preparation.ts:77 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4ececc447d2e; files: src/gateway/github-pr-workspace-preparation.ts)
  • Peter Steinberger: Raw commit 61a25ca adds src/gateway/github-publication-requester.ts:16 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 61a25cab9bb2; files: src/gateway/github-publication-requester.ts)

PR surface

Source +95, Tests +221, Docs +15, Other +1. Total +332 across 18 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 122 27 +95
Tests 8 261 40 +221
Docs 1 23 8 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 18 407 75 +332

Review metrics

Metric Value Why it matters
Persisted binding metadata 1 optional origin field; 0 schema migrations Distinguishes imported PRs from native publications without rewriting existing bindings or storing permission grants.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Enables a bounded maintainer assistance workflow while preserving ordinary guest restrictions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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-30T22:49:02.247Z sha cfa2244 :: needs real behavior proof before merge. :: [P3] Account for the added regression lines in the test budget
  • reviewed 2026-10-31T03:00:51.027Z sha cf8c2ee :: needs maintainer review before merge. :: none

Reviewed October 30, 2026, 11:06 PM ET / October 31, 2026, 03:06 UTC (Revision 3).

@shakkernerd
shakkernerd force-pushed the guest-pr-maintainer-assistance branch from 040d7f9 to cf8c2ee Compare October 31, 2026 02:53
@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@shakkernerd shakkernerd self-assigned this Oct 31, 2026
@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 31, 2026
@clawsweeper clawsweeper Bot added 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@shakkernerd
shakkernerd merged commit 774e96e into main Oct 31, 2026
154 checks passed
@shakkernerd
shakkernerd deleted the guest-pr-maintainer-assistance branch October 31, 2026 03:24
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Maintainers can prepare verified PRs in guest conversations while preserving guest permissions and sandbox isolation.

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

Allow current full-write maintainers to prepare and continue verified PRs in guest conversations while preserving guest identity and sandbox requirements.

Preserve the initial PR origin through refresh and recovery so imported maintainer updates cannot grant later guest publication eligibility.

Allocate 221 net regression test/helper lines for current authority, requester handoff, imported-receipt eligibility and binding lifecycle coverage.
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 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