Repository navigation
feat: upload workspace evidence for managed pull requests - #176139
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 changesAdds inspected workspace image and video uploads to the existing managed GitHub publication tool. Example: A guest has inspected proof.png in its sandbox and wants to attach it to its managed PR.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR adds a useful capability missing from current main, and I found no actionable introduced defect. The earlier conflict is resolved; current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe agent tool passes inspected file facts and its private sandbox context to the Gateway, which checks current publication authority, reads bounded workspace bytes, and uploads through the selected GitHub identity. flowchart LR
A[Guest conversation] --> B[GitHub publication tool]
B --> C[Gateway publication owner]
C --> D[Current requester and publisher]
C --> E[Sandbox filesystem bridge]
E --> F[Bounded inspected media]
F --> G[GitHub attachment upload]
G --> A
Technical reviewBest possible solution: Keep the upload within the existing publication authority and filesystem owners, with explicit attachment association and uncertain-write handling. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the missing upload action; this is a new capability, and no target code was executed during review. Is this the best way to solve the issue? The implementation extends the existing publication owner, reuses bounded filesystem and guarded-network contracts, and introduces no competing publication state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1507c89eaa51. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +339, Tests +421, Docs +20. Total +780 across 15 files. Added test files: 3. View PR surface stats
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 18, 2026, 7:45 AM ET / 11:45 UTC (Revision 2). |
91562e1 to
f40fd01
Compare
8b4c96b to
b3fd0e6
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Added: creators of managed pull requests can upload inspected workspace evidence without receiving publisher credentials. |
…76139) Allow creators of managed pull requests to upload inspected workspace images and videos through the existing publisher, with current authority checks and truthful upload uncertainty.
What Problem This Solves
A guest can create a managed pull request and inspect screenshots or recordings in its workspace, but cannot upload that evidence through the managed publisher.
User Impact
The PR's original requester can upload an inspected image or video from the current sandbox workspace and use the returned GitHub attachment URL in the PR body. Supported files are PNG, JPEG, GIF, WebP, MP4, MOV and WebM, up to 10 MB. The operation requires the observed PR receipt and head plus the file's SHA-256 and byte count.
Why This Change Was Made
The existing
github_publishtool gainsupload_evidence, using the current session's managed publisher and recorded repository. The Gateway checks workspace ownership, actual bytes and media type, then rechecks the requester, selected publisher and PR before sending the file. Credentials remain outside the sandbox; other mounts, remote URLs and alternate repository or PR selectors are rejected. Workspace read failures return a safe diagnostic without host paths.Uploading does not edit the PR body. The requester associates the returned URL through the existing
editaction and verifies reviewer access afterward. An interrupted or malformed upload response is reported as unconfirmed because GitHub may already have accepted the file; the operation never retries it automatically.Evidence
An ordinary guest uploaded two inspected PNGs through the patched tool, associated the returned references using
edit, and completed readiness. Anonymous readback returned HTTP 200 withimage/pngand exact SHA-256/byte-count matches for both files. The first canonical attachment URL initially returned 404 after body association; the guest changed the body link to append?raw=1, which returned the expected bytes. No repeat upload was needed. The published evidence contains both references. This proves two PNG uploads and their access recovery on a containing runtime whose upload implementation matches this PR; it does not establish live coverage for every accepted media format.Independent review closed the filesystem-error disclosure and live-contract findings before the latest draft-option integration. The previous head's full CI passed: 72 successful jobs and 22 skipped, 759 seconds elapsed and 13,569 summed successful job-seconds. The latest integration preserves the upload and authority owners, combines the draft/evidence tool fields, and rejects
draftonupload_evidence. Its independent integration recheck is clean. Affected integration checks pass on matching source: the publication group has 165 cases, the protocol 10, the registered tool 35, and the publish tool 9. Formatting, lint and affected compiler graphs pass. That containing-source batch still failed overall on two older database-port diagnostic expectations and a browser file that could not launch without Chromium; those are outside this change and are not claimed green. Current-head CI passed with 72 successful jobs and 22 skipped (596 seconds elapsed; 13,030 summed successful job-seconds). Automated review returned Platinum readiness/proof and Diamond patch quality with no findings.