Repository navigation
Give every unit test its own local sandbox root - #142
Merged
Merged
Conversation
Four unit test files create real local sandboxes, in the default root under the user's home, and nothing removes them: each run of the suite left about ten work dirs in ~/.agent-env-sandboxes. The autouse fixture that already gives each test its own state root now gives it its own sandbox root too. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Four unit test files create real local sandboxes (
local_sandbox_host_ports_test,local_sandbox_testand the twonetwork_policy_*tests). They create them in the default root,~/.agent-env-sandboxes, and nothing removes them. So each run of the unit suite left about ten work dirs in the developer's home. One machine had collected about 20,000, roughly 700 a day, which every local sandbox lookup then scans.The autouse
isolated_state_rootfixture already gives each unit test its ownXDG_STATE_HOME. It now setsAGENT_ENV_LOCAL_SANDBOX_DIRto a temp dir as well. Tests that set their own root still do. The integration tiers are unchanged: on macOS, Docker can only bind-mount compose files from a shared path, which is why the default root is in the home dir.Before / after: a full unit run added 10 work dirs to
~/.agent-env-sandboxes, and now adds 0. All 7,087 unit tests pass.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Gives each unit test its own temporary local sandbox root through
isolated_state_root.No actionable issues were found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "Give every unit test its own local sandb..." · Reviewed by Greptile