Smoke Copilot activation fails when repository checkout removes gh-aw setup action before cleanup

Chiusa
#15,858 0 commenti 1 reazione 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@lpcox ci sta già lavorando.

Dal 1/11/2026.

  • #15859 di @copilot-swe-agent — chiusa senza merge

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Problem

The Smoke Copilot workflow fails during activation's post-job cleanup because a later repository checkout deletes the local gh-aw setup action. The agent never starts, so the smoke test does not exercise Copilot or the MCP gateway.

Observed failure

Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/gh-aw-mcpg/gh-aw-mcpg/actions/setup'. Did you forget to run actions/checkout before running your local action?

All regular activation steps succeeded, including prompt preparation and artifact uploads. The cleanup failure marked activation as failed, and the agent, conclusion, and safe_outputs jobs were skipped.

Root cause

The generated workflow uses the same workspace directory for two different repositories:

  1. Checkout actions folder checks out github/gh-aw into the workspace root, with a sparse checkout of actions.

  2. Setup Scripts invokes uses: ./actions/setup. Runtime scripts are copied to ${{ runner.temp }}/gh-aw/actions, but the local action definition remains in the workspace.

  3. Checkout .github and .agents folders checks out github/gh-aw-mcpg into that same workspace root. The run log explicitly reports:

    2026-11-01T21:13:09.7718579Z Deleting the contents of '/home/runner/work/gh-aw-mcpg/gh-aw-mcpg'
    
  4. At job teardown, GitHub Actions attempts to load the local setup action for its post step, but actions/setup/action.yml is gone.

The second checkout includes actions/setup in its sparse-checkout list, but that selects paths from github/gh-aw-mcpg; it cannot preserve files from the previous github/gh-aw checkout. Copying runtime scripts to the runner temp directory likewise does not preserve the local action metadata that the runner needs for cleanup.

Proposed fix

Fix the gh-aw workflow generator so the setup action checkout survives every later checkout until all post-job hooks finish. Do not hand-edit this generated lock file as the permanent fix.

Prefer an isolated layout: check out github/gh-aw into a dedicated workspace-relative directory, update local setup-action references accordingly, and ensure subsequent target-repository checkouts cannot delete that directory. This requires coordinating both checkout locations; merely adding path: to the first checkout while continuing to replace the workspace root is insufficient. Update any script paths that depend on the layout.

An alternative worth evaluating is invoking the setup action directly through a pinned github/gh-aw/actions/setup@<revision> reference, which lets the runner manage its action directory separately from the target checkout. Confirm compatibility with setup's repository-relative dependencies before choosing this approach.

Once the generator fix is available, regenerate the affected workflows in this repository using the supported compiler path. Inspect other generated workflows for the same checkout/setup pattern; recurrence beyond this run has not yet been established.

Acceptance criteria

  • The setup action definition and any post-step dependencies remain available through job teardown after the target repository checkout.
  • Add a generator regression test covering setup from github/gh-aw followed by a checkout of a different repository.
  • Verify in a hosted Actions run that Post Setup Scripts succeeds and the Smoke Copilot agent job starts when activation otherwise succeeds.
  • Regenerated locks preserve the intended repository checkout, prompt preparation, and setup/cleanup behavior.

Scope of evidence

This diagnosis is based on the failed run's job statuses and logs and the workflow configuration at the failed revision. No patch or rerun has been performed.

Lingua principale
Go
Stelle
184
Fork
58
Merge medio
7h 42m
PR unite (30g)
186

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/gh-aw-mcpg

Tutte le issue di github/gh-aw-mcpg

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.