Repository navigation
Description
Caution
Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.
Protected files: .github/workflows/test-copilot-upload-artifact.md
Motivation
upload-artifact (github/gh-aw PR 61431 — "Fix upload_artifact silently succeeding when relative paths are never staged") has no e2e regression coverage at all. There is no test-*-upload-artifact.md in this repo, unlike upload-asset and upload-code-coverage, which both have tests.
Change
Adds test-copilot-upload-artifact.md:
- Trigger:
workflow_dispatch - Engine: copilot
- Safe output:
upload-artifact(max-uploads: 1, retention-days: 1) - Variant: standard
A steps: block stages a small deterministic text file into $RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/, and the prompt asks the agent to call upload_artifact on it. A samples: block makes the run deterministic under --use-samples.
Fixtures / secrets
None — uses only the main repo and standard ACTIONS_RUNTIME_TOKEN-based artifact upload.
Notes
Lock file intentionally omitted; will be generated by gh aw compile in CI / by a maintainer.
Note
This was originally intended as a pull request, but the git push operation failed.
Original error: The process '/usr/bin/git' failed with exit code 1
Workflow Run: View run details and download bundle artifact
The bundle file is available in the agent artifact in the workflow run linked above.
Create the pull request manually
# Download the artifact from the workflow run
gh run download '35200720046' -n agent -D '/tmp/agent-35200720046'
# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-35200720046/aw-test-copilot-upload-artifact.bundle'
temp_ref='refs/bundles/create-pr-test-copilot-upload-artifact-a5ca88a416e22ce0-df86de4d'
target_ref='refs/heads/test-copilot-upload-artifact-a5ca88a416e22ce0'
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 ~ /^refs\/heads\// { print $2 }')
if [ -z "$bundle_source_ref" ]; then
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 == "HEAD" { print $2 }')
fi
if [ "$(printf '%s\n' "$bundle_source_ref" | sed '/^$/d' | wc -l | tr -d ' ')" != "1" ]; then
echo "Expected exactly one bundle source ref, found: $bundle_source_ref" >&2
exit 1
fi
git fetch "$bundle_path" "${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref" "$temp_ref"
git checkout 'test-copilot-upload-artifact-a5ca88a416e22ce0'
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"
# Push the branch to the target remote
git push 'origin' 'test-copilot-upload-artifact-a5ca88a416e22ce0'
# Create the pull request
gh pr create --title 'Add e2e test: copilot/upload-artifact' --base 'main' --head 'test-copilot-upload-artifact-a5ca88a416e22ce0' --repo 'githubnext/gh-aw-test'Generated by 🔍 Suggest New E2E Tests · copilot · auto · 70.4 AIC · ⌖ 9.19 AIC · ⊞ 8.4K · ◷
Activity