-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Problem
When agentic workflows use GitHub Actions setup steps (e.g., ruby/setup-ruby@v1, dart-lang/setup-dart@v1) before the AWF agent step, the installed tool versions may not be visible inside the AWF chroot container. The agent falls back to the system-installed version, which may be too old.
Evidence: Ruby/rails in v6 build-test experiment
- Rails requires Ruby ≥3.3.0 (
required_ruby_version = ">= 3.3.0"inrails.gemspec) - The workflow uses
ruby/setup-ruby@v1withruby-version: '3.3'as a pre-AWF step - ubuntu-latest has Ruby 3.3.10 available in the tool cache (
$RUNNER_TOOL_CACHE/Ruby/3.3.10/) - System Ruby on ubuntu-latest is 3.2.3
- The agent inside the AWF chroot appears to only see the system Ruby 3.2.3, causing the build to fail with a version mismatch
This was observed in the v6 build-test experiment (2026-03-17). The Ruby/rails workflow builds successfully but tests fail because the agent sees Ruby 3.2.3 instead of the 3.3 installed by setup-ruby.
Root Cause
In chroot mode, the agent sees the host filesystem mounted at /host. However, $RUNNER_TOOL_CACHE (typically /opt/hostedtoolcache) — where setup-* actions install language runtimes — may not be properly bind-mounted or included in the agent's PATH.
When setup-ruby@v1 runs as a pre-AWF step, it:
- Installs Ruby 3.3.10 to
$RUNNER_TOOL_CACHE/Ruby/3.3.10/x64/ - Prepends that path to
$PATHvia$GITHUB_PATH
But inside the chroot, the agent may not inherit the updated PATH from $GITHUB_PATH, so it falls back to /usr/bin/ruby (system 3.2.3).
Scope
This affects any workflow that uses setup-* actions before the AWF agent step, including:
ruby/setup-ruby@v1dart-lang/setup-dart@v1actions/setup-python@v5actions/setup-node@v4actions/setup-go@v5actions/setup-java@v4- etc.
Recommended Fix
- Bind-mount
$RUNNER_TOOL_CACHE(or/opt/hostedtoolcache) into the chroot so installed tools are accessible - Propagate
$GITHUB_PATHadditions into the agent's PATH inside the chroot, so that paths added by setup-* actions are visible - At minimum, ensure
AWF_HOST_PATHincludes paths from$GITHUB_PATHso the agent can find tools installed by prior steps