镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[ci] Clear XDG_RUNTIME_DIR in sandboxed agentic workflows - #13556

Open
jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-fix-agentic-noop-runs
Open

jonathanpeppers wants to merge 3 commits into
mainfrom
jonathanpeppers-fix-agentic-noop-runs

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Fixes #13251

In four of the last five nightly-fix-finder runs, the agent found a fix that scored 25–28/30. It then called noop because ./build.sh Prepare failed inside the AWF sandbox:

System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'.
One or more system calls failed: lstat("/run/user/1001", ...) == -1; errno == ENOENT;

The failed runs are 42546736974, 42737318578, 42940514089 and 43136003940.

.NET now stores user-scoped named mutexes in $XDG_RUNTIME_DIR (breaking change). awf --env-all passes the runner's /run/user/1001 into the sandbox, but that directory does not exist there.

This change sets XDG_RUNTIME_DIR: ${{ '' }} in engine.env for nightly-fix-finder, android-reviewer and skill-runner, because all three can run dotnet in the sandbox. When the value is empty, .NET creates and uses a directory under the home directory (SharedMemoryManager.Unix.cs in dotnet/runtime). I used ${{ '' }} because gh aw compile writes 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, run nightly-fix-finder manually to confirm that Prepare passes.

jonathanpeppers and others added 3 commits November 13, 2026 12:06
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>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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_DIR to ${{ '' }} 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

This branch has not been deployed

No deployments
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.

[aw] No-Op Runs

3 participants