-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
Objective
Improve the PATH setup for the agent container to expose Python, Ruby, Go, and other runtime tools installed in /opt/hostedtoolcache, not just Node.js.
Context
The /opt/hostedtoolcache directory is already mounted into the agent container, but the PATH setup currently only handles Node.js binaries. The Ubuntu runner image includes Python (3.9-3.14), Ruby (3.2-3.4), Go (1.22-1.25), and other runtimes in this directory.
Current PATH setup examples:
- Copilot engine:
find /opt/hostedtoolcache -maxdepth 4 -type d -name bin - Claude/Codex engines:
find /opt/hostedtoolcache/node(Node-specific)
Approach
- Review how GitHub Actions runners organize tools in
/opt/hostedtoolcache:- Structure:
/opt/hostedtoolcache/(tool)/(version)/(arch)/bin - Common tools: node, python, go, ruby, pypy, java
- Structure:
- Enhance the PATH setup command to include all runtime binaries:
export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\n' ':')$PATH"
- Update the PATH setup in all three engine implementations
- Add logic to prioritize certain versions when multiple are available
- Test that Python, Ruby, Go, and Node.js are all accessible from the agent container
Files to Modify
- Modify:
pkg/workflow/copilot_engine_execution.go(line ~360: enhance PATH setup) - Modify:
pkg/workflow/claude_engine.go(line ~247: replace Node-specific setup) - Modify:
pkg/workflow/codex_engine.go(line ~294: replace Node-specific setup) - Create:
pkg/workflow/runtime_path_test.go(test runtime detection)
Acceptance Criteria
- All cached runtimes (Node.js, Python, Ruby, Go) are accessible via PATH
- PATH setup works consistently across all engine types
- Tests verify that
node,python3,ruby,gocommands are available - Version selection logic handles multiple installed versions gracefully
- Documentation explains how runtime selection works
Related to epic: build/test environment for agentic workflow #11970
AI generated by Plan Command for #11970
Copilot