Optimize CLI version checker workflow based on performance analysis#2208
Merged
Optimize CLI version checker workflow based on performance analysis#2208
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add max-turns limit (30) to prevent runaway loops - Enable cache-memory for persistent state across runs - Add npm view and npm list bash commands for efficient package metadata queries - Add efficiency guidelines for parallel fetching, cache usage, and early exit - Add error handling improvements with cache-memory integration Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize CLI version checker based on performance analysis
Optimize CLI version checker workflow based on performance analysis
Oct 23, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
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.
Overview
This PR optimizes the CLI version checker workflow based on analysis of 13 recent runs (Oct 16-22, 2025) which revealed significant performance and reliability issues:
Changes Made
1. Added max-turns Limit
This directly addresses the runaway loop issue where failed runs consumed 55-108 turns. Setting a limit of 30 (based on successful runs averaging 23-24 turns) prevents excessive iteration while allowing sufficient time for legitimate updates.
2. Enabled Persistent Cache Storage
Provides persistent storage at
/tmp/gh-aw/cache-memory/across workflow runs to:3. Added Efficient npm Commands
Replaces web-fetch calls to NPM registry with native npm CLI commands for faster, more reliable package metadata queries.
4. Enhanced Efficiency Guidelines
Added comprehensive optimization instructions:
5. Improved Error Handling
Expected Improvements
Based on the performance analysis:
Testing
gh-aw compile cli-version-checker)make test-unit)make fmt)Related Issue
Fixes issue created by Q workflow run: https://github.com/githubnext/gh-aw/actions/runs/18738365042
Original prompt
This section details on the original issue you should resolve
<issue_title>[q] Optimize CLI version checker based on performance analysis</issue_title>
<issue_description># Q Workflow Optimization Report
Issues Found (from live data)
CLI Version Checker Workflow
Changes Made
cli-version-checker.md
Performance Optimization:
Added max-turns limit: Set to 30 to prevent runaway loops
Enabled cache-memory: Persistent state across runs
Added npm tools:
npm view *andnpm list *bash commandsEfficiency Guidelines Added:
Error Handling Improvements:
Expected Improvements
Based on analysis of successful vs failed runs:
Validation
Workflow compiled successfully using the
compiletool from gh-aw MCP server:Note: .lock.yml file will be generated automatically after merge.
References
Show patch preview (159 of 159 lines)