Skip to content

fix: token analyzers should always run and close older issues#1626

Merged
lpcox merged 1 commit intomainfrom
fix/token-analyzers-update-existing-issues
Apr 2, 2026
Merged

fix: token analyzers should always run and close older issues#1626
lpcox merged 1 commit intomainfrom
fix/token-analyzers-update-existing-issues

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented Apr 2, 2026

Removes skip-if-match from both token usage analyzers so they run every day regardless of whether a previous report issue is still open. Adds close-older-issues: true so the previous report is automatically closed when a new one is created.

Before: Analyzers skipped if any open issue with the report label existed — meaning they'd only run again after someone manually closed the issue.

After: Analyzers always run on schedule. New report auto-closes the previous one.

Note: Recompiling the lock files also picked up gh-aw toolchain (v0.65.3 → v0.65.5) and AWF (v0.25.5 → v0.25.10) version bumps, which update action SHAs, scripts, and container image tags in the generated workflows.

Remove skip-if-match from both Copilot and Claude token usage
analyzers so they run daily even when a previous report issue is
still open. Add close-older-issues: true to automatically close
the previous report when a new one is created.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lpcox lpcox requested a review from Mossaka as a code owner April 2, 2026 20:06
Copilot AI review requested due to automatic review settings April 2, 2026 20:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 85.81% 85.91% 📈 +0.10%
Statements 85.69% 85.79% 📈 +0.10%
Functions 86.71% 86.71% ➡️ +0.00%
Branches 78.50% 78.55% 📈 +0.05%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 86.1% → 86.5% (+0.40%) 85.6% → 86.0% (+0.39%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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

This PR updates the daily Copilot/Claude token usage analyzer workflows so they no longer skip execution when a prior report issue is still open, and instead automatically close the previous report issue when a new one is created.

Changes:

  • Removed skip-if-match gating so both analyzers run on their schedule regardless of existing open report issues.
  • Added close-older-issues: true to the create-issue safe output configuration so new reports automatically close older ones.
  • Recompiled the generated lock workflows (bringing along gh-aw/AWF/tooling version bumps and related generated workflow step changes).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/copilot-token-usage-analyzer.md Removes skip gating; enables auto-closing older Copilot token usage report issues.
.github/workflows/copilot-token-usage-analyzer.lock.yml Regenerated workflow reflecting removal of pre-activation skip gating + updated safe-outputs config and toolchain versions.
.github/workflows/claude-token-usage-analyzer.md Removes skip gating; enables auto-closing older Claude token usage report issues.
.github/workflows/claude-token-usage-analyzer.lock.yml Regenerated workflow reflecting removal of pre-activation skip gating + updated safe-outputs config and toolchain versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 64 to 84
@@ -78,14 +73,14 @@ jobs:
GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }}
GH_AW_INFO_VERSION: "latest"
GH_AW_INFO_AGENT_VERSION: "latest"
GH_AW_INFO_CLI_VERSION: "v0.65.3"
GH_AW_INFO_CLI_VERSION: "v0.65.5"
GH_AW_INFO_WORKFLOW_NAME: "Daily Copilot Token Usage Analyzer"
GH_AW_INFO_EXPERIMENTAL: "false"
GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
GH_AW_INFO_STAGED: "false"
GH_AW_INFO_ALLOWED_DOMAINS: '["github","*.blob.core.windows.net"]'
GH_AW_INFO_FIREWALL_ENABLED: "true"
GH_AW_INFO_AWF_VERSION: "v0.25.5"
GH_AW_INFO_AWF_VERSION: "v0.25.10"
GH_AW_INFO_AWMG_VERSION: ""
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

This lockfile recompile upgrades the gh-aw toolchain (v0.65.3→v0.65.5) and AWF (v0.25.5→v0.25.10), which introduces additional workflow behavior changes beyond the PR description (e.g., different action SHAs/scripts, container image tags). If the intent is only to remove skip-if-match and auto-close prior reports, consider either (1) calling out these version bumps explicitly in the PR description, or (2) recompiling with the previous gh-aw version to keep the diff minimal.

Copilot uses AI. Check for mistakes.
Comment on lines 64 to 84
@@ -78,14 +73,14 @@ jobs:
GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }}
GH_AW_INFO_VERSION: "latest"
GH_AW_INFO_AGENT_VERSION: "latest"
GH_AW_INFO_CLI_VERSION: "v0.65.3"
GH_AW_INFO_CLI_VERSION: "v0.65.5"
GH_AW_INFO_WORKFLOW_NAME: "Daily Claude Token Usage Analyzer"
GH_AW_INFO_EXPERIMENTAL: "false"
GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
GH_AW_INFO_STAGED: "false"
GH_AW_INFO_ALLOWED_DOMAINS: '["github","*.blob.core.windows.net"]'
GH_AW_INFO_FIREWALL_ENABLED: "true"
GH_AW_INFO_AWF_VERSION: "v0.25.5"
GH_AW_INFO_AWF_VERSION: "v0.25.10"
GH_AW_INFO_AWMG_VERSION: ""
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

This lockfile recompile upgrades the gh-aw toolchain (v0.65.3→v0.65.5) and AWF (v0.25.5→v0.25.10), which introduces additional workflow behavior changes beyond the PR description (updated action SHAs/scripts and container image tags). If the intent is only to remove skip-if-match and auto-close prior reports, either document these version bumps in the PR description or recompile with the older gh-aw version to keep the change focused.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Smoke Test Results

✅ GitHub MCP — feat: add daily token optimization advisor workflows (#1620), perf: reduce smoke-copilot token usage with pre-steps and tool trimming (#1613)
✅ Playwright — github.com title contains "GitHub"
✅ File write — /tmp/gh-aw/agent/smoke-test-claude-23919645768.txt created
✅ Bash verify — file contents confirmed

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude for issue #1626

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🔬 Smoke Test Results

Test Status
GitHub MCP ✅ PR #1620 fetched successfully
GitHub.com HTTP ⚠️ Template vars not substituted (pre-step data unavailable)
File Write/Read ❌ File not found (path template not substituted)
Bash Tool echo "bash works" succeeded

Overall: PARTIAL — MCP and bash functional; pre-step data (HTTP code, file path) was not injected into agent context.

PR by @lpcox · Reviewers: @Mossaka, @Copilot

📰 BREAKING: Report filed by Smoke Copilot

@github-actions github-actions bot mentioned this pull request Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Smoke test results for PR #1626
PR titles: "feat: add daily token optimization advisor workflows"; "perf: reduce smoke-copilot token usage with pre-steps and tool trimming"
GitHub MCP review: ✅
safeinputs-gh PR query: ❌
Playwright GitHub title check: ❌
Tavily search: ❌
File write + bash cat: ✅
AWF build (npm ci && npm run build): ✅
Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for issue #1626 ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Smoke Test: GitHub Actions Services Connectivity ✅

All checks passed:

Check Result
Redis PING (host.docker.internal:6379) PONG
PostgreSQL pg_isready (host.docker.internal:5432) ✅ accepting connections
PostgreSQL SELECT 1 (smoketest db, user postgres) ✅ returned 1

🔌 Service connectivity validated by Smoke Services

@lpcox lpcox merged commit 2b175e2 into main Apr 2, 2026
63 of 65 checks passed
@lpcox lpcox deleted the fix/token-analyzers-update-existing-issues branch April 2, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants