fix(e2e): resolve AGENT binary to absolute path#129
Merged
emal-avala merged 1 commit intomainfrom Apr 16, 2026
Merged
Conversation
M1 and M3 in the Process-Level Sandbox section cd into a tempdir
before invoking "${AGENT}" --dump-system-prompt. With the default
relative path (./target/release/agent) the binary isn't found after
the cd, so both tests reported the binary as crashed on config
parse / unknown strategy even though the Rust code paths are fine.
Resolve AGENT to an absolute path at script startup so any test that
changes cwd can still invoke it. Handles three cases: already
absolute (unchanged), relative path with a directory component
(realpath'd via cd+pwd), and a bare filename on PATH (resolved via
command -v).
Repro: the v0.15.3 Release E2E run reports 2/78 failures (M1, M3);
rerunning scripts/e2e-tests.sh locally with AGENT_BINARY relative
reproduces the same failures, and this fix makes both tests pass.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 free
to 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.
Summary
Fixes the 2/78 E2E failures on the v0.15.3 Release E2E run (M1 + M3 in the Process-Level Sandbox section):
M1: sandbox config parse — Binary failed to start with [sandbox] presentM3: unknown strategy — Binary crashed on unknown sandbox strategy(failed run)
Root cause
scripts/e2e-tests.shsetsAGENT="${AGENT_BINARY:-./target/release/agent}"— a relative path. M1 and M3 are the only tests thatcdinto a tempdir before invoking"${AGENT}":After the
cd,./target/release/agent(andtarget/release/agentas the CI passes it) resolves against the tempdir and the binary isn't found. Theifbranch fails and the script blames the sandbox config code path, but the binary never actually ran. M2/M4 don'tcd, which is why they pass.Fix
Resolve
AGENTto an absolute path at script startup:target/release/agent) → realpath viacd "$(dirname ...)" && pwd.agent) → resolve viacommand -v.No other test is affected — every prior invocation used
"${AGENT}"from the script's own cwd, which now still resolves identically.Test plan
AGENT_BINARY=target/release/agent scripts/e2e-tests.shagainst a release build ofv0.15.3..agent/settings.toml, invoke binary) also passes.run-e2elabel to this PR) to confirm on CI.🤖 Generated with Claude Code