fix: replace broken gh-aw install step in token optimizer workflow#24598
Merged
fix: replace broken gh-aw install step in token optimizer workflow#24598
Conversation
Same fix as PR #24590 for the token audit workflow. The compiler generates an 'Install gh-aw extension' step using 'gh extension list | grep' which fails when gh-aw was installed via curl. Fix: import shared/mcp/gh-aw.md which uses 'gh aw --version' for detection and curl-based install as fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Copilot token optimizer workflow to use the shared, robust gh-aw installation/component logic (matching the fix already applied to the token audit workflow), avoiding failures caused by the compiler-generated gh extension list | grep detection.
Changes:
- Remove the workflow-local
gh-awinstall step fromcopilot-token-optimizer.md. - Import
shared/mcp/gh-aw.mdso compilation uses the shared install + binary-staging logic. - Regenerate the compiled workflow (
.lock.yml) to reflect the new import and to remove the broken install behavior.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/copilot-token-optimizer.md | Removes redundant local install step and imports the shared gh-aw MCP component. |
| .github/workflows/copilot-token-optimizer.lock.yml | Regenerated compiled workflow reflecting the shared gh-aw install logic and updated imports. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
Same fix as PR #24590 for the token audit workflow.
Problem
The compiler generates an
Install gh-aw extensionstep that usesgh extension list | grepto detect gh-aw. This fails when gh-aw was already installed viacurl | bash(fromcopilot-setup-steps.yml), causing the step to trygh extension installwhich also fails.Fix
shared/mcp/gh-aw.mdso the compiler skips its broken stepInstall gh-aw CLIstep (shared component handles it)Depends on: #24590 (introduces
shared/mcp/gh-aw.md)