fix(workflows): restore agentic workflows by authenticating Copilot with copilot-requests - #274
Open
DimaBir wants to merge 2 commits into
Open
fix(workflows): restore agentic workflows by authenticating Copilot with copilot-requests#274DimaBir wants to merge 2 commits into
DimaBir wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
All three agentic workflows have failed on every run since 2026-05-07:
They trigger correctly and every setup step succeeds. The
Execute GitHub Copilot CLIstep is where they die:The workflows authenticate Copilot inference with a
COPILOT_GITHUB_TOKENPAT secret. That PAT is no longer accepted at the inference step, so the agent container starts, passes its proxy health checks, and then exits 1 before doing any work.Because the failure is inside the agent job and the
conclusionjob still succeeds, this has been failing silently — no triage comments have been posted on any issue for roughly two months.Fix
gh-aw now supports authenticating Copilot inference with the GitHub Actions token via the
copilot-requests: writepermission, which the upstream docs list as the recommended option withCOPILOT_GITHUB_TOKENas the legacy fallback. This removes the PAT from the inference path entirely.Two commits:
fix(workflows): authenticate agentic workflows with copilot-requests instead of a PAT— frontmatter only.copilot-requests: writeto thepermissions:block of all three workflows.tools.fetch→tools.web-fetch. Thefetchkey was removed from the gh-aw schema; the current compiler rejects it outright, and per-tool domain allowlists now consolidate intonetwork.allowed.ci-doctordeclaredfetch.allowed: [](no domains permitted), so the block is dropped rather than migrated.msdo-breach-monitorgainsnodeinnetwork.allowed, preserving theregistry.npmjs.orgaccess its oldfetch.allowedlist declared.raw.githubusercontent.comneeded no entry — the compiler confirms thegithubecosystem identifier already covers it.MAINTENANCE NOTEheaders, which named v0.61.0 specifically and are stale after this bump.chore(workflows): recompile agentic workflows with gh-aw v0.83.4— generated output..lock.ymlfiles and.github/aw/actions-lock.json, produced bygh aw compile. Large diff is inherent: the toolchain moves v0.61.0 → v0.83.4.The effective change at the failure point:
- name: Execute GitHub Copilot CLI env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} + COPILOT_GITHUB_TOKEN: ${{ github.token }}The blocking
validate_multi_secret.sh COPILOT_GITHUB_TOKENpreflight step is also gone, replaced by a non-blocking OAuth-token hygiene check.Validation
npm run buildAndTestdoes not apply — nosrc/orlib/file is touched, and it cannot run in this environment regardless (devDependencies absent, npm registry fails TLS handshake).What was actually run:
gh aw compile— 3 workflows, 0 errors, 0 warnings..lock.ymlfiles viayaml.safe_load— all parse; job graphs intact (activation,agent,detection,safe_outputs,conclusion).agentanddetectionjobs in all three workflows carrycopilot-requests: writeand that everyExecute GitHub Copilot CLIstep resolvesCOPILOT_GITHUB_TOKENto${{ github.token }}.MAINTENANCE NOTEguards: all 83actions/github-scriptreferences remain3a2844b7e9c422d3c10d287c895573f7108da1b3(v9.0.0). v0.83.4 does not regress it.Note on prerequisites
copilot-requests: writerequires the organization to have a Copilot subscription with centralized billing enabled. If the Actions token turns out to lack Copilot access, the inference step will still fail andCOPILOT_GITHUB_TOKENwould need to be restored with a valid PAT instead. The first run after merge will confirm which applies.The
COPILOT_GITHUB_TOKENsecret is left in place. It is ignored for inference while this permission is set, so it costs nothing to keep and preserves a rollback path.