Repository navigation
feat: land session pull requests from sandboxed conversations - #172901
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 changesExtends github_publish with authorized inspection, readiness, and merge actions for a conversation’s recorded PR or explicitly selected descendant’s PR. Example: An administrator returns to a guest-created conversation whose draft PR is ready to land.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored feature fills a supported workflow gap, and the checkpoint mock correction introduces no production change or actionable defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe agent tool sends session-bound requests to the Gateway, which resolves publication receipts, checks current requester and publisher authority, calls GitHub, and returns observed PR state. flowchart TD
A[Conversation requester] --> B[github_publish tool]
B --> C[Gateway action handler]
C --> D[Session ancestry and publication receipt]
C --> E[Current requester and publisher authority]
E --> F[GitHub transport]
F --> G[Observed PR state]
Technical reviewBest possible solution: Retain the existing Gateway publication owner and session-bound authority checks while adding these explicit landing operations. Do we have a high-confidence way to reproduce the issue? The baseline tool schema confirms the requested capability is absent; this is an intentional feature extension rather than a reproduced defect. Is this the best way to solve the issue? Extending the existing publication tool and Gateway transport keeps credentials and authorization with their current owners instead of exposing shell credentials or arbitrary PR targets. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b4b89d404ca4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +458, Tests +456, Docs +6. Total +920 across 16 files. Added test files: 1. 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 (3 earlier review cycles)
Reviewed October 15, 2026, 5:23 AM ET / 09:23 UTC (Revision 4). |
dc282ce to
09d8ae3
Compare
|
@clawsweeper re-review The body now includes anonymously verified before/after media and a continuous recording from the actual admin submission through delegated PR landing. Selected native results show guest |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review CI identified that the action test's checkpoint mock omitted other module exports. The fixture now preserves the real exports and replaces only its checkpoint operation. The failed guard, formatting/lint, Gateway test types, and all 12 action cases pass. Please review |
|
🦞👀 Re-review progress:
|
|
Added: same-conversation PR landing for authorized maintainers while preserving guest draft-only access. |
…aw#172901) Allow currently authorized maintainers to inspect, ready, and merge a conversation's recorded pull request, including an explicitly selected publishing child. Preserve guest draft publication, sandbox isolation, and current requester authority.
What Problem This Solves
A guest can publish a draft pull request from a sandboxed development session, but an authorized maintainer returning to that conversation cannot inspect, mark ready, or merge its recorded PR through the agent's publication tool. The existing tool only submits a publication request. This also affects delegated work: a parent conversation may have no publishable workspace of its own while its managed child owns the PR.
User Impact
A person with current full operator write access can ask the agent to inspect the session's published PR, mark the reviewed draft ready, and merge its intended commit. The agent receives the observed GitHub state after each action. For delegated work, it explicitly selects the publishing child from that conversation's descendants.
Guest turns retain the existing draft-publication schema and instructions. These actions do not change the session's sandbox, give the agent shell credentials, enable auto-merge, or grant later guest turns the maintainer's authority. Existing repository checks still govern merging, verified contributor credit is carried into squash merges, and closed or unsuccessful PRs retain their saved workspace and history. No configuration or storage migration is needed.
Why This Change Was Made
The change extends
github_publishwithinspect,ready, andmergeactions backed by one registered Gateway operation. It reuses the publication service's completed receipt, current requester authorization, selected GitHub identity, and GitHub transport. The current requester's full-write authority controls whether the tool exposes PR actions. A managed parent without its own publishing capability exposes only the action surface to that requester; its ordinary draft publication eligibility is unchanged.Write actions must name the inspected publication request and expected head. The Gateway checks the recorded session association and current PR head, and GitHub's merge request also carries the expected SHA. Current authority and identity are revalidated at the external effect. Explicit child selection follows retained session ancestry rather than searching repositories or accepting arbitrary PR URLs.
The operation reads the same PR after a write, including an uncertain transport response. Repeating an already completed action returns its current state without another write. It reports missing credentials, changed heads, closed PRs, and blocked repository checks rather than scheduling an autonomous landing workflow.
Evidence
The base revision's actual public tool schema rejected all three PR actions. The added integration proof enters through
github_publishand the registered Gateway handler with real session, requester, and publication-store fixtures; only the external GitHub transport is synthetic. It covers local and repository workspaces, full-write and admin actors, guest denial before and after landing, exact receipt/head binding, role revocation, missing credentials, repository rejection, uncertain write responses, repeated actions, contributor credit, and explicitly selected children.The tool-registration proof exercises the complete coding-tool policy pipeline for nonpublishing parents, including guest denial, explicit tool denial, and inherited draft publication capability. Protocol coverage rejects arbitrary target URLs, credentials, admin flags, and auto-merge arguments.
An isolated live conversation exercised guest denial after earlier admin participation, then current-admin inspection, ready, and squash merge through the tool. Independent GitHub readback confirmed that the merged tree matched the reviewed head and retained contributor credit. The fixture repository had no required CI workflow; blocked and rejected repository checks are exercised at the Gateway boundary. The revised nonpublishing parent explicitly selected its publishing child, reported a real merge conflict without writing, and completed ready/merge after the guest supplied the requested revision. A subsequent guest turn exposed only the original draft-publication schema.
Selected native results from the live conversation show two distinct boundaries. After prior admin participation and approval, before the actual merge, a guest's retained action was rejected by the server:
{"action":"inspect","error":"missing scope: operator.write"}After the actual merge, a new guest request inspected the current tool definition. The selected schema and telemetry fields were:
{"input":"{ body?: string; title?: string }","additionalProperties":false,"callCount":0}The latter is capability discovery with no attempted write. The registered-owner revocation case changes the real canonical operator role during the awaited read, then asserts the ready request fails and the GitHub write list remains empty. It runs through the public tool, registered Gateway dispatcher and current requester owner; the external GitHub transport is synthetic in that case. The live recording below supplies the corresponding real authorized external effect.
Remote Linux validation passed changed-file formatting/lint, affected source and consumer types, and the selected related tests. The 57 related paths have 55 passing file results and two Windows-only skips. Native CI did not select Windows; the unchanged Windows read/encoding and media file-URL paths are not claimed as executed on that platform. The corrected action fixture passed all 12 cases in 51.96 seconds; the full tool-registration suite passed 35 cases in 51.38 seconds. Six test-routing consumers also passed 652 assertions in 145.13 seconds. These are native suite wall times, including their imports and setup.
After resolving the independent method-registration conflict, the rebased candidate passed formatting/lint, selected package boundaries, six affected source/test type graphs, and all 71 assertions across the protocol, registration, publisher, action, and method-registry files (111.91 seconds for the test stage). The full-authority public tool probe admitted all three actions. CI then identified a checkpoint mock that omitted other real exports; the test-only correction preserves those exports and passed its guard, formatting/lint, test types, and all 12 action cases. Current-head independent review is clean and ClawSweeper rates the result Platinum. Hosted CI passed 74 jobs and intentionally skipped 21; its sole underlying failure is an unrelated UI chip-label expectation, reproduced unchanged on the exact CI baseline. The CI aggregate and its mirrored status retain that failure. Total CI job elapsed time was 19,845 seconds across the selected jobs. The source-qualified visual evidence below retains the actual tested lab revisions and its limits.
Visual evidence
Actual admin submission and delegated PR landing in the same guest-created parent
proof-final.mp4
Visual verification
489a390c925b8a2973802e50794675e8a3d25acb