Skip to content

arc-dind: "Copy Copilot CLI to daemon-visible path" fails with "are the same file" after the rootless install moved to $RUNNER_TEMP/gh-aw/bin (v1.2.2) #76973

Backlog

Description

@ekbritecore

Summary

On runner.topology: arc-dind, the compiled Copy Copilot CLI to daemon-visible path step runs cp on a file onto itself and exits non-zero, so the detection job fails (and with it every safe output, since safe_outputs is skipped). Since v1.2.2 the rootless Copilot install already lands in ${RUNNER_TEMP}/gh-aw/bin/, which is exactly the copy's destination. The step still assumes the install is in ~/.local/bin.

Regression from #75445 / #75446 (merged 2026-11-07, shipped in v1.2.2). The same step passes on v1.2.0.

Environment

gh-aw v1.2.2 (compiler and github/gh-aw-actions/setup)
topology runner.topology: arc-dind, self-hosted ARC runners (runs-on a runner scale set)
engine pi main engine; threat detection runs copilot (threat-detect v0.5.3, COPILOT_MODEL=claude-sonnet-5.5)
Copilot CLI 1.0.103, installed with --rootless

Observed

The detection job's Install GitHub Copilot CLI step succeeds:

bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.103 --rootless --checksums-sha256 ... --prefer-toolcache --cooldown-days 3
Installing GitHub Copilot CLI version 1.0.103 (os: Linux, arch: x86_64)...

then the next compiled step fails:

Run mkdir -p "${RUNNER_TEMP}/gh-aw/bin"
COPILOT_SRC="$(command -v copilot)"
cp "$COPILOT_SRC" "${RUNNER_TEMP}/gh-aw/bin/copilot"
chmod +x "${RUNNER_TEMP}/gh-aw/bin/copilot"
cp: '/home/runner/_work/_temp/gh-aw/bin/copilot' and '/home/runner/_work/_temp/gh-aw/bin/copilot' are the same file

Copy Copilot CLI to daemon-visible path is the only failed step. The rest of the detection job is skipped, safe_outputs and the other downstream jobs are skipped, and the run ends failure. The agent job (same workflow, pi engine) is green.

Root cause

So the install location and the copy destination are the same path, and the copy is redundant in that case. arc_dind_copilot_staging_test.go does not cover a rootless install into gh-aw/bin.

Suggested fix

Make the copy idempotent:

COPILOT_SRC="$(command -v copilot)"
COPILOT_DST="${RUNNER_TEMP}/gh-aw/bin/copilot"
[ "$COPILOT_SRC" -ef "$COPILOT_DST" ] || cp "$COPILOT_SRC" "$COPILOT_DST"
chmod +x "$COPILOT_DST"

Alternatively drop the step when the install is already under ${RUNNER_TEMP}/gh-aw/bin, and update the two stale comments.

Acceptance criteria

  • A workflow compiled with runner.topology: arc-dind and --rootless installation runs the detection job to completion, with the staging step a no-op when source and destination are the same file.
  • A test compiles an ARC/DinD workflow and asserts the staging step does not fail when the install directory is ${RUNNER_TEMP}/gh-aw/bin.
  • The non-rootless path (source /usr/local/bin/copilot, destination gh-aw/bin/copilot) still copies.

Impact

Every workflow compiled with runner.topology: arc-dind whose threat detection uses the Copilot CLI (the pi and copilot engines) fails the detection job on v1.2.2, and with detection failing the workflow's safe outputs never run. It happens whatever runner the detection job itself runs on: moving safe-outputs.threat-detection.runs-on to a GitHub-hosted runner fails at the same step, because the topology is a workflow-level setting, the compiler still emits the staging step, and the install is --rootless into $RUNNER_TEMP/gh-aw/bin there too.

v1.2.0 is unaffected. There is no frontmatter workaround: runner.installation: privileged is rejected with runner.topology: arc-dind (validateRunnerConfig), so the only options are staying on v1.2.0 or dropping the topology.

Related

Activity

  1. locked and limited conversation to collaborators on Nov 11, 2026
  2. unlocked this conversation on Nov 11, 2026
  3. ekbritecore commented on Nov 12, 2026

    @ekbritecore
    Author

    Confirming the same failure from a second repository, on runner.topology: arc-dind (self-hosted ARC runners), gh-aw v1.2.2 compiler and github/gh-aw-actions/setup, threat-detect v0.5.3, Copilot CLI 1.0.103 installed with --rootless --prefer-toolcache.

    The detection job's Install GitHub Copilot CLI step finds the toolcache binary and writes a wrapper into the job tree:

    Using cached GitHub Copilot CLI from /opt/hostedtoolcache/copilot-cli/1.0.103/x64/bin/copilot
      Installing wrapper at /home/runner/work/_temp/gh-aw/bin/copilot
      Resolved copilot binary: /home/runner/work/_temp/gh-aw/bin/copilot
    

    and the next compiled step fails:

    COPILOT_SRC="$(command -v copilot)"
    cp "$COPILOT_SRC" "${RUNNER_TEMP}/gh-aw/bin/copilot"
    cp: '/home/runner/work/_temp/gh-aw/bin/copilot' and '/home/runner/work/_temp/gh-aw/bin/copilot' are the same file
    

    After that threat-detect is not found on PATH, safe_outputs is skipped and the run ends failure; the agent job is green. The toolcache path (not only a fresh download) hits it, so -ef before the cp, as suggested above, covers it.

    Affected runs, all with a Copilot-CLI detector (pi main engine and a pi-engine pull request review), same single failed step each time: 43105264831, 43106331694 and 43133897143 in IntuitiveWebSolutions/BriteCore (private). The same workflows compiled with v1.2.0 pass, and a Claude-engine workflow (no Copilot detector) on v1.2.2 is not affected. We reverted to v1.2.0 while waiting for a fix.

  4. locked and limited conversation to collaborators on Nov 12, 2026
  5. unlocked this conversation on Nov 12, 2026
  6. kristofer-tdy commented on Nov 12, 2026

    @kristofer-tdy

    I can also confirm, the bug seems to be introduced in "gh aw" 1.2.2, while 1.2.1 works for us.

  7. locked and limited conversation to collaborators on Nov 12, 2026
  8. unlocked this conversation on Nov 12, 2026
  9. MSroczynski3 commented on Nov 19, 2026

    @MSroczynski3

    I can also confirm that using 1.2.1 works for me but 1.2.2 does not.

  10. locked and limited conversation to collaborators on Nov 19, 2026
  11. unlocked this conversation on Nov 19, 2026
  12. bchaintreuil commented on Nov 19, 2026

    @bchaintreuil

    Bug confirmed on my side too

  13. locked and limited conversation to collaborators on Nov 19, 2026
  14. unlocked this conversation on Nov 19, 2026
  15. added
    backlog:runners-tools
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions