fix(USE-003): emit staged mode preview summary in upload_artifact handler#26313
fix(USE-003): emit staged mode preview summary in upload_artifact handler#26313
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5071a796-e5fb-424b-be5e-d4eaba2bc180 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a rich step summary preview for upload_artifact when staged mode is active, aligning its behavior with other handlers so users can verify what would have been uploaded before enabling live writes.
Changes:
- Replace the staged-mode
core.infoskip message with a fullcore.summarypreview (artifact name, file list, total size, retention, and “skipped” note). - Add a unit test asserting the staged-mode step summary is written and contains key preview text.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/upload_artifact.cjs | Writes a staged-mode upload preview to the GitHub Actions step summary instead of only logging a skip message. |
| actions/setup/js/upload_artifact.test.cjs | Adds coverage to ensure the staged-mode preview summary is emitted and written. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
🧪 Test Quality Sentinel ReportTest Quality Score: 100/100✅ Excellent test quality
Test Classification Details
Flagged Tests — Requires ReviewNo tests flagged. The single new test is clean. Language SupportTests analyzed:
Verdict
The new test directly exercises the behavioral contract introduced by the fix: when staged mode is active, the handler must emit a Mocking strategy is appropriate — 📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.
|
upload_artifact.cjssilently skipped uploads in staged mode with only a barecore.infolog, unlike every other handler which writes a rich🎭 Staged Modestep summary so users can verify intent before going live.Changes
actions/setup/js/upload_artifact.cjs: Replace the silentcore.infoin the staged-modeelse-block with a full step summary viacore.summary.addRaw(...).write(), listing artifact name, files, total size, and retention days:actions/setup/js/upload_artifact.test.cjs: Add test asserting the summary is written and contains🎭 Staged Mode/Upload Artifact Previewwhen staged mode is active.