Skip to content

Tools installed by pre-AWF setup steps (setup-ruby, setup-dart) may not be visible in chroot #1356

@Mossaka

Description

@Mossaka

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" in rails.gemspec)
  • The workflow uses ruby/setup-ruby@v1 with ruby-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:

  1. Installs Ruby 3.3.10 to $RUNNER_TOOL_CACHE/Ruby/3.3.10/x64/
  2. Prepends that path to $PATH via $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@v1
  • dart-lang/setup-dart@v1
  • actions/setup-python@v5
  • actions/setup-node@v4
  • actions/setup-go@v5
  • actions/setup-java@v4
  • etc.

Recommended Fix

  1. Bind-mount $RUNNER_TOOL_CACHE (or /opt/hostedtoolcache) into the chroot so installed tools are accessible
  2. Propagate $GITHUB_PATH additions into the agent's PATH inside the chroot, so that paths added by setup-* actions are visible
  3. At minimum, ensure AWF_HOST_PATH includes paths from $GITHUB_PATH so the agent can find tools installed by prior steps

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions