Uh oh!
There was an error while loading. Please reload this page.
Pre-install AgentRx on a portable CPython instead of pip-installing in the sandbox - #53658
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI
changed the title
[WIP] Fix missing tools in Daily AgentRx Trace OptimizerPre-install AgentRx on a portable CPython instead of pip-installing in the sandboxAug 18, 2026
pelikhan
marked this pull request as ready for review
August 18, 2026 12:09
Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment.
Pull request overview
Moves AgentRx installation outside the sandbox to provide a compatible CPython runtime.
Changes:
- Adds runner-side AgentRx and uv-managed CPython setup.
- Updates pipeline commands and artifact paths.
- Regenerates the compiled workflow.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-agentrx-trace-optimizer.md | Configures installation and updates AgentRx instructions. |
.github/workflows/daily-agentrx-trace-optimizer.lock.yml | Applies generated runtime and setup changes. |
Review details
Suppressed comments (2)
.github/workflows/daily-agentrx-trace-optimizer.md:48
set -emakes any clone, download, install, or smoke-test failure abort the job before the agent starts, so the newmissing_toolfallback cannot run for the failures it is intended to handle. Allow this setup step to fail so the agent can continue with the pre-downloaded evidence and apply the documented fallback.
run: |
set -euo pipefail
.github/workflows/daily-agentrx-trace-optimizer.md:58
- This fetches and executes AgentRx's mutable default branch in a
steps:block, which runs outside the firewall sandbox. A compromised or force-pushed upstream branch can execute during installation or the smoke test with runner-level access; unlike the previous prompt-driven sandbox install, this materially expands the impact. Pin the checkout to a reviewed full commit SHA before installing it, and preferably freeze its dependency resolution as well.
git clone --depth 1 https://github.com/microsoft/AgentRx.git "$AGENTRX_HOME/src"
uv venv --python 3.12 --python-preference only-managed "$AGENTRX_HOME/.venv"
uv pip install --python "$AGENTRX_HOME/.venv/bin/python" "$AGENTRX_HOME/src"
"$AGENTRX_HOME/.venv/bin/python" "$AGENTRX_HOME/src/run.py" --help >/dev/null
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
Comment on lines
+31
to
34
| runtimes: | ||
| uv: {} | ||
| network: | ||
| allowed: [defaults, python-native, github] |
Contributor
🎉 This pull request is included in a new release. Release: |
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 freeto 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.
The Daily AgentRx Trace Optimizer instructed the agent to
pip install git+https://github.com/microsoft/AgentRx.gitfrom inside the agent sandbox, which cannot work: the microVM guest only ships PyPy 3.10/3.11 (no wheels fornumpy/aiohttp, and buildingjiterneeds a firewall-blocked Rust toolchain), and the runner's CPython 3.12 fails in the guest with a glibc mismatch. The agent reported AgentRx as a missing tool every run.Changes
steps:block clones AgentRx and installs it into a uv-managed CPython 3.12 (python-build-standalone, glibc 2.17+, so it executes inside the guest). Everything lands under/tmp/gh-aw/python/agentrx, which is mounted read-write into the sandbox. PyPI access happens outside the agent firewall and resolves to prebuilt wheels, so no Rust build is triggered.runtimes: uvadded to frontmatter forastral-sh/setup-uv.run.pyis not shipped in the wheel (agentrx.clierrors with "run.py not found"), so the checkout is kept at.../agentrx/srcand invoked directly.pip install/venvcreation, falling back tomissing_toolif the interpreter is absent.irstage now gets--run-dirlike the other stages; previously it defaulted to<repo_root>/runs/, writing artifacts into the AgentRx checkout instead of the run directory the later stages read.Notes for reviewers
pip install git+…behavior; pinning to a SHA is an easy follow-up if desired.ir/judgestages additionally require acopilotCLI endpoint that the guest may not have. Left as-is — the existing guardrail already tells the agent to continue with completed artifacts..lock.ymlregenerated viagh aw compile.