Add smoke-token-telemetry workflow to catch token telemetry emitter regressions#43403
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…-empty Closes #43217 Adds a new smoke CI workflow (.github/workflows/smoke-token-telemetry.md) that runs a minimal copilot LLM call daily and asserts: - At least one token_usage.jsonl file in the agent artifact is non-empty - agent_usage.json reports non-zero input_tokens This catches token-telemetry emitter regressions in hours rather than weeks, protecting api-consumption, detection, and cost audits. The check_token_telemetry custom job runs after the agent job and before the conclusion job; the overall workflow fails fast if the AWF firewall proxy token emitter is broken. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage — Run §28715668077
Adds smoke-token-telemetry workflow. +98 md, +1784 lock.yml, +1 docs. Draft, no CI yet.
|
|
@copilot refactor job into a shared agentic workflow and import into smoke-copilot, smoke-Claude, smoke-codex. Remove new smoke-telemetry agentic workflow |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…import into smoke-copilot, smoke-claude, smoke-codex; remove standalone smoke-token-telemetry workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in the latest commit. The |
|
@copilot use download artifact v8 |
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot import the share agentic workflow to 10 more agentic workflows in this repository |
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared check_token_telemetry job intended to run after smoke workflows’ agent job and validate that firewall token telemetry artifacts are being emitted (via token-usage.jsonl and agent_usage.json) so regressions are caught by CI.
Changes:
- Add a shared workflow fragment (
shared/token-telemetry-check.md) definingcheck_token_telemetry. - Import that shared check into existing smoke workflows (copilot/codex/claude) and update their compiled
.lock.ymloutputs to include the new job. - Update the repository’s Actions lock metadata (
.github/aw/actions-lock.json) as part of the workflow compilation/locking process.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/smoke-copilot.md | Imports the shared token telemetry check into the copilot smoke workflow. |
| .github/workflows/smoke-copilot.lock.yml | Compiled workflow updated to include the check_token_telemetry job and wire it into conclusion. |
| .github/workflows/smoke-codex.md | Imports the shared token telemetry check into the codex smoke workflow. |
| .github/workflows/smoke-codex.lock.yml | Compiled workflow updated to include the check_token_telemetry job and wire it into conclusion. |
| .github/workflows/smoke-claude.md | Imports the shared token telemetry check into the claude smoke workflow. |
| .github/workflows/smoke-claude.lock.yml | Compiled workflow updated to include the check_token_telemetry job and wire it into conclusion. |
| .github/workflows/shared/token-telemetry-check.md | New shared job definition that downloads the agent artifact and asserts token telemetry outputs exist. |
| .github/aw/actions-lock.json | Regenerated/normalized Actions lock data consistent with the updated workflows. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/8 changed files
- Comments generated: 4
- Review effort level: Low
| permissions: | ||
| contents: read |
| - name: Download agent artifact | ||
| id: download-agent | ||
| continue-on-error: true | ||
| uses: actions/download-artifact@v8.0.1 | ||
| with: | ||
| name: agent | ||
| path: /tmp/gh-aw/ | ||
|
|
| echo "::error::All token_usage.jsonl files are empty or missing after a successful agent run." | ||
| echo "::error::The AWF firewall proxy token telemetry emitter may be broken." | ||
| echo "::error::See tracking issue: https://github.com/github/gh-aw/issues/42791" | ||
| exit 1 |
| - shared/github-queries-mcp-script.md | ||
| - shared/mcp/serena-go.md | ||
| - shared/otlp.md | ||
| - shared/token-telemetry-check.md |
|
@copilot please run the
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Implemented in c693971: imported |
|
🎉 This pull request is included in a new release. Release: |
Token telemetry (
token_usage.jsonl/run_summary.json) was silently broken for 13+ days before detection, blinding all downstream token-cost and api-consumption audits. There was no CI guard to catch regressions early.Changes
New workflow:
smoke-token-telemetry.mdengine.commandoverride) so the AWF firewall proxy actually emitstoken_usage.jsonlcheck_token_telemetrycustom job (needs: [agent]) that downloads the agent artifact after a successful run and asserts:token_usage.jsonlis non-empty across the three sandbox pathsagent_usage.jsonreportsinput_tokens > 0::error::annotations referencing the tracking issueUpdated:
docs/src/content/docs/agent-factory-status.mdxAdded the new workflow to the status table.