Move prompt generation to activation job with artifact transfer#16209
Move prompt generation to activation job with artifact transfer#16209
Conversation
… upload/download Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… moved to pre_activation Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot move print prompt step to activation job too |
The Print prompt step is already in the pre_activation job. When I moved the 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:
|
There was a problem hiding this comment.
Pull request overview
This PR moves prompt rendering/validation from the agent job to the pre-activation job and transfers the resulting prompt.txt to the agent job via an uploaded/downloaded artifact, enabling earlier failures and improving retry behavior.
Changes:
- Generate the full prompt (render/interpolate/substitute/validate) during
pre_activationand upload it as an artifact (prompt). - Download the
promptartifact in the agent job and remove local prompt generation there. - Update compiled workflow lockfiles to reflect the new “download prompt artifact” step in agent jobs.
Reviewed changes
Copilot reviewed 87 out of 156 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_yaml_main_job.go | Replaces in-agent prompt generation with an artifact download step. |
| pkg/workflow/compiler_activation_jobs.go | Adds prompt generation to pre-activation and uploads prompt.txt as an artifact. |
| .github/workflows/workflow-skill-extractor.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/workflow-normalizer.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/typist.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/test-workflow.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/test-project-url-default.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/test-dispatcher.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/terminal-stylist.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/sub-issue-closer.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/semantic-function-refactor.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/repo-tree-map.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/layout-spec-maintainer.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/issue-triage-agent.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/issue-arborist.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/functional-pragmatist.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/firewall.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/example-workflow-analyzer.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/example-permissions-warning.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/draft-pr-cleanup.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/dictation-prompt.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/dev.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/dependabot-go-checker.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-workflow-updater.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-semgrep-scan.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-secrets-analysis.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-fact.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-choice-test.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/cli-consistency-checker.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
| .github/workflows/chroma-issue-indexer.lock.yml | Agent job now downloads prompt artifact instead of generating prompt inline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Download prompt artifact from activation job | ||
| compilerYamlLog.Print("Adding prompt artifact download step") | ||
| yaml.WriteString(" - name: Download prompt artifact\n") | ||
| yaml.WriteString(" continue-on-error: true\n") | ||
| fmt.Fprintf(yaml, " uses: %s\n", GetActionPin("actions/download-artifact")) | ||
| yaml.WriteString(" with:\n") | ||
| yaml.WriteString(" name: prompt\n") | ||
| yaml.WriteString(" path: /tmp/gh-aw/aw-prompts\n") |
There was a problem hiding this comment.
The prompt download step is marked continue-on-error: true, but the agent job no longer generates prompt.txt locally. If the artifact is missing (e.g., workflows where the pre-activation job is not created, or an upload/download failure), the job will proceed and later steps that read /tmp/gh-aw/aw-prompts/prompt.txt will fail with a less actionable error. Consider either (a) making the download step fail the job (remove continue-on-error) and ensuring the agent job always needs the pre-activation job, or (b) conditionally falling back to local prompt generation when the artifact is absent.
…endering-validation
|
@copilot the prompt generation must be done in "activation" job, NOT "pre_activation" |
…back - Remove continue-on-error from download step to fail fast if artifact is missing - Change upload step from if: always() to if: success() to prevent misleading errors - Remove continue-on-error from upload step - Fix misleading comment in generatePromptInActivationJob 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:
|
Per @pelikhan feedback, prompt generation must be in the "activation" job, not "pre_activation". - Removed prompt generation and upload steps from buildPreActivationJob - Added prompt generation and upload steps to buildActivationJob - All tests pass, workflows compile successfully with prompt in activation job Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit 7df64a0. Prompt generation is now in the "activation" job, not "pre_activation". The job flow is now: pre_activation → activation (generates prompt) → agent (downloads prompt). 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:
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
❌ Smoke Copilot SDK failed. Please review the logs for details. |
|
🧪 Smoke Project is now testing project operations... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🧪 Smoke Temporary ID is now testing temporary ID functionality... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Agent Container Tool Check ✅
Result: 12/12 tools available ✅
|
|
✅ Smoke Temporary ID completed successfully. Temporary ID validation passed. |
|
✅ Smoke Project completed successfully. All project operations validated. |
Smoke Test Results - Run 22078648094PRs Tested:
Test Results:
Status: PASS ✅ cc:
|
|
PRs (merged): #16216 Add CI check to prevent release-compiled lock files; #16213 🌐 Update allowed domains for workflow configuration
|
|
🎭 The smoke test agent has arrived! We're exploring your enterprise cloud setup question while running validation tests. Stay tuned! ✨
|
There was a problem hiding this comment.
Prompt generation refactoring looks solid. The new activation job approach with artifact transfer improves workflow organization.
📰 BREAKING: Report filed by Smoke Copilot for issue #16209
| .github | ||
| .agents | ||
| fetch-depth: 1 | ||
| persist-credentials: false |
There was a problem hiding this comment.
Good change - sparse checkout reduces clone time significantly.
| GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} | ||
| GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
| GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | ||
| GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} |
There was a problem hiding this comment.
The prompt generation consolidation looks clean - good refactoring.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Ok
في الاثنين، ١٦ فبراير ٢٠٢٦، ٢٢:٣٦ Peli de Halleux ***@***.***>
كتب:
… Merged #16209 <#16209> into main.
—
Reply to this email directly, view it on GitHub
<#16209 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/B2DFN3XFQWNABU5TAG2RNTD4MJA6VAVCNFSM6AAAAACVKKFG32VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRSHAZTOMBZGYZDQNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Move Prompt Generation to Activation Job ✅
Prompt rendering and validation now execute in the activation job instead of the agent job, with prompt.txt transferred via artifact upload/download.
Changes
Activation job (
compiler_activation_jobs.go)generatePromptInActivationJob()method that generates all prompt stepsgenerateCheckoutGitHubFolderForActivation()to checkout .github and .agents folders before prompt generationgeneratePrompt()to create prompt with built-in context, interpolation, substitution, and validationif: success()conditionAgent job (
compiler_yaml_main_job.goandcompiler_activation_jobs.go)Workflow Structure
Error Handling
Based on code review feedback:
if: success()to prevent uploading missing/invalid artifactscontinue-on-error)Benefits
All 154 workflows compile successfully with the new structure.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
✨ PR Review Safe Output Test - Run 22077314017
Changeset
.githuband.agentssparse checkout into the activation job so prompt rendering validation and other activation-time steps can rely on the repository files before the agent job runs, and regenerate the workflows to capture the new setup.