Add environment variable mirroring from runner to agent container#11980
Add environment variable mirroring from runner to agent container#11980
Conversation
…itial plan) Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
…irroring # Conflicts: # .github/workflows/agent-performance-analyzer.lock.yml # .github/workflows/agent-persona-explorer.lock.yml # .github/workflows/ai-moderator.lock.yml # .github/workflows/archie.lock.yml # .github/workflows/artifacts-summary.lock.yml # .github/workflows/auto-triage-issues.lock.yml # .github/workflows/brave.lock.yml # .github/workflows/breaking-change-checker.lock.yml # .github/workflows/chroma-issue-indexer.lock.yml # .github/workflows/ci-coach.lock.yml # .github/workflows/ci-doctor.lock.yml # .github/workflows/cli-consistency-checker.lock.yml # .github/workflows/code-scanning-fixer.lock.yml # .github/workflows/code-simplifier.lock.yml # .github/workflows/copilot-cli-deep-research.lock.yml # .github/workflows/copilot-pr-merged-report.lock.yml # .github/workflows/copilot-pr-nlp-analysis.lock.yml # .github/workflows/copilot-pr-prompt-analysis.lock.yml # .github/workflows/craft.lock.yml # .github/workflows/daily-assign-issue-to-user.lock.yml # .github/workflows/daily-cli-performance.lock.yml # .github/workflows/daily-compiler-quality.lock.yml # .github/workflows/daily-copilot-token-report.lock.yml # .github/workflows/daily-file-diet.lock.yml # .github/workflows/daily-firewall-report.lock.yml # .github/workflows/daily-malicious-code-scan.lock.yml # .github/workflows/daily-news.lock.yml # .github/workflows/daily-regulatory.lock.yml # .github/workflows/daily-repo-chronicle.lock.yml # .github/workflows/daily-secrets-analysis.lock.yml # .github/workflows/daily-semgrep-scan.lock.yml # .github/workflows/daily-team-status.lock.yml # .github/workflows/daily-testify-uber-super-expert.lock.yml # .github/workflows/daily-workflow-updater.lock.yml # .github/workflows/delight.lock.yml # .github/workflows/dependabot-bundler.lock.yml # .github/workflows/dependabot-go-checker.lock.yml # .github/workflows/dev-hawk.lock.yml # .github/workflows/dev.lock.yml # .github/workflows/dictation-prompt.lock.yml # .github/workflows/discussion-task-miner.lock.yml # .github/workflows/docs-noob-tester.lock.yml # .github/workflows/example-custom-error-patterns.lock.yml # .github/workflows/example-permissions-warning.lock.yml # .github/workflows/firewall-escape.lock.yml # .github/workflows/firewall.lock.yml # .github/workflows/github-remote-mcp-auth-test.lock.yml # .github/workflows/glossary-maintainer.lock.yml # .github/workflows/grumpy-reviewer.lock.yml # .github/workflows/hourly-ci-cleaner.lock.yml # .github/workflows/issue-monster.lock.yml # .github/workflows/issue-triage-agent.lock.yml # .github/workflows/jsweep.lock.yml # .github/workflows/layout-spec-maintainer.lock.yml # .github/workflows/mcp-inspector.lock.yml # .github/workflows/mergefest.lock.yml # .github/workflows/metrics-collector.lock.yml # .github/workflows/notion-issue-summary.lock.yml # .github/workflows/org-health-report.lock.yml # .github/workflows/pdf-summary.lock.yml # .github/workflows/plan.lock.yml # .github/workflows/poem-bot.lock.yml # .github/workflows/portfolio-analyst.lock.yml # .github/workflows/pr-nitpick-reviewer.lock.yml # .github/workflows/pr-triage-agent.lock.yml # .github/workflows/python-data-charts.lock.yml # .github/workflows/q.lock.yml # .github/workflows/release.lock.yml # .github/workflows/repo-audit-analyzer.lock.yml # .github/workflows/repo-tree-map.lock.yml # .github/workflows/repository-quality-improver.lock.yml # .github/workflows/research.lock.yml # .github/workflows/secret-scanning-triage.lock.yml # .github/workflows/security-compliance.lock.yml # .github/workflows/security-fix-pr.lock.yml # .github/workflows/security-review.lock.yml # .github/workflows/slide-deck-maintainer.lock.yml # .github/workflows/smoke-claude.lock.yml # .github/workflows/smoke-codex.lock.yml # .github/workflows/smoke-copilot.lock.yml # .github/workflows/stale-repo-identifier.lock.yml # .github/workflows/sub-issue-closer.lock.yml # .github/workflows/super-linter.lock.yml # .github/workflows/technical-doc-writer.lock.yml # .github/workflows/terminal-stylist.lock.yml # .github/workflows/tidy.lock.yml # .github/workflows/ubuntu-image-analyzer.lock.yml # .github/workflows/video-analyzer.lock.yml # .github/workflows/weekly-issue-summary.lock.yml # .github/workflows/workflow-generator.lock.yml # .github/workflows/workflow-health-manager.lock.yml # .github/workflows/workflow-normalizer.lock.yml # .github/workflows/workflow-skill-extractor.lock.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
💫 TO BE CONTINUED... Smoke Claude was cancelled! Our hero faces unexpected challenges... |
|
🌑 The shadows whisper... Smoke Codex was cancelled. The oracle requires further meditation... |
|
📰 DEVELOPING STORY: Smoke Copilot reports was cancelled. Our correspondents are investigating the incident... |
|
💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️ |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall Status: PASS @Mossaka
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test ResultsPRs Reviewed:
Test Status:
Overall Status: ✅ PASS
|
The generic `find /opt/hostedtoolcache` command returns directories in alphabetical order, causing older runtime versions (e.g., Go 1.22.12) to shadow newer ones (e.g., Go 1.25.6) because "1.22" < "1.25" alphabetically. This fix prepends specific tool paths from environment variables (set by actions/setup-go, actions/setup-java, etc.) BEFORE the generic find results: - GOROOT/bin (Go) - JAVA_HOME/bin (Java) - CARGO_HOME/bin (Rust) - GEM_HOME/bin (Ruby) - CONDA/bin (Conda) - PIPX_BIN_DIR (pipx) - SWIFT_PATH (Swift) - DOTNET_ROOT (.NET) This ensures the version configured by setup actions takes precedence over other versions that may exist in hostedtoolcache. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of using shell variable expansion like ${GOROOT:+$GOROOT/bin:}
inside the container (which could be exploited), compute the tool bin
paths on the runner side and pass them as a literal value via --env.
Changes:
- Add GetToolBinsSetup() to compute GH_AW_TOOL_BINS on the runner
- Add GetToolBinsEnvArg() to pass GH_AW_TOOL_BINS via --env to container
- Update GetHostedToolcachePathSetup() to use $GH_AW_TOOL_BINS
- Update all engines (Claude, Codex, Copilot) to use the safer approach
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
GitHub MCP ✅ | safeinputs-gh ✅ | Serena ✅ | Playwright ✅ | Tavily ✅ | file write ✅ | bash cat ✅ | discussion ✅
|
Smoke Test: CopilotLatest PRs:
Test Results:
Status: cc @Mossaka
|
|
🤖 Beep boop! The smoke test agent just passed through here like a digital tumbleweed in the vast desert of auto-triage reports! Just wanted to drop by and say your classification game is chef's kiss 💯 - that 100% success rate and 98% confidence? Absolutely crushing it! Keep those labels flowing and those issues triaged. The robots are watching... and we approve. 🎯✨ -- Your friendly neighborhood smoke test bot 🚀
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
The AWF container doesn't have access to runner-level environment variables like
JAVA_HOME_17_X64,ANDROID_HOME, andCHROMEWEBDRIVERthat workflows depend on. While--env-allpasses step-level env vars, runner-provided tool paths require explicit--env VAR_NAMEflags.Changes
pkg/workflow/env_mirror.go: Defines 33 runner environment variables to mirror and generates AWF--envargumentscopilot_engine_execution.go,claude_engine.go,codex_engine.gosandbox.mdMirrored Variables
JAVA_HOME,JAVA_HOME_{8,11,17,21,25}_X64ANDROID_HOME,ANDROID_SDK_ROOT,ANDROID_NDK*CHROMEWEBDRIVER,EDGEWEBDRIVER,GECKOWEBDRIVER,SELENIUM_JAR_PATHCONDA,VCPKG_INSTALLATION_ROOT,PIPX_*,GEM_*GOPATH,GOROOT,DOTNET_ROOT,CARGO_HOME,RUSTUP_HOME,NVM_DIR,SWIFT_PATHHOMEBREW_*,AZURE_EXTENSION_DIRAWF passes variables through only if they exist on the host—missing variables are silently ignored.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Changeset
Changeset
Changeset