Repository navigation
fix: enable whole-conversation forks for guest owners - #186641
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 changesEnables guest owners to fork whole conversations through existing Control UI actions using their session-write grant. Example: A guest with operator.sessions.write opens Advanced → Fork conversation on their owned Cedar Table planning conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current UI permission mismatch with a focused change; no actionable correctness finding remains, and the earlier ratchet finding is resolved. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI menus and dispatchers combine advertised scopes with the selected session row before sending sessions.create; the Gateway authorizes and persists the fork. flowchart LR
A[Guest opens conversation menu] --> B[Shared UI access policy]
B --> C[Existing fork dispatcher]
C --> D[Gateway current authority checks]
D --> E[Transcript and child persistence]
E --> F[Child conversation continuation]
Technical reviewBest possible solution: Use the existing session-write policy consistently across whole-conversation menus and dispatchers while retaining Gateway authority at persistence. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically requires broad write at the menu and dispatch boundaries; the supplied baseline screenshot independently shows the disabled action. Is this the best way to solve the issue? This is the smallest complete repair: reuse the shared access owner, pass the source ownership facts through both dispatchers, and preserve parentless creation and privileged-parameter checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 970d684a52f0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +21, Tests 0, Docs +4. Total +25 across 9 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel 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 (1 earlier review cycle)
Reviewed October 28, 2026, 5:55 AM ET / 09:55 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: guest owners can fork their whole conversation through Advanced while preserving existing ownership and isolation checks. |
Enable eligible guest owners to fork their whole conversation through the shared menu and both dispatch paths, preserving source ownership and existing Gateway safeguards. Fixes openclaw#186634.
Fixes #186634.
What Problem This Solves
Guests who can write their own conversations cannot choose Advanced → Fork conversation. The menu requires broad
operator.writebefore the request reaches the Gateway, even though ordinary owned forks already acceptoperator.sessions.write. This blocks an independent continuation that includes the latest completed reply.User Impact
Eligible guest owners can use the whole-conversation action from the chat header, sidebar, and Sessions page. Reader and foreign-source refusals remain, and the Gateway still enforces current ownership, runtime, active-run and sandbox requirements. Ordinary parentless creation and broader operator grants keep their existing behavior.
This changes UI admission only. It does not add a fork capability, clone managed worktrees, change workspace inheritance, or relax the Current checkout isolation restriction.
Why This Change Was Made
The shared menu and its two dispatch paths now opt into the existing session grant and supply the selected source row. The common access owner distinguishes parentless creation from creation targeting an existing parent: a parent key is not evidence of ownership. Both UI entry paths therefore make the same scope and source-ownership decision before dispatch, while the backend remains authoritative.
The existing active-source request still selects the last completed reply. Canonical scope documentation describes that behavior alongside the separate user-message fork action.
Evidence
A fresh guest conversation with two completed model exchanges reproduced the disabled menu and its
This action requires operator.write access.tooltip. The live baseline was2c29a1ef52df17d76de3d3e4f6848768ab0d15f8; all 18 inspected fork/menu/authorization owners matched the repair base01d66c79ae4c518b355469797752e09e75a35ec6.The original regression failed in four expected places on the baseline, with 82 other cases passing. Focused validation now covers 344 tests across 18 files, including four real-browser operator-scope cases. Formatting, lint, affected types, file-size limits and the native test-line gate pass. The existing permission matrices carry the controls without adding net test lines.
A real UI fork on the candidate source copied all four saved messages, including the latest assistant reply. The child then completed a natural request for a downloadable invitation containing the latest decisions, and the source history stayed unchanged. A different guest and privileged fork parameters were refused. This first scenario used an ordinary workspace, whose existing shared-root semantics remain unchanged.
On clean UI head
18887e24ac7d, a real guest forked an active managed-worktree conversation through the Sessions page. The request selectedlast-completed, copied all ten completed messages, retained required sandboxing and detached from the source worktree. The child completed a natural invitation request and downloaded a 111-word file whose bytes matched native readback. The source checklist, original history prefix and worktree remained unchanged; the source briefing settled naturally. The child did not inherit the source file, and no workspace-cloning claim is made.The live Gateway was
4a5ec828b19c; fourteen relevant backend owner blobs matched the candidate. This is qualified development-serving evidence. Current checkout stayed disabled, and the existing ordinary-workspace sharing policy is unchanged.The existing creation authority suite passed all 12 cases on this exact head. Its fork case captures real sharing authority, blocks the native transcript writer, removes parent participation after the first guard, then resumes. It verifies rejection, no child row and an unchanged transcript-event count. This is controlled production-owner revocation proof, alongside the native foreign-guest denial and browser reader-denial controls; it is not a live guest-role revocation claim.
Independent engineering review is clean. Exact-head hosted CI and canonical autoreview passed. Current-target browser reproduction confirms the unfixed action remains disabled; inspected target changes preserve this repair. The required hosted review is tracked before landing.
Visual evidence
Active source fork and downloaded invitation
[email protected]
Visual verification
18887e24ac7ddb1361e3579913913c1153365361