Repository navigation
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved runtime-path relocation and expansion errors break work-queue and Windows workflows, while cleanup can cause otherwise successful jobs to fail.
14 open issues
Existing tests still assert legacy paths and package lists · New Root-owned leftovers can fail script-mode cleanup · New Relocating the allocator breaks legacy-prefix substitutions · New Setup-root paths fail to expand in JavaScript and quoted content · New Telemetry setup hard-codes the default destination · New Comment-memory config is written outside the setup root · New Template-literal action paths are not relocated · New Protected-session capture paths are not relocated · New Relocation misses shell-serialized safeoutputs mount paths · New Random cache paths prevent cache restores across runs · New Windows cleanup misses cache-save ordering · New Lookup-only cache entries no longer save generated files · New Windows output rewrite uses the legacy runtime path · New Proxy port variables are not forwarded into WSL · New
What changed in this PR
Advances #78555 by moving gh-aw jobs from shared temporary state to invocation-private runtime and trusted setup directories, with ownership-checked cleanup for self-hosted runners.
Changes:
- Propagates private paths through workflow generation, WSL, sandbox mounts, MCP configuration, logs, artifacts, and CLI consumers.
- Adds token- and directory-identity checks for cleanup, invocation-specific sidecar names, and cache-save ordering.
- Adds isolation regressions and documents destination migration and remaining shared-Docker limitations.
| File | Description |
|---|---|
pkg/workflow/windows_runner.go |
Adapts WSL bootstrap, paths, and environment forwarding. |
pkg/workflow/runtime_isolation.go |
Adds allocation, relocation, and fallback cleanup. |
pkg/workflow/runtime_isolation_test.go |
Covers compiler isolation and lifecycle behavior. |
pkg/workflow/runtime_isolation_cache.go |
Splits runtime cache restore/save before cleanup. |
pkg/workflow/runner_temp_safety.go |
Integrates runtime isolation into finalization. |
pkg/workflow/mcp_setup_gateway.go |
Forwards isolation variables to the gateway. |
pkg/workflow/mcp_renderer_builtin.go |
Adds isolation variables to built-in MCP configurations. |
pkg/workflow/mcp_config_refactor_test.go |
Updates expected MCP environment lists. |
pkg/workflow/jobs_test.go |
Updates Windows runtime-path expectations. |
pkg/workflow/compiler_yaml_step_generation.go |
Quotes script-mode setup and cleanup paths. |
pkg/workflow/compiler_yaml_ai_execution.go |
Removes ownership credentials from agent execution. |
pkg/workflow/compiler_difc_proxy.go |
Configures invocation-scoped certificate trust. |
pkg/workflow/awf_installer_integration_test.go |
Updates relocated installer-path expectations. |
pkg/workflow/awf_command_builder.go |
Propagates paths and clears ownership credentials. |
pkg/cli/runtime_paths.go |
Resolves private paths and validates cache roots. |
pkg/cli/runtime_paths_test.go |
Covers path resolution and cache isolation. |
pkg/cli/runtime_owner_unix.go |
Checks Unix runtime-directory ownership. |
pkg/cli/runtime_owner_other.go |
Rejects unsupported ownership checks. |
pkg/cli/mcp_tools_privileged.go |
Relocates MCP logs and audit outputs. |
pkg/cli/mcp_tool_arguments_test.go |
Handles fallible runtime-path resolution. |
pkg/cli/mcp_timeout_test.go |
Updates audit argument assertions. |
pkg/cli/mcp_logs_positional_test.go |
Updates logs argument assertions. |
pkg/cli/mcp_logs_guardrail.go |
Anchors cache operations to opened roots. |
pkg/cli/mcp_logs_episode.go |
Relocates episode-log output directories. |
pkg/cli/logs_utils.go |
Recognizes flattened private-root log paths. |
pkg/cli/logs_timeout_test.go |
Handles runtime-path errors in budget tests. |
pkg/cli/logs_storage_options_test.go |
Updates continuation argument handling. |
pkg/cli/logs_episode_retrieval_command_test.go |
Updates episode command argument handling. |
docs/src/content/docs/reference/self-hosted-runners.md |
Documents cleanup ownership and concurrency limits. |
actions/setup/wsl.js |
Adds setup and post-action WSL dispatch. |
actions/setup/sh/stop_difc_proxy.sh |
Removes system trust-store cleanup. |
actions/setup/sh/start_difc_proxy.sh |
Uses dynamic ports and local certificate trust. |
actions/setup/sh/start_cli_proxy.sh |
Publishes the selected CLI proxy port. |
actions/setup/sh/create_gh_aw_tmp_dir.sh |
Validates and prepares private runtime directories. |
actions/setup/sh/create_gh_aw_tmp_dir_test.sh |
Covers unsafe-directory rejection without reclamation. |
actions/setup/setup.sh |
Allocates private roots and relocates staged assets. |
actions/setup/README.md |
Documents private paths and destination migration. |
actions/setup/post.js |
Uses saved ownership state for teardown. |
actions/setup/js/start_cli_proxy.test.cjs |
Covers dynamic and legacy proxy ports. |
actions/setup/js/setup_invocation_isolation.test.cjs |
Covers concurrent setup and scoped teardown. |
actions/setup/js/runtime_isolation.test.cjs |
Covers ownership, relocation, and sidecar isolation. |
actions/setup/js/runtime_isolation.cjs |
Implements allocation, validation, relocation, and cleanup. |
actions/setup/js/prompt_literal_values.cjs |
Relocates restored literal runtime paths. |
actions/setup/js/memory_validation_isolation.test.cjs |
Covers decoded validator-path relocation. |
actions/setup/js/memory_custom_validation.cjs |
Relocates custom validator script paths. |
actions/setup/js/create_prompt.test.cjs |
Covers prompt relocation without source mutation. |
actions/setup/js/create_prompt.cjs |
Relocates rendered prompt paths. |
actions/setup/js/chroot_home_cleanup.test.js |
Updates scoped post-cleanup expectations. |
actions/setup/js/apply_samples.cjs |
Places sample patches inside invocation runtime roots. |
actions/setup/index.js |
Allocates roots and coordinates setup completion. |
actions/setup/clean.sh |
Adds owned cleanup and post-action deferral. |
actions/setup/action.yml |
Updates the destination input description. |
Review effort: Max (adaptive)
| " id: setup\n", | ||
| " run: |\n", | ||
| " bash /tmp/gh-aw/actions-source/actions/setup/setup.sh\n", | ||
| " bash \"/tmp/gh-aw/actions-source/actions/setup/setup.sh\"\n", |
There was a problem hiding this comment.
Updated the script-mode, Windows runner, and work-queue path assertions in 9e476a0; the focused compilation tests pass.
|
|
||
| func runtimeEarlyCleanupStep(windows bool) string { | ||
| var step strings.Builder | ||
| step.WriteString(" - name: Clean isolated runtime directories\n if: ${{ always() && env.GH_AW_SETUP_ACTION_COMPLETE != 'true' }}\n") |
There was a problem hiding this comment.
Owned-root cleanup now warns and continues when removal fails. Added a regression simulating an unremovable owned root in fb feb14f.
| } | ||
| } | ||
| step.WriteString(" run: |\n") | ||
| for _, line := range windowsWSLRunWrapper(script, names) { |
There was a problem hiding this comment.
The Windows allocator remains encoded without rewriting its legacy-prefix substitutions; the regression is covered in 9e476a0.
| if inExecutable || singleLineExecutableRE.MatchString(source) { | ||
| // Setup roots inherit arbitrary RUNNER_TEMP characters: keep them | ||
| // data-bound, never splice them into executable Actions expressions. | ||
| rewritten = strings.ReplaceAll(rewritten, setupRootExpression, "${GH_AW_SETUP_ROOT}") |
There was a problem hiding this comment.
Quoted-heredoc paths now remain data-bound: Linux uses the Actions environment expression, and the WSL wrapper substitutes private-root markers. Added regression in fbfeb14.
| process.env.INPUT_JOB_NAME = inputJobName; | ||
| process.env.INPUT_OTLP_OIDC_TOKEN = inputOTLPOIDCToken; | ||
| const { run } = require(path.join(__dirname, "js", "action_setup_otlp.cjs")); | ||
| const { run } = require(path.join(process.env.GH_AW_SETUP_ROOT, "actions", "action_setup_otlp.cjs")); |
There was a problem hiding this comment.
Setup telemetry now loads from the validated custom destination, saves that relative path in action state, and uses it during post cleanup in 9e476a0.
| text = strings.ReplaceAll(text, conclusionWorkQueueActivationArtifactDir, setupRootExpression+"/activation") | ||
| text = strings.ReplaceAll(text, constants.GhAwRootDir+"-protected-capture-", setupRootExpression+"/protected-capture-") | ||
| text = logicalSetupPathRE.ReplaceAllString(text, setupRootExpression+"$1") | ||
| text = logicalRuntimePathRE.ReplaceAllString(text, runtimeRootExpression+"$1") |
There was a problem hiding this comment.
Cache actions now use a stable workspace-relative archive path and transfer content to/from the private runtime root in 9e476a0.
| func scriptRuntimeCacheEdits(steps *yaml.Node) ([]runtimeYAMLEdit, error) { | ||
| cleanupLine := -1 | ||
| for _, step := range steps.Content { | ||
| if run := runtimeMappingValue(step, "run"); run != nil && strings.Contains(run.Value, "/actions/setup/clean.sh") { |
There was a problem hiding this comment.
Cache-save generation now recognizes the stable Clean Scripts step name, preserving save-before-cleanup ordering for Windows wrappers in 9e476a0.
| inputs := runtimeMappingValue(step, "with") | ||
| if lookup := runtimeMappingValue(inputs, "lookup-only"); lookup != nil && lookup.Value == "true" { | ||
| return rendered, "", nil | ||
| } | ||
| save, err := renderScriptRuntimeCacheSave(step, inputs, id, ref) |
There was a problem hiding this comment.
Lookup-only combined cache actions now still generate the conditional save step; the regression expectation was updated in 9e476a0.
| } | ||
| indentation := line[:len(line)-len(strings.TrimLeft(line, " "))] | ||
| replacement := constants.GhAwRootDir + strings.TrimPrefix(path, constants.TmpGhAwDir) | ||
| replacement := windowsRuntimeRootExpression + strings.TrimPrefix(path, constants.TmpGhAwDir) |
There was a problem hiding this comment.
Windows agent-output rewriting now applies wslpath to the private runtime root in 9e476a0.
| "GH_AW_SAFE_OUTPUTS_CONFIG_PATH", | ||
| "GH_AW_SAFE_OUTPUTS_TOOLS_PATH", | ||
| "GH_AW_WSL_WORKING_DIRECTORY", | ||
| "GH_AW_WSL_WORKING_DIRECTORY", "GH_AW_RUNTIME_ROOT", "GH_AW_SETUP_ROOT", "GH_AW_RUNTIME_TOKEN", "GH_AW_RESOURCE_SUFFIX", |
There was a problem hiding this comment.
Both proxy-port variables are now forwarded into WSL alongside the runtime paths in 9e476a0.
|
@copilot address review feedback |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Pushed the review fixes in |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "84a8fc69cf9a52b94397fd0c686f3e3555d2b652",
"kind": "requested",
"schema_version": "1",
"state": "79a45a61c0fc07ab09caad71b125476ecdbd4e6af16eac133eef1865b45f2f3b",
"work": [
"04150ba1632d72ffb57d41481c5be7cd6089a10e3761f08d92d8233c761edf3a",
"067a6d2e2384d71b24d61d4152c8d175417402d2409f074d00c63b810804a7be",
"13c62ff909c0f7ddc8e610b81daf29b82b8a09bdf95fc0132670c96a2eae382e",
"18c090c32aa686391b58200f4d07f9fd0681b854c3ae5e1c72d53ba38eecd1aa",
"397b87021dd578525178722e6f3296503339e363b80a84641fa5bab1365e366a",
"564dcff33d44dafda95bc273f314a43dbddd629f782b5f46cabbd1d5de22a2fe",
"5d5ebc0a82ba25f584eebbb416ff4fdab9db6483946202bbe17822753ccd822b",
"72825baf1815c33fbaa339f4df7329afc6d999f2cfad98c47cef18867f9970be",
"a34a9ea1be05268a4c6ac91b1d649581e3f6315098f8ab9c5a201e774abedc92",
"a386365cf49a93aa37646badecb230d51ec16b64b2e7aeb0d9df527e7199cd9b",
"bcf6343e9f09ecdb95c0d65fb700bf2eb2bb3dbfc79167dc11e1a43a40e86740",
"bdd5ed57dc25314dc9998c79fbb16657cc088143da7a6b9e344795f2bcc5ec4c",
"ecb8a4a26cb1bae2ea3a140e373a8a0f81d569c039cfa5e64e7ef3a7ed5484ce",
"f6115678b8fd92659ff527261bc8a224a8e33b208186ca0464ef1b338a3c023a"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
@copilot merge main and resolve conflicts |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
@copilot fix the failing ci checks |
…e-isolation-again Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
| * @param {string} text | ||
| */ | ||
| function assertNoPromptControlMarkers(section, text) { | ||
| const controlMarkerPattern = /<\|im_start\|>|<\|im_end\|>|<\|system\|>|<\|assistant\|>|<\|user\|>|BEGIN\s+SYSTEM\s+PROMPT|END\s+SYSTEM\s+PROMPT/iu; |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
| // cliRuntimePath resolves canonical paths for binary consumers that cannot be | ||
| // rewritten by the workflow compiler. An unset root preserves standalone CLI use. | ||
| // This validates path syntax, not filesystem ownership. | ||
| func cliRuntimePath(canonical string) (string, error) { |
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "c1d21b37b10098e43368c484aec936a022f2dacf",
"kind": "requested",
"schema_version": "1",
"state": "48e00ac62249ed8f651de46f1dcef8bb26dc04169573cbcc9724a37a80e0c34a",
"work": [],
"workflow": "pr-sous-chef"
}
|
…e-isolation-again # Conflicts: # .github/workflows/agentic-token-trend-audit.lock.yml # .github/workflows/smoke-claude.lock.yml # .github/workflows/smoke-codex.lock.yml # .github/workflows/smoke-copilot.lock.yml # .github/workflows/smoke-factory.lock.yml # .github/workflows/smoke-gemini.lock.yml # .github/workflows/smoke-opencode.lock.yml # .github/workflows/smoke-test-tools.lock.yml # .github/workflows/workflow-normalizer.lock.yml Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
@copilot address review feedback and fix all failing ci checks |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
| if (translated.error || translated.status !== 0) throw new Error("Unable to persist native Windows setup path"); | ||
| persistedValues.GH_AW_SETUP_ROOT = translated.stdout.trim(); | ||
| } | ||
| append(env.GITHUB_ENV, persistedValues); |
|
Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "7a5648ecfb7403641eb016de37cd3aee901ae08b",
"kind": "requested",
"schema_version": "1",
"state": "e0d5026764e08a14b9936a050327996c26416eb8f72b1f5e1438bb5bc78aa4a6",
"work": [
"070b5fed6c77e6f99af8aa0864293d562a676d9316dad5428bdc04c242733226",
"225d12c41865546fe8081fb8f05cc202f7419fea92819f49b031ccb8d73b2538",
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"48a183c3e95bbf17204364ee4c81061de61a873e8585852342c81727b022959c",
"49c80a00fb3786e9cd4801737bd50a4de83978035bb4a487a6bb6689f2c3cd03",
"be8977fed8539981a9de7f424c3c95730603faded3a88272a303c0b1b996a2af",
"e9d7501fc834b70ac771af5e7694ba7f29ea683b65e0f01f096571f99da4b76f"
],
"workflow": "pr-sous-chef"
}
|


Jobs sharing a self-hosted runner host currently reuse
/tmp/gh-aw, allowing startup to delete another job’s runtime files while teardown cannot safely reclaim leftovers. This change introduces invocation-private paths and owned-resource cleanup.Private runtime allocation
Scoped lifecycle
Concurrency regressions
Remaining boundary