Skip to content

[awf] agent/arc-dind: XDG_CONFIG_HOME set before HOME is updated, pointing to unwritable /home/runner #6684

Description

@lpcox

Problem

Under runner.topology: arc-dind with the copilot engine, XDG_CONFIG_HOME is exported as "$HOME" but evaluates to the unwritable passwd home /home/runner (root-owned) instead of the writable ${RUNNER_TEMP}/gh-aw/home that gh-aw sets HOME to. Any XDG-respecting tool (Flutter, and others) then fails writing to /home/runner.

Context

Reported in github/gh-aw#47802. Introduced in v0.79.8 commit 6171a09696. The export XDG_CONFIG_HOME="$HOME" fires before HOME is updated to the writable arc-dind path, and also runs after any engine.env override, so user-side workarounds are unreliable.

Root Cause

In the copilot engine entrypoint, the export XDG_CONFIG_HOME="$HOME" statement executes before HOME is reassigned to the writable ${RUNNER_TEMP}/gh-aw/home. The ordering means XDG_CONFIG_HOME captures the stale, unwritable value.

Proposed Solution

In the copilot engine entrypoint (the file that introduced commit 6171a09696), move the export XDG_CONFIG_HOME="$HOME" line to after the line that sets HOME to ${RUNNER_TEMP}/gh-aw/home. Alternatively, use an explicit writable path: export XDG_CONFIG_HOME="${RUNNER_TEMP}/gh-aw/home/.config". Add an arc-dind integration test that verifies XDG_CONFIG_HOME is writable.

Generated by Firewall Issue Dispatcher · sonnet46 · 32.7 AIC · ⊞ 6.4K ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions