Add usage artifact download step to conclusion job#38454
Conversation
- Add AWInfoFilename and AgentUsageStreamFilename constants - generateUsageArtifactPreUpload: agent job uploads aw-info.jsonl and agent_usage.jsonl to the 'usage' artifact (firewall-gated) - buildUsageArtifactDownloadSteps: conclusion job downloads the usage artifact before collecting/re-uploading the complete usage artifact - buildUsageArtifactUploadSteps: add overwrite:true so the conclusion job's complete upload replaces the agent job's initial upload - Update golden files and add/update tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot Rename the usage artifact created by the agent-job to agent-usage to avoid a naming conflict, and update all references where it is downloaded. |
There was a problem hiding this comment.
Pull request overview
This PR ensures AWF-produced usage logs (aw-info.jsonl, agent_usage.jsonl) are actually preserved by wiring them into a dedicated usage artifact flow: the agent job uploads a minimal usage artifact after execution, and the conclusion job downloads it before collecting and re-uploading the final, complete usage artifact (with overwrite: true) so the “usage” artifact is no longer silently incomplete.
Changes:
- Added new filename constants for AWF event log + streaming token usage JSONL.
- Added a conclusion-job step to download the agent job’s compact
usageartifact prior to collecting/uploading the final usage artifact. - Updated workflow lockfiles and golden fixtures to reflect the additional artifact steps and overwrite behavior.
Show a summary per file
| File | Description |
|---|---|
| pkg/constants/job_constants.go | Adds constants for aw-info.jsonl and agent_usage.jsonl filenames. |
| pkg/workflow/safe_outputs_steps.go | Adds buildUsageArtifactDownloadSteps helper for downloading the usage artifact into /tmp/gh-aw/. |
| pkg/workflow/notify_comment.go | Inserts “Download usage artifact” into the conclusion job and enables overwrite: true on the final usage upload. |
| pkg/workflow/notify_comment_test.go | Extends tests to assert the download step and overwrite behavior are present. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden | Updates golden workflow to include the agent-job “Upload usage artifact” step. |
| .github/workflows/workflow-normalizer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/workflow-health-manager.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/workflow-generator.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/weekly-issue-summary.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/weekly-editors-health-check.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/video-analyzer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/update-astro.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/unbloat-docs.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/typist.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/tidy.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/test-workflow.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/test-quality-sentinel.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/test-project-url-default.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/test-dispatcher.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/test-create-pr-error-handling.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/technical-doc-writer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/super-linter.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/step-name-alignment.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/static-analysis-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/spec-librarian.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/spec-extractor.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/spec-enforcer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-project.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-pi.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-gemini.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-codex.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-claude.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-ci.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/smoke-antigravity.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/slide-deck-maintainer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/sergo.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/security-review.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/security-compliance.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/scout.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/schema-feature-coverage.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/schema-consistency-checker.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/safe-output-health.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/research.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/repo-tree-map.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/release.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/refiner.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/refactoring-cadence.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/q.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/python-data-charts.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/pr-triage-agent.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/poem-bot.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/plan.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/pdf-summary.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/outcome-collector.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/org-health-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/objective-impact-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/notion-issue-summary.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/necromancer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/metrics-collector.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/mergefest.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/mcp-inspector.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/lockfile-stats.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/linter-miner.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/lint-monster.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/layout-spec-maintainer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/jsweep.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/issue-monster.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/instructions-janitor.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/hippo-embed.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/grumpy-reviewer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/gpclean.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/go-pattern-detector.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/go-logger.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/go-fan.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/glossary-maintainer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/github-mcp-tools-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/firewall.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/firewall-escape.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/example-permissions-warning.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/docs-noob-tester.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/discussion-task-miner.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/dictation-prompt.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/dev.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/dev-hawk.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/delight.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/deep-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/dead-code-remover.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-team-status.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-sentrux-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-security-red-team.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-security-observability.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-secrets-analysis.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-regulatory.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-performance-summary.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-news.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-issues-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-function-namer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-firewall-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-fact.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-experiment-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-doc-updater.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-doc-healer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-credit-limit-test.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-compiler-quality.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-community-attribution.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-code-metrics.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-cli-performance.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-choice-test.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/daily-architecture-diagram.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/craft.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-session-insights.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-opt.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/copilot-agent-analysis.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/contribution-check.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/constraint-solving-potd.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/code-simplifier.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/code-scanning-fixer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/cloclo.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/cli-version-checker.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/ci-doctor.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/ci-coach.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/changeset.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/brave.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/bot-detection.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/avenger.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/audit-workflows.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/artifacts-summary.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/archie.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/approach-validator.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/api-consumption-report.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/agent-persona-explorer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/agent-performance-analyzer.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/ace-editor.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
| .github/workflows/ab-testing-advisor.lock.yml | Adds upload/download usage artifact steps and enables overwrite on the final usage upload. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 260/260 changed files
- Comments generated: 1
| // Add artifact download steps once (shared by noop and conclusion steps). | ||
| // In workflow_call context, use the per-invocation prefix to avoid artifact name clashes. | ||
| steps = append(steps, buildAgentOutputDownloadSteps(artifactPrefixExprForDownstreamJob(data), c.getActionPin)...) | ||
| // Download the usage artifact uploaded by the agent job (aw-info.jsonl, agent_usage.jsonl) | ||
| // so they are available when the usage artifact is assembled below. | ||
| steps = append(steps, buildUsageArtifactDownloadSteps(artifactPrefixExprForDownstreamJob(data), c.getActionPin)...) | ||
| // Package a compact usage artifact so forecasting/analytics commands can fetch | ||
| // token usage and aw_info without downloading full agent artifacts. | ||
| steps = append(steps, buildUsageArtifactUploadSteps(artifactPrefixExprForDownstreamJob(data), c.getActionPin)...) |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in the latest commit. Added |
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. The |
|
🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧 |
|
🚀 Smoke Antigravity MISSION COMPLETE! Antigravity has spoken. ✨ |
|
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
|
📰 BREAKING: Smoke Copilot - AOAI (apikey) is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
💥 Smoke Test: Claude — Run 27315872424Core #1-12: ✅ all passed Overall: PARTIAL (1 conditional skip) — engine nominal! 🦸 Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
💥 [THE END] — Illustrated by Smoke Claude · 79.8 AIC · ⌖ 25.5 AIC
| name: cache-memory | ||
| include-hidden-files: true | ||
| path: /tmp/gh-aw/cache-memory | ||
| - name: Upload usage artifact |
There was a problem hiding this comment.
The new "Upload usage artifact" step uses continue-on-error and if-no-files-found: ignore — good defensive defaults so non-firewall runs do not fail when these JSONL files are absent.
| mkdir -p /tmp/gh-aw/ | ||
| find "/tmp/gh-aw/" -type f -print | ||
| echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" | ||
| - name: Download usage artifact |
There was a problem hiding this comment.
Consider gating this "Download usage artifact" step on isFirewallEnabled to match the upload step, avoiding noisy artifact-not-found logs in non-firewall workflows.
|
Commit pushed:
|
|
Smoke 27315898580 Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
aw-info.jsonlandagent_usage.jsonlare written by the AWF container during agent execution but were never uploaded to any artifact, so the conclusion job's collect step silently skipped them and the finalusageartifact was incomplete.Changes
New constants (
pkg/constants/job_constants.go)AWInfoFilename(aw-info.jsonl) — AWF event logAgentUsageStreamFilename(agent_usage.jsonl) — per-call streaming token usage; distinct from the aggregatedagent_usage.jsonAgentUsageArtifactName(agent-usage) — name of the compact artifact uploaded by the agent job; distinct from the finalusageartifact produced by the conclusion jobAgent job: pre-upload compact usage artifact (
compiler_yaml_main_job.go)generateUsageArtifactPreUpload: when firewall is enabled, uploadsaw-info.jsonlandagent_usage.jsonlto theagent-usageartifact after executionConclusion job: download step + overwrite (
safe_outputs_steps.go,notify_comment.go)buildUsageArtifactDownloadSteps: new "Download usage artifact" step inserted between the agent artifact download and the collect step — downloads from theagent-usageartifact and places both files at/tmp/gh-aw/where the collect step expects themoverwrite: trueon the conclusion job's upload so its complete set (firewall token-usage JSONL, detection data, etc.) replaces the agent job's initial uploadFlow
✨ PR Review Safe Output Test - Run 27315872424
Warning
Firewall blocked 6 domains
The following domains were blocked by the firewall during workflow execution:
accounts.google.comandroid.clients.google.comclients2.google.comcontentautofill.googleapis.comsafebrowsingohttpgateway.googleapis.comwww.google.comSee Network Configuration for more information.
Changeset\n\n- Type: patch\n- Description: Fix usage artifact collection so the conclusion job downloads the agent-generated and before building the final artifact.