Skip to content

fix: replace broken gh-aw install step in token optimizer workflow#24598

Merged
lpcox merged 1 commit intomainfrom
fix/token-optimizer-gh-aw-install
Apr 4, 2026
Merged

fix: replace broken gh-aw install step in token optimizer workflow#24598
lpcox merged 1 commit intomainfrom
fix/token-optimizer-gh-aw-install

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented Apr 4, 2026

Same fix as PR #24590 for the token audit workflow.

Problem

The compiler generates an Install gh-aw extension step that uses gh extension list | grep to detect gh-aw. This fails when gh-aw was already installed via curl | bash (from copilot-setup-steps.yml), causing the step to try gh extension install which also fails.

Fix

  • Import shared/mcp/gh-aw.md so the compiler skips its broken step
  • Remove redundant Install gh-aw CLI step (shared component handles it)

Depends on: #24590 (introduces shared/mcp/gh-aw.md)

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>
Copilot AI review requested due to automatic review settings April 4, 2026 22:27
@lpcox lpcox merged commit 3efa02b into main Apr 4, 2026
90 of 91 checks passed
@lpcox lpcox deleted the fix/token-optimizer-gh-aw-install branch April 4, 2026 22:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-aw install step from copilot-token-optimizer.md.
  • Import shared/mcp/gh-aw.md so 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants