Skip to content

feat: replace RUNNER_TEMP with /tmp/gh-aw throughout compiler and runtime#25350

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/update-compiler-temporary-folder
Closed

feat: replace RUNNER_TEMP with /tmp/gh-aw throughout compiler and runtime#25350
Copilot wants to merge 1 commit intomainfrom
copilot/update-compiler-temporary-folder

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

Summary

Updates the compiler and all built-in workflow templates to never use ${RUNNER_TEMP}/gh-aw/ as the runtime root directory. All paths now use /tmp/gh-aw/ directly.

Why

  • /tmp/gh-aw/ is always available on Linux runners (GitHub-hosted and self-hosted)
  • Eliminates dependency on RUNNER_TEMP environment variable which can vary or be unexpectedly set to /tmp on some self-hosted runners
  • Simplifies the security model by removing the old two-directory split between ${RUNNER_TEMP}/gh-aw/ (setup files) and /tmp/gh-aw/ (runtime files)

Changes

Core constants

  • pkg/constants/constants.go: Updated GhAwRootDir and GhAwRootDirShell to /tmp/gh-aw

Compiler (Go files)

All compiler files updated to emit /tmp/gh-aw/ paths instead of ${RUNNER_TEMP}/gh-aw/ or ${{ runner.temp }}/gh-aw/:

  • pkg/workflow/compiler_yaml.go, compiler_yaml_ai_execution.go, compiler_yaml_main_job.go, compiler_yaml_step_generation.go
  • pkg/workflow/mcp_config_builtin.go, mcp_renderer_builtin.go, mcp_renderer.go, mcp_setup_generator.go, mcp_scripts_generator.go
  • pkg/workflow/cache.go, docker.go, runtime_step_generator.go, repo_memory.go
  • pkg/workflow/awf_helpers.go, copilot_engine_execution.go, notify_comment.go, pr.go
  • pkg/workflow/git_configuration_steps.go, safe_jobs.go, redact_secrets.go, publish_artifacts.go
  • pkg/workflow/unified_prompt_step.go, step_order_validation.go

Setup action

  • actions/setup/setup.sh: Hardcoded GH_AW_ROOT="/tmp/gh-aw", removed all RUNNER_TEMP validation (collision check, writability check, etc.)
  • actions/setup/clean.sh: Updated default destination
  • actions/setup/action.yml: Updated input description
  • actions/setup/sh/*.sh: Updated all shell scripts
  • actions/setup/js/*.cjs: Updated all JavaScript runtime files and test files

Generated files

  • All 182 .github/workflows/*.lock.yml files recompiled with new paths
  • All pkg/workflow/testdata/**/*.golden wasm golden files updated

Testing

  • All unit tests pass (go test -tags '!integration' ./pkg/workflow/ ✓)
  • Build succeeds (make build ✓)
  • Lint passes (make lint ✓)
  • Format passes (make fmt ✓)
  • All 182 workflows successfully recompiled (make recompile ✓)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants