copilot/arc-dind: export writable HOME before Copilot XDG/MCP path resolution - #48658
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes ARC/DinD Copilot configuration paths by exporting the writable sandbox HOME before $HOME-based setup.
Changes:
- Adds an early ARC/DinD
HOMEexport. - Adds regression assertions for export presence and ordering.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/copilot_engine_execution.go |
Sets writable HOME before Copilot configuration exports. |
pkg/workflow/firewall_args_test.go |
Verifies ARC/DinD path export ordering. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Medium
lpcox
left a comment
There was a problem hiding this comment.
There is one remaining ARC/DinD path mismatch to address.
MCP config producer and consumer resolve different HOME values. The execution step now resets HOME before deriving GH_AW_MCP_CONFIG, so Copilot reads ${RUNNER_TEMP}/gh-aw/home/.copilot/mcp-config.json. However, the preceding MCP gateway/config creation step still writes $HOME/.copilot/mcp-config.json using that separate GitHub Actions step's original HOME (/home/runner). Step-local exports do not persist between Actions steps, so the file is written to the old path while Copilot is directed to the new one.
Please apply the same ARC/DinD HOME override in the MCP-config creation step and add a regression test covering the complete generated step sequence, ensuring the producer and consumer resolve the same path across separate steps.
|
@copilot address review feedback |
…nd+firewall
The "Start MCP Gateway" step (producer) was writing the Copilot MCP config
to $HOME/.copilot/mcp-config.json using the step's original HOME (/home/runner).
The Copilot execution step (consumer) already overrides HOME to
${RUNNER_TEMP}/gh-aw/home before evaluating GH_AW_MCP_CONFIG, so it looked for
the config at ${RUNNER_TEMP}/gh-aw/home/.copilot/mcp-config.json.
GitHub Actions step-local exports do not persist between steps, so each step
must independently override HOME. The fix mirrors the condition in
buildCopilotAWFPathSetup: emit the HOME export only when both arc-dind topology
and firewall are enabled (the only case where the execution step also overrides HOME).
Added TestArcDind_ProducerConsumerHomeParity as a regression guard covering the
complete step sequence — both the gateway (producer) and execution (consumer)
steps — ensuring they both export HOME before $HOME-derived paths are evaluated
and that neither embeds a literal /home/runner.
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in 60a9f64.
Added |
|
@copilot run pr-finisher skill |
The file referenced requireCopilotExecutionStep which is defined in enable_api_proxy_test.go (tagged //go:build !integration). Without the matching tag, verify-integration-build failed with: undefined: requireCopilotExecutionStep Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. The Fixed in the latest commit by adding the matching |
Under
runner.topology: arc-dind, Copilot path setup exportedXDG_CONFIG_HOME/GH_AW_MCP_CONFIGwhileHOMEstill pointed at passwd home (/home/runner), causing XDG-aware tools to write to an unwritable location.This change makes ARC/DinD path resolution consistent by setting the writable ARC/DinD home before Copilot config exports are evaluated.
Path setup ordering fix (arc-dind only)
export HOME=${RUNNER_TEMP}/gh-aw/homeConfig export behavior preserved, resolution corrected
buildCopilotMCPConfigExportremains$HOME-based.HOMEis now set earlier for arc-dind, both:XDG_CONFIG_HOME="$HOME"GH_AW_MCP_CONFIG="$HOME/.copilot/mcp-config.json"resolve to the writable ARC/DinD home.
Regression guard on generated run block
HOMEexport appears before:XDG_CONFIG_HOMEexportGH_AW_MCP_CONFIGexportRun: https://github.com/github/gh-aw/actions/runs/30375513874