-
Notifications
You must be signed in to change notification settings - Fork 35
Add artifact file location manager with workflow analysis and reference generation #8873
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
|
@copilot use upload-artifacts v6 |
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Updated to actions/[email protected] in commit b8838de. Changes:
Note: v6 uses Node.js 24 runtime but maintains the same artifact upload/download behavior as v4/v5. |
|
@copilot recompile |
Co-authored-by: pelikhan <[email protected]>
|
@copilot make sure to handle common sub path removal When uploading files with paths like: /tmp/gh-aw/aw-prompts/prompt.txt aw-prompts/prompt.txt |
Recompiled all workflows with actions/[email protected] in commit cef8373. Changes:
The |
|
@copilot create a test that runs the manager on all the agentic workflows in the repo and generates a map of files per job in specs/artifacts.md Artifacts.md is meant to be used as reference by an agent to generate file path in JavaScript and go |
Co-authored-by: pelikhan <[email protected]>
Implemented common parent directory stripping in commit 9550c7a. Changes:
Example: Added 5 comprehensive tests covering various scenarios:
All tests passing ✅ |
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <[email protected]>
Created test that analyzes all agentic workflows and generates Test:
Generated document (
Usage: go test -v ./pkg/workflow -run "TestGenerateArtifactsReference"The document is designed for agents to reference when generating file paths in JavaScript/Go code, showing exactly where downloaded artifact files will be located based on upload paths and download configuration. |
Co-authored-by: pelikhan <[email protected]>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
✨ 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. |
|
|
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Smoke Test Results ✅ File Writing: Created Status: FAIL -
|
|
Firewall smoke test results:
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Available Tools: add_comment, add_labels, create_issue, missing_tool, noop Overall Status: PASS cc @pelikhan (PR author/assignee)
|
Smoke Test Results - Copilot Engine (No Firewall)✅ All tests passed
|
Smoke Test Results - Claude Sonnet 4.5Recent PRs:
Test Results: Status: PASS (5/6 tests passed, safeinputs-gh tool missing but not critical)
|
|
Merged PRs: Fix broken mermaid diagram in campaign documentation; [WIP] Fix assignees configuration in safe-outputs.create-issue
|
Smoke Test Results
Overall Status: PARTIAL PASS (2/3 tests passed)
|
Artifact File Location Manager - Complete Implementation ✅
Summary
Successfully created and integrated a comprehensive artifact file location manager into the gh-aw compiler. The manager simulates GitHub Actions v4+ artifact behavior to track uploads/downloads and compute actual file locations during compilation.
Recent Updates
Merged Main and Reverted Detection Job Paths ✅
threat_detection.go:/tmp/gh-aw/threat-detection/agent-artifacts→/tmp/gh-aw/threat-detection//tmp/gh-aw/threat-detection/agent-output→/tmp/gh-aw/threat-detection/Why this change: The subdirectory paths were introduced during main branch merge but break the expected artifact download behavior. Artifacts should download directly to
/tmp/gh-aw/threat-detection/without artifact-name subdirectories.Added Job-Level Artifact Summary ✅
Enhanced
TestGenerateArtifactsReferenceto generate a comprehensive summary section:Test Now Runs in Dry-Run Mode ✅
TestGenerateArtifactsReferenceto useSetNoEmit(true)Artifacts Reference Document Generation ✅
Created a test that analyzes all agentic workflows and generates a reference document (
specs/artifacts.md):TestGenerateArtifactsReferencetest that compiles all workflow filesCommon Parent Directory Stripping ✅
Implemented GitHub Actions artifact upload behavior that strips common parent directories:
NormalizedPathsfield toArtifactUploadto track paths after common parent removalcomputeNormalizedPaths()to find and strip common parent directoriesfindCommonParent()to identify the common parent pathComputeDownloadPath()to use normalized pathsUpdated to actions/[email protected] ✅
.github/aw/actions-lock.json(source file)pkg/workflow/data/action_pins.jsonImplementation Phases - All Complete ✅
Phase 1: Research & Design ✅
Phase 2: Core Implementation ✅
artifact_manager.gowith core types and managerPhase 3: Testing ✅
Phase 4: Integration ✅
Phase 5: Documentation & Validation ✅
Key Features Implemented
1. Upload Tracking
2. Download Tracking
3. Path Computation (GitHub Actions v4+ Behavior)
4. Validation System
5. Compiler Integration
artifactManagerfield toCompilerstructGetArtifactManager()methodSetNoEmit(true)6. Reference Documentation Generation
Test Coverage
Unit Tests (
artifact_manager_test.go)Integration Tests (
artifact_manager_integration_test.go)Workflow Analysis Test (
artifact_manager_workflows_test.go)SetNoEmit(true)Files Added/Modified
New Files:
pkg/workflow/artifact_manager.go(370 lines)pkg/workflow/artifact_manager_test.go(835 lines)pkg/workflow/artifact_manager_integration_test.go(264 lines)pkg/workflow/artifact_manager_workflows_test.go(467 lines)specs/artifacts.md(Generated reference document with job-level summary)Modified Files:
pkg/workflow/compiler_types.go- Added artifactManager fieldpkg/workflow/compiler.go- Added manager reset in CompileWorkflowDatapkg/workflow/threat_detection.go- Reverted detection job download pathspkg/workflow/action_pins_test.go- Updated pin count to 29.github/aw/actions-lock.json- Added v6.0.0 entry (source)pkg/workflow/data/action_pins.json- Synced with v6.0.0Validation Results
✅ All unit tests pass
✅ All integration tests pass
✅ All workflow package tests pass
✅ Linter validation passed
✅ Code formatting validated
✅ All workflows recompiled with v6.0.0
✅ Common parent stripping tests pass
✅ Artifacts reference document generated successfully
✅ Main branch merged successfully (multiple times)
✅ All workflows recompiled after merge (123 workflows)
✅ Test runs in dry-run mode without writing lock files
✅ Job-level summary with merged duplicates generated
✅ Detection job download paths reverted to correct behavior
Next Steps
The artifact manager is now fully functional and ready for use:
specs/artifacts.mdfor accurate file pathsOriginal 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.