Fix copilot-token-audit failure when aw is already installed#32381
Closed
Copilot wants to merge 3 commits into
Closed
Fix copilot-token-audit failure when aw is already installed#32381Copilot wants to merge 3 commits into
aw is already installed#32381Copilot wants to merge 3 commits into
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Daily Copilot Token Usage Audit workflow failure
Fix copilot-token-audit failure when May 15, 2026
aw is already installed
Collaborator
Collaborator
|
@copilot merge main and recompile |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a daily copilot-token-audit failure by making the Install gh-aw extension step idempotent: it now checks for gh aw --version and installs via the project's install-gh-aw.sh script only when the command is missing, instead of unconditionally running gh extension install github/gh-aw (which fails when another extension already provides aw). The diff also touches ~200 other *.lock.yml files with what appears to be regenerated output (replacing the quoted "on": key with an unquoted on:, plus refreshed heredoc EOF tags).
Changes:
- Gate the install behind
gh aw --versionand usecurl | bashofinstall-gh-aw.shwhen missing incopilot-token-audit.lock.yml. - Remove the previous
gh extension upgrade gh-awbranch for the already-installed case. - Regenerate all other
*.lock.ymlfiles to use an unquotedon:key (and refresh random EOF heredoc tags in a handful of files).
Show a summary per file
| File | Description |
|---|---|
.github/workflows/copilot-token-audit.lock.yml |
The actual bug fix: idempotent gh-aw install via the project installer script. |
.github/workflows/*.lock.yml (≈200 files) |
Cosmetic regeneration: quoted "on": → unquoted on: key, plus randomized heredoc EOF tags in some files. Not mentioned in PR description. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 229/229 changed files
- Comments generated: 2
|
|
||
| name: "Daily Copilot Token Usage Audit" | ||
| "on": | ||
| on: |
Comment on lines
+548
to
552
| # Install gh-aw only if not already available | ||
| if ! gh aw --version >/dev/null 2>&1; then | ||
| echo "Installing gh-aw extension..." | ||
| gh extension install github/gh-aw | ||
| curl -fsSL https://raw.githubusercontent.com/github/gh-aw/refs/heads/main/install-gh-aw.sh | bash | ||
| fi |
Copilot stopped work on behalf of
pelikhan due to an error
May 15, 2026 13:56
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.
Bug Fix
The daily
copilot-token-auditrun onmainfailed in theInstall gh-aw extensionstep because the job attempted to installgithub/gh-aweven when another extension already provided theawcommand. This caused an immediate non-zero exit and stopped the agent job.What was the bug?
gh extension install github/gh-awin environments whereawwas already present, triggering:there is already an installed extension that provides the "aw" commandHow did you fix it?
.github/workflows/copilot-token-audit.lock.ymlto makeInstall gh-aw extensionidempotent:gh aw --version)Testing