Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Adjust threat detection file location expectations

Problem

The threat detection JavaScript files expected artifact files to preserve the full /tmp/gh-aw/ directory prefix, but GitHub Actions strips the common parent directory when creating artifacts.

Solution

Updated setup_threat_detection.cjs to use the correct artifact paths:

  • Prompt file: Changed from tmp/gh-aw/aw-prompts/prompt.txt to aw-prompts/prompt.txt
  • Patch file: Changed from tmp/gh-aw/aw.patch to aw.patch
  • Agent output: No change needed (already correct at agent_output.json)

How GitHub Actions Artifacts Work

When uploading files with paths like:

  • /tmp/gh-aw/aw-prompts/prompt.txt
  • /tmp/gh-aw/aw.patch

GitHub Actions identifies the common parent directory (/tmp/gh-aw/) and strips it from the artifact. The artifact contains:

  • aw-prompts/prompt.txt
  • aw.patch

When downloaded to /tmp/gh-aw/threat-detection/agent-artifacts, the files are at:

  • /tmp/gh-aw/threat-detection/agent-artifacts/aw-prompts/prompt.txt
  • /tmp/gh-aw/threat-detection/agent-artifacts/aw.patch

Testing

  • Updated file paths in setup_threat_detection.cjs
  • Recompiled smoke workflow successfully
  • All unit tests pass
Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/20693677130/job/59405581321#step:7:1

Adjust file location to xpectations in JavaScript based on the workflow run logs above. In the setup threat detection JavaScript


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@copilot the artifact removes the common sub folder path "tmp/gh-aw"

GitHub Actions strips the common parent directory (/tmp/gh-aw/) when creating artifacts,
so downloaded files are at aw-prompts/prompt.txt and aw.patch, not tmp/gh-aw/aw-prompts/prompt.txt
and tmp/gh-aw/aw.patch.

Updated the file paths in setup_threat_detection.cjs to match the actual artifact structure.

Co-authored-by: pelikhan <[email protected]>
@pelikhan pelikhan marked this pull request as ready for review January 4, 2026 14:02
@pelikhan pelikhan merged commit 1dd5011 into copilot/update-step-generation-detection-job Jan 4, 2026
@pelikhan pelikhan deleted the copilot/adjust-file-location-xpectations branch January 4, 2026 14:02
Copilot AI requested a review from pelikhan January 4, 2026 14:03
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