githubnext / githubnext/ado-aw
fix(safe-outputs): add file staging to upload-workitem-attachment
- Dominant language
- Rust
- Stars
- 23
- Forks
- 8
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 22
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
1. Add file staging in the MCP handler: copy the file to `output_directory` with a generated filename (matching the pattern in `upload-build-artifact`)
2. Add `staged_file`, `file_size`, and `staged_sha256` fields to `UploadWorkitemAttachmentResult`
3. Update the executor to read from `ctx.working_directory.join(staged_file)` instead of `ctx.source_directory.join(file_path)`
4. Add SHA-256 cross-stage integrity verification (matching `upload-build-artifact`)
5. Add a Stage 1 size cap using the default max file size
See PR #380 for the staging pattern reference.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.