Repository navigation
[ci] Clear XDG_RUNTIME_DIR in sandboxed agentic workflows - #13556
Open
jonathanpeppers wants to merge 3 commits into
Open
jonathanpeppers wants to merge 3 commits into
jonathanpeppers wants to merge 3 commits into
Conversation
Four of the last five runs found a fix scoring 25-28/30, then called
noop because './build.sh Prepare' failed:
System.IO.IOException: ... 'NuGet-Migrations'.
lstat("/run/user/1001", ...) == -1; errno == ENOENT
.NET now stores user-scoped named mutexes in $XDG_RUNTIME_DIR. The
runner's /run/user/1001 is passed into the sandbox by --env-all, but the
directory does not exist there. Point it at /tmp/gh-aw/xdg-runtime,
which is mounted read-write, and create it before the agent starts.
See: https://learn.microsoft.com/dotnet/core/compatibility/core-libraries/11/named-mutexes-unix-default-scope
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Follow-up to the previous commit, based on review:
* Set XDG_RUNTIME_DIR to an empty string instead of a custom folder.
.NET then uses its fallback folder under the home directory and
creates it. This removes the pre-agent mkdir step, and the detection
job no longer points at a folder that does not exist.
* Use ${{ '' }}, because gh aw compile writes a plain "" as a YAML null.
* Apply the same override to android-reviewer and skill-runner, whose
agents can also run dotnet inside the AWF sandbox.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The fix relies on AWF empty-variable propagation and .NET home-directory fallback, but nightly-fix-finder Prepare has not been run with the change to confirm success in the actual sandbox.
No open issues 🎉
What changed in this PR
This PR addresses sandbox-related .NET preparation failures behind the no-op runs tracked in #13251. It clears the inherited XDG_RUNTIME_DIR in three agentic workflows so .NET does not use a runner directory unavailable inside the sandbox.
Changes:
- Sets
engine.env.XDG_RUNTIME_DIRto${{ '' }}in all three workflow sources, preserving an empty string through compilation. - Regenerates the corresponding lockfiles with updated environment settings and metadata.
Runtime validation remains pending; the planned post-merge check is a manual nightly-fix-finder run confirming that Prepare passes.
| File | Description |
|---|---|
.github/workflows/skill-runner.md |
Clears the runtime directory for sandboxed skill execution. |
.github/workflows/skill-runner.lock.yml |
Carries the setting into the generated workflow. |
.github/workflows/nightly-fix-finder.md |
Clears the runtime directory for sandboxed build validation. |
.github/workflows/nightly-fix-finder.lock.yml |
Carries the setting into the generated workflow. |
.github/workflows/android-reviewer.md |
Clears the runtime directory for sandboxed review commands. |
.github/workflows/android-reviewer.lock.yml |
Carries the setting into the generated workflow. |
Review effort: Balanced
simonrozsival
approved these changes
Nov 13, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13251
In four of the last five
nightly-fix-finderruns, the agent found a fix that scored 25–28/30. It then callednoopbecause./build.sh Preparefailed inside the AWF sandbox:The failed runs are 42546736974, 42737318578, 42940514089 and 43136003940.
.NET now stores user-scoped named mutexes in
$XDG_RUNTIME_DIR(breaking change).awf --env-allpasses the runner's/run/user/1001into the sandbox, but that directory does not exist there.This change sets
XDG_RUNTIME_DIR: ${{ '' }}inengine.envfornightly-fix-finder,android-reviewerandskill-runner, because all three can rundotnetin the sandbox. When the value is empty, .NET creates and uses a directory under the home directory (SharedMemoryManager.Unix.csin dotnet/runtime). I used${{ '' }}becausegh aw compilewrites a plain""as a YAML null.The lock files were regenerated with
gh aw compile(v0.92.0). The workflows have not run with this change yet. After merge, runnightly-fix-findermanually to confirm thatPreparepasses.