Repository navigation
fix(verifiers): run_container_unit_tests_verifier reads its result files in the container, refusing a link - #932
Merged
Conversation
…e steps that read its container, and lint warns of a verifier without one stop_agent cancels the A2A tasks of an agent's turns, ends the processes it started where it works (those of its server's user that started after the server, found by its A2A port, and descend from it or were orphaned), and removes clear_paths, recording each in metadata["stop_agent"]. Its server, and whatever ran before it, keep running. task lint warns of a run_container_unit_tests_verifier on a container an agent was installed into, or a verify_sandbox on an agent's own, with no stop_agent for that agent before it. run_container_unit_tests_verifier reads its result files in the container, refusing a link or anything but a regular file, in place of a docker cp read on the sandbox's host, which followed a link the agent planted there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et's user, and runs its scripts on the system's PATH Root in a container without CAP_SYS_PTRACE reads only its own user's descriptors, so the Claude Code image's server, which runs as agent under root's supervisord, was not found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntainer, lint checks each installed agent, and its limits are named Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in its container Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he other agents' it looks up Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…marker before importing mcp The import outlasted a test's 2 s start window on a busy runner, so the start was stopped before the marker existed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gent-step # Conflicts: # AGENTS.md
…ails when a scan of the processes fails A process name may hold a newline, which split the record, ended the scan's subshell, and read as no process left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ver by its arguments A command line is what the shell expanded, so it can hold a secret such as the agent's model key, and the report goes into the run's context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, with no clear_paths or cancel The verifier already clears its reward_path before the tests, and a cancel almost always found a finished turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ontainer result read and the page-driver test fix stop_agent would end an agent's leftover processes only with a shell script's guesses from outside the agent, and the protocol has no call for it yet. Ending leftovers waits for one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
run_container_unit_tests_verifierreads its result files inside the container, as root, and refuses a link or anything that isn't a regular file. A refused file is recorded as unread (None), as an unreadable one already was.Before, it copied each result file to the sandbox's host with
docker cpand read the copy there withcat.docker cpcopies a link as a link, so a link the agent planted at a result path was followed on the host. A host file could end up in the run's record.A stale reward file the agent wrote is a different case, already handled: the verifier clears
reward_pathbefore the tests, so a test command that exits without writing a reward scores 0.Verified
tst/integration/task_step/test_run_container_result_files_local.pyruns the verifier against a real Debian container on a local sandbox.None.docker cp. A local-sandbox test checks that the read runs in the sandbox's own container.Also: a flaky page-driver test
test_a_start_that_never_listens_is_stopped_and_the_next_call_starts_afreshfailed once on this PR's CodeBuild run, unrelated to it.mcpbefore writing the marker the test reads. On a busy runner, that import outlasted the test's 2 s start window, so the driver stopped the stand-in before the marker existed.silent-onceandwedged-oncestand-ins now write their marker before the import.History
This PR first added a
stop_agentstep, which ended what an agent left running before a verifier read its container, and a lint warning for verifiers without one. Both are left out for now.From outside the agent, the step could pick out the agent's processes only with a shell script and guesses: the server by its port, its user, its start time. The agent protocol has no call for ending them yet, and its existing calls can't do it: a run learns a turn's A2A task id only once the turn has ended. Ending leftovers waits for such a call.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
run_container_unit_tests_verifiernow reads result files inside the container as root instead of copying them onto the host.mcp.No new actionable issues were found. The earlier threads concern the removed
stop_agentstep and lint warning. earakely-scale deferred those features until the agent protocol supports stopping leftover processes.Reviews (15) · Last reviewed commit: "refactor: leave stop_agent and its lint ..." · Reviewed by Greptile