Repository navigation
fix: let maintainers prepare PRs in guest conversations - #188784
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 changesAllows 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.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +95, Tests +221, Docs +15, Other +1. Total +332 across 18 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 HistoryReviewed October 30, 2026, 11:06 PM ET / October 31, 2026, 03:06 UTC (Revision 3). |
040d7f9 to
cf8c2ee
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: Maintainers can prepare verified PRs in guest conversations while preserving guest permissions and sandbox isolation. |
) 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.
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
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
Managed preparation: request through settled result
p2-managed-after.mp4
Visual verification
0d70033ab4b8994471689cafeff9fe7a3c7b8879Requester handover and compatibility controls
All controls below ran on the same qualified runtime composition.
Maintainer update recording:
p2-maintainer-update.mp4
Following guest refusal recording:
p2-foreign-receipt-guest-denial.mp4
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):