The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(file-tools): drop trimming leftovers in remote binary guard double
kshitijk4poor13f3d23d1a7c
diff --git a/tests/tools/test_remote_binary_write_guard.py b/tests/tools/test_remote_binary_write_guard.pyindex 14f58abd668..6217a4eaad1 100644--- a/tests/tools/test_remote_binary_write_guard.py+++ b/tests/tools/test_remote_binary_write_guard.py@@ -19,7 +19,7 @@ import pytestimport tools.file_tools as file_tools_mod # noqa: F401 — registers the file toolsimport tools.terminal_tool as terminal_tool-from tools.environments.local import LocalEnvironment+from tools.environments.local import LocalEnvironment, _bash_safe_pathfrom tools.registry import registry_KEEP = "KEEPME line"@@ -58,11 +58,12 @@ class VercelSandboxEnvironment:self._inner = innerself.failure_mode = None # None | "raise" | "error"self._home_answer = str(target_dir)- self._sub_pairs = []- for src, dst in ((str(view_dir), str(target_dir)),):- self._sub_pairs.append((src, dst))- self._sub_pairs.append((src.replace("\\", "/"), dst.replace("\\", "/")))- self._sub_pairs.append((_bash_safe(src), _bash_safe(dst)))+ src, dst = str(view_dir), str(target_dir)+ self._sub_pairs = [+ (src, dst),+ (src.replace("\\", "/"), dst.replace("\\", "/")),+ (_bash_safe_path(src), _bash_safe_path(dst)),+ ]def _sub(self, text: str) -> str:for src, dst in self._sub_pairs:@@ -79,11 +80,6 @@ class VercelSandboxEnvironment:return self._inner.execute(self._sub(command), cwd=self._sub(cwd), **kwargs)-def _bash_safe(path: str) -> str:- from tools.environments.local import _bash_safe_path- return _bash_safe_path(path)--@pytest.fixture()def remote_target(tmp_path: Path, monkeypatch):"""A task whose writes EXECUTE against ``target/`` while the controller-side