fix: rename and scope token analyzer to Copilot workflows#1588
Conversation
- Add *.blob.core.windows.net to network allowed domains so gh run download can fetch artifact zips directly via bash - Scope analysis to Copilot-engine workflows only to stay within the 15-minute time budget - Add time budget guidance and prefer-bash-over-MCP hint Fixes timeout in run 23875151303 caused by blocked artifact downloads forcing slow MCP get_job_logs fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Updates the token-usage analyzer agentic workflow to avoid 15-minute timeouts by unblocking fast artifact downloads and narrowing analysis scope to Copilot-engine workflows.
Changes:
- Add Azure Blob Storage wildcard to the workflow’s
network.allowedlist to unblockgh run downloadartifact retrieval. - Narrow run discovery/analysis instructions to Copilot-engine workflows and add explicit time-budget + “prefer bash” guidance.
- Recompile the generated workflow lockfile to reflect updated frontmatter and derived allowed domains.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/token-usage-analyzer.md |
Adds blob domain to allowed network egress and tightens the analyzer’s instructions/scope to reduce runtime. |
.github/workflows/token-usage-analyzer.lock.yml |
Regenerated compiled workflow reflecting the updated network allowlist and prompt content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| network: | ||
| allowed: | ||
| - github | ||
| - "*.blob.core.windows.net" |
There was a problem hiding this comment.
Allowing *.blob.core.windows.net meaningfully broadens outbound access to essentially any Azure Blob Storage account. If the goal is only GitHub Actions artifact downloads, consider narrowing this to the specific artifact storage host(s) observed (e.g., productionresultssa*.blob.core.windows.net) or another more targeted pattern, to preserve least-privilege egress while still unblocking gh run download.
| - "*.blob.core.windows.net" | |
| - "productionresultssa*.blob.core.windows.net" |
Smoke Test Results✅ GitHub MCP: #1586 fix: recompile token-usage-analyzer lock file, #1585 Feat/token usage analyzer workflow Overall: PASS
|
Smoke Test Results
Overall: PASS —
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
the workflow is named token-usage-analyzer so I think the original one working on multiple engines make more sense. If # of runs is the main concern we can set max 20 runs in the last 24 hours. |
|
@copilot rename the workflow to reflect that it only looks at copilot token usage |
Reflects that the workflow is scoped to Copilot-engine workflows only. Updates description, title-prefix, heading, and recompiles. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
863759a to
a80c631
Compare
|
Smoke Test Results ✅ GitHub MCP — Last 2 merged PRs: Overall: PASS
|
|
Smoke Test Results (run #23877180941) ✅ GitHub MCP — Last merged PR: #1586 "fix: recompile token-usage-analyzer lock file" ( Overall: PASS PR author:
|
Smoke Test: GitHub Actions Services Connectivity ✅
All checks passed.
|
|
Smoke test results:
|
Problem
The token-usage-analyzer workflow timed out at 15 minutes (run 23875151303) due to two issues:
gh run downloadcallscurlagainstproductionresultssa3.blob.core.windows.net, which wasn't in allowed domainsChanges
token-usage-analyzer→copilot-token-usage-analyzerto reflect Copilot-only scope*.blob.core.windows.nettonetwork.allowedsogh run downloadworks via bash📊 Copilot Token Usage Report