Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

The buildArtifactDownloadSteps() function hardcoded agent_output.json as the internal filename, breaking when used with different artifact types.

Changes

  • Added ArtifactFilename field to ArtifactDownloadConfig struct for configurable internal filenames
  • Updated path construction to use config.ArtifactFilename instead of hardcoded string
  • Updated buildAgentOutputDownloadSteps() to explicitly pass ArtifactFilename: "agent_output.json"

Before/After

// Before: hardcoded filename
artifactPath := fmt.Sprintf("%s%s/agent_output.json", 
    config.DownloadPath, config.ArtifactName)

// After: configurable filename
artifactPath := fmt.Sprintf("%s%s/%s", 
    config.DownloadPath, config.ArtifactName, config.ArtifactFilename)

This ensures correct artifact resolution with upload-artifact@v5/download-artifact@v6 where artifacts extract to {artifact-name}/{filename} structure.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE ux-amd64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE rg/toolchain@v0.4161733fe649ce17dc5a4d436773ac712ed41975 GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows GO111MODULE pts.test GOINSECURE GOMOD GOMODCACHE pts.test 5447�� k/gh-aw/gh-aw/.github/workflows 4161733fe649ce17dc5a4d436773ac712ed41975:go.mod rg/toolchain@v0.0.1-go1.25.0.linux-amd64/bin/node GOSUMDB GOWORK 0.1-go1.25.0.linxterm-color git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login f/tags/v6 -trimpath by/9aab9af38f05fc7d6159db46775cefd8f576f6886bc377a3aa5a9161443dc4e0/log.json -p main -lang=go1.25 k/gh-aw/gh-aw/gh-aw aa5a�� --show-toplevel -dwarf=false /usr/bin/gh go1.25.0 -c=4 -nolocalimports gh (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/20628775000/job/59243537716

The agent job generated safeoutputs entries but the safe_outputs job failed to find them. This looks like an issue with the artifact renaming.

Fix it.

Custom agent used: debug-agentic-workflow
Debug and refine agentic workflows using gh-aw CLI tools - analyze logs, audit runs, and improve workflow performance


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Add ArtifactFilename field to ArtifactDownloadConfig to properly support
different artifact types. Previously, the filename was hardcoded as
"agent_output.json" which broke the abstraction and would fail for other
artifact types.

This fixes the issue where safe_outputs job could not find downloaded
artifacts due to incorrect path construction.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review January 1, 2026 00:06
Copilot AI changed the title [WIP] Fix artifact renaming issue in safe_outputs job Fix artifact download path construction with configurable filename Jan 1, 2026
Copilot AI requested a review from pelikhan January 1, 2026 00:14
@pelikhan pelikhan merged commit 5714912 into copilot/update-action-run-references Jan 1, 2026
@pelikhan pelikhan deleted the copilot/fix-artifact-renaming-issue branch January 1, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants