-
Notifications
You must be signed in to change notification settings - Fork 34
Fix artifact downloads to use unified agent-artifacts and remove duplicates #8851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
|
@copilot review download-artifacts and remove duplicates or outdated references. |
|
@copilot review the steps to download artifacts since it is now unified: prompt, aw.patch are now part of agent-artifacts so one does not need to download them separately. |
- Consolidate prompt and patch downloads into single agent-artifacts download - Remove outdated separate prompt artifact download - Remove conditional patch download (now unconditional in unified artifact) - Update tests to reflect unified artifact structure Co-authored-by: pelikhan <[email protected]>
Reviewed and removed duplicates. The threat detection job was downloading the same content three times: Before:
After:
This eliminates the duplicate prompt download and the conditional patch download, consolidating into a single unified artifact download. Commit: 73ea25d |
Confirmed. All artifact downloads have been updated correctly: Threat detection job (commit 73ea25d):
Safe outputs jobs (commits 7b537cd, 1f25049):
No remaining separate downloads of |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
@copilot review the file location of aw.patch in the JavaScript since it is now in a different path since it is part of a different artifacts name. Review all other files used in the threat detection prompt too. |
Smoke Test Results✅ File Writing Test Overall Status: FAIL Note:
|
|
Firewall smoke test results:
|
Smoke Test Results: Copilot Engine (No Firewall)✅ All tests passed successfully
|
Smoke Test Results (Claude)Recent PRs:
Test Results:
Status: FAIL (1/6 tests failed)
|
Smoke Test Results
Overall Status: FAIL (1/3 tests passed) Note: Playwright requires system dependencies not available in runner environment.
|
|
PR titles: Increase strict mode adoption from 60% to 72% (93/128 workflows); [WIP] Update download artifacts steps for unified structure
|
Update setup_threat_detection.cjs to use correct nested paths: - Prompt: /tmp/gh-aw/threat-detection/tmp/gh-aw/aw-prompts/prompt.txt - Patch: /tmp/gh-aw/threat-detection/tmp/gh-aw/aw.patch When agent-artifacts is downloaded to /tmp/gh-aw/threat-detection/, files maintain their full path structure from the artifact, creating nested paths. Co-authored-by: pelikhan <[email protected]>
Fixed file paths in Updated paths:
The artifact's internal structure is preserved when downloaded, creating the nested |
Update safe_outputs job download-artifact steps for unified agent-artifacts
Problem
The workflow compilation now uses a unified
agent-artifactsartifact that includes all agent outputs (prompts, logs, patches). However, safe_outputs and threat detection jobs continued downloading from deprecated standalone artifacts (aw.patch,prompt), causing download failures and redundant downloads.Plan
create_pull_request.goto download from unifiedagent-artifactscompiler_safe_outputs_core.goto download from unifiedagent-artifacts(2 locations)threat_detection.goto download from unifiedagent-artifactsagent-artifactsartifact namemake agent-finishfor final validationChanges Made
Code Changes
pkg/workflow/create_pull_request.go- Line 49: Changedname: aw.patchtoname: agent-artifactspkg/workflow/compiler_safe_outputs_core.go- Lines 80 & 292: ChangedArtifactName: "aw.patch"toArtifactName: "agent-artifacts"pkg/workflow/threat_detection.go- Lines 191-214: Consolidated three separate downloads (prompt, agent-output, patch) into two downloads (agent-artifacts, agent-output)actions/setup/js/setup_threat_detection.cjs- Updated file paths to use nested structure from unified artifact:/tmp/gh-aw/threat-detection/tmp/gh-aw/aw-prompts/prompt.txt/tmp/gh-aw/threat-detection/tmp/gh-aw/aw.patch/tmp/gh-aw/threat-detection/agent_output.json(still separate artifact, path unchanged)Test Updates
pkg/workflow/compile_outputs_pr_test.go- Line 494: Updated expectation to check foragent-artifactspkg/workflow/patch_artifact_download_verification_test.go- Lines 71 & 160: Updated expectationspkg/workflow/push_to_pull_request_branch_test.go- Line 870: Updated expectationpkg/workflow/threat_detection_test.go- Updated tests to expect unified artifact downloadCleanup
pkg/workflow/compiler_yaml_artifacts.go- Removed unused functions:generateUploadAgentLogs,generateUploadPrompt,generateUploadAwInfo,generateUploadAssets,generateUploadMCPLogs,generateUploadSafeInputsLogs,generateGitPatchUploadSteppkg/workflow/artifacts.go- Removed unusedgenerateArtifactUploadfunction andArtifactUploadConfigstructKey Insight: Nested Path Structure
When
agent-artifactsis downloaded to/tmp/gh-aw/threat-detection/, the files inside maintain their full path structure:Artifact contains:
/tmp/gh-aw/aw-prompts/prompt.txt/tmp/gh-aw/aw.patchAfter download to
/tmp/gh-aw/threat-detection/:/tmp/gh-aw/threat-detection/tmp/gh-aw/aw-prompts/prompt.txt/tmp/gh-aw/threat-detection/tmp/gh-aw/aw.patchSeparate artifact (agent-output) downloaded to same path:
/tmp/gh-aw/threat-detection/agent_output.json(no nesting, as it's the root of its artifact)Verification
Impact
This eliminates duplicate downloads and ensures all jobs correctly use the unified
agent-artifactsartifact with proper file path handling.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Changeset
agent-artifactsfor downloads; update tests to expectagent-artifactsand remove dead artifact upload helpers.