feat: migrate 50% of agentic workflows from upload-asset to upload-artifact#25342
feat: migrate 50% of agentic workflows from upload-asset to upload-artifact#25342
Conversation
…0-day retention - Update shared/safe-output-upload-artifact.md default retention to 30 days - Migrate audit-workflows.md, org-health-report.md, technical-doc-writer.md, poem-bot.md, deep-report.md, stale-repo-identifier.md (frontmatter + prompts) - Migrate daily-firewall-report.md, daily-performance-summary.md, api-consumption-report.md (frontmatter + significant prompt updates for artifact ID substitution in discussion content) - Update chart-embedding prompts to use upload_artifact tool with tmp_artifact_* IDs and workflow run artifact links - Recompile all 182 workflow lock files" Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d11556eb-0f4b-46a1-968b-0dc573522574 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ester and unbloat-docs org-health-report and stale-repo-identifier both import shared/python-dataviz.md which still provides upload_asset, causing both tools to be present simultaneously. Replaced with docs-noob-tester and unbloat-docs which have clean migrations. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d11556eb-0f4b-46a1-968b-0dc573522574 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Per feedback:
- Replace RUNNER_TEMP with /tmp/gh-aw/ as base folder in upload_artifact.cjs
staging dir, resolver file, tool descriptions, shared workflow, and all prompts
- Change upload_artifact temporary ID format from tmp_artifact_XXXXXXXXXXXXXXXXXXXXXXXXXX
to aw_XXXXXXXX (matching the format used by other safe outputs)
- Update test expectations to match new aw_[A-Za-z0-9]{8} pattern
- Update safe_outputs_tools.json (both copies) with new paths and ID format
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cdabdbbc-34fe-4cf8-a5e9-b5d6f8d762d8
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in dd17133:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| ### 🔗 GitHub API Calls Trend (90 days) | ||
|
|
||
|  | ||
| 📎 **Chart: GitHub API Calls Trend** — artifact `{api_calls_trend_aw_id}` available in the [workflow run artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
There was a problem hiding this comment.
Fixed in 79e559c. All 5 chart references are now hyperlinks to the workflow run artifacts page, e.g.:
📎 **[Chart: GitHub API Calls Trend](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})** — artifact `{api_calls_trend_aw_id}`
| default-retention-days: 30 | ||
| max-retention-days: 30 |
There was a problem hiding this comment.
Fixed in 79e559c. Added max-uploads: 5 (to support all 5 charts) and kept default-retention-days: 30 and max-retention-days: 30 explicitly. Also added skip_archive: true to the tool call instruction in the prompt.
…tifacts - Add allow.skip-archive: true to upload-artifact config (allow single-file uploads without zip archiving) - Add max-uploads: 5 to support uploading all 5 charts (was defaulting to 1) - Update retention days to 30 (kept explicit default-retention-days: 30 and max-retention-days: 30) - Add skip_archive: true to the upload_artifact tool call instruction in prompt - Make all 5 chart artifact references hyperlinks to the workflow run artifacts page so readers can download the charts directly Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f899c209-e6db-4d6a-90d9-9f8034aaf93d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot refactor upload-artifact to move the configurations as field in the front matter, not a tool call. upload-artifact: do not allow these values to be set by the agent. They are fixed. Remove max-retention-days, default-retention-days fields. |
…ntmatter config The agent can no longer set `retention_days` or `skip_archive` in tool calls — these are now fixed workflow configuration. Changes: - `UploadArtifactConfig`: replace `DefaultRetentionDays`/`MaxRetentionDays`/ `ArtifactAllowConfig`/`ArtifactDefaultsConfig.SkipArchive` with two new templatable fields: `RetentionDays *string` and `SkipArchive *string` - `parseUploadArtifactConfig`: parse new fields using preprocessIntFieldAsString and preprocessBoolFieldAsString (supports GH Actions expressions) - `compiler_safe_outputs_config.go`: serialize new fields via AddTemplatableInt / AddTemplatableBool instead of old allow-skip-archive / default-retention-days - `upload_artifact.cjs`: use fixed `retention-days` and `skip-archive` from config; remove agent-controlled `retention_days` / `skip_archive` message fields; remove `clampRetention` helper - Both `safe_outputs_tools.json`: remove `retention_days` and `skip_archive` from the tool input schema (agent cannot set these) - `main_workflow_schema.json`: add `retention-days` + `skip-archive` (templatable) and remove `default-retention-days`, `max-retention-days`, `allow`, and `defaults.skip-archive` - `shared/safe-output-upload-artifact.md`: update defaults - All 9 migrated workflows + smoke-copilot.md: replace old frontmatter fields with new ones; remove `retention_days`/`skip_archive` from tool call instructions - Update Go and JS test files to cover new API Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c048f9ab-1d7e-49df-8dc0-24c7eec06584 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c048f9ab-1d7e-49df-8dc0-24c7eec06584 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in e462f5e (with 016cbca fixing a review issue). The upload-artifact:
retention-days: 30 # templated int — fixed, agent cannot override
skip-archive: true # templated bool — fixed, agent cannot override
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Migrates 9 of 17 agentic workflows (~53%) that use
upload-assetsafe output to useupload-artifactsafe output instead. Refactors theupload-artifactconfiguration so thatretention-daysandskip-archiveare fixed frontmatter fields rather than agent-settable tool call parameters.Changes
upload-artifactconfiguration refactoring (all workflows)retention-daysandskip-archiveare now fixed workflow configuration — the agent cannot override them:default-retention-daysandmax-retention-daysfields removedallow.skip-archiveanddefaults.skip-archiveremovedretention_daysandskip_archiveremoved from theupload_artifacttool input schema (bothsafe_outputs_tools.jsoncopies) — agents can no longer pass these valuesupload_artifact.cjshandler now reads fixed values from config;skip-archiveenforces a single-file constraint but does not alter the upload API callmain_workflow_schema.jsonupdated with newretention-days(templatable int) andskip-archive(templatable bool) propertiesUploadArtifactConfig) and compiler updated accordinglyshared/safe-output-upload-artifact.mdretention-days: 30,skip-archive: true,max-uploads: 3/tmp/gh-aw/safeoutputs/upload-artifacts/upload_artifact.cjs(core handler)/tmp/gh-aw/aw_XXXXXXXX(8 alphanumeric), matching other safe outputs such ascreate_issue/tmp/gh-aw/artifact-resolver.jsonsafe_outputs_tools.json(both copies)retention_daysandskip_archivefrom tool input schemaMigrated Workflows (9/17 ≈ 50%)
Group 1 — Frontmatter + minimal prompt update:
audit-workflows.md—retention-days: 30technical-doc-writer.md—retention-days: 30poem-bot.md—retention-days: 30deep-report.md—retention-days: 30Group 2 — Frontmatter + chart artifact ID substitution:
daily-firewall-report.md—retention-days: 30,skip-archive: true; chart upload instructions updateddaily-performance-summary.md—retention-days: 30,skip-archive: true; chart upload instructions updatedapi-consumption-report.md—retention-days: 30,skip-archive: true,max-uploads: 5; all 5 chart artifact references are hyperlinks to the workflow run artifacts pageGroup 3 — Frontmatter + screenshot artifact ID substitution:
docs-noob-tester.md—retention-days: 30,skip-archive: trueunbloat-docs.md—retention-days: 30,skip-archive: trueAlso updated
smoke-copilot.md(pre-existing workflow) — migrated from olddefault-retention-days/max-retention-days/allow.skip-archiveto newretention-days: 1,skip-archive: trueNot Migrated (8/17 workflows)
portfolio-analyst.md,python-data-charts.md,daily-news.md,daily-repo-chronicle.md— heavily rely on inline chart image embedding (requires permanent URLs)weekly-editors-health-check.md— embeds screenshots in MDX documentation files (requires permanent URLs)org-health-report.md,stale-repo-identifier.md— importshared/python-dataviz.mdwhich still providesupload_asset, causing conflicting tool availabilityHow the Prompt Changes Work
For chart-embedding workflows, the pattern changes from:
To:
The
aw_*temporary IDs are consistent with other safe outputs, and chart names link directly to the workflow run artifacts page for download.