fix(safe-outputs): add file staging to upload-workitem-attachment #381
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingrustPull requests that update rust codePull requests that update rust code
Description
Problem
upload-workitem-attachment does not stage files during Stage 1 (MCP). The executor reads directly from source_directory at Stage 3, but the sandbox workspace may no longer be accessible by then. This is inconsistent with the staging pattern used by upload-build-artifact and create-pull-request.
Proposed Fix
- Add file staging in the MCP handler: copy the file to
output_directorywith a generated filename (matching the pattern inupload-build-artifact) - Add
staged_file,file_size, andstaged_sha256fields toUploadWorkitemAttachmentResult - Update the executor to read from
ctx.working_directory.join(staged_file)instead ofctx.source_directory.join(file_path) - Add SHA-256 cross-stage integrity verification (matching
upload-build-artifact) - Add a Stage 1 size cap using the default max file size
See PR #380 for the staging pattern reference.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingrustPull requests that update rust codePull requests that update rust code
Activity
feat: add SHA-256 cross-stage integrity verification
feat(safe-outputs): add unified upload-build-artifact safe output (#380)