From a2830bda87793de2dd43e27fe07d78db9a875050 Mon Sep 17 00:00:00 2001 From: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Date: Mon, 28 Sep 2026 06:13:25 +0800 Subject: [PATCH] test(benchmark): retain private temp scope in app-server environment guard Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> --- benchmark/widesearch/tests/test_run_config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/benchmark/widesearch/tests/test_run_config.py b/benchmark/widesearch/tests/test_run_config.py index ad0d316660..12c912d62c 100644 --- a/benchmark/widesearch/tests/test_run_config.py +++ b/benchmark/widesearch/tests/test_run_config.py @@ -47,7 +47,7 @@ def test_app_server_command_can_disable_web_search() -> None: assert "tools.web_search=true" not in command -def test_app_server_environment_adds_only_nonsecret_gateway_sentinel( +def test_app_server_environment_keeps_profile_temp_scope_and_nonsecret_sentinel( tmp_path: Path, ) -> None: mod = _load_runner() @@ -60,6 +60,9 @@ def test_app_server_environment_adds_only_nonsecret_gateway_sentinel( profile, { "PATH": "/bin", + "TMPDIR": "/external-temporary-scope", + "TMP": "/external-temporary-scope", + "TEMP": "/external-temporary-scope", "UNRELATED_PRIVATE_TOKEN": "must-not-propagate", "ARK_OPENAI_API_KEY": "must-not-propagate", }, @@ -67,6 +70,9 @@ def test_app_server_environment_adds_only_nonsecret_gateway_sentinel( assert environment == { "PATH": f"{tmp_path / 'bin'}:/bin", "HOME": str(tmp_path / "home"), + "TMPDIR": str(tmp_path / "home"), + "TMP": str(tmp_path / "home"), + "TEMP": str(tmp_path / "home"), "CODEX_HOME": str(tmp_path / "codex-home"), "LOOPX_MODEL_PROVIDER_SENTINEL": "runner-owned-gateway-no-upstream-secret", }