From 28cc6599dff8f9063a26fd0003d38f2248a8fba3 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 29 Jul 2026 09:30:07 -0700 Subject: [PATCH] test: pin cua-driver resolver in CLI-fallback sanitization test The test passed on dev boxes where a cua-driver binary is on PATH but failed in hermetic CI: _call_tool_via_cli hit resolve_cua_driver_cmd()'s install-hint early exit before reaching the spawn-env assertion. Pin the resolver so the test exercises the code path it actually asserts. --- tests/computer_use/test_cua_spawn_env_sanitization.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/computer_use/test_cua_spawn_env_sanitization.py b/tests/computer_use/test_cua_spawn_env_sanitization.py index 8692365e574..dbf7353f1c5 100644 --- a/tests/computer_use/test_cua_spawn_env_sanitization.py +++ b/tests/computer_use/test_cua_spawn_env_sanitization.py @@ -111,6 +111,11 @@ def test_cli_fallback_sanitizes_env_and_hides_console_on_windows(monkeypatch): captured = {} _patch_windows_hide_flags(monkeypatch, cua_backend) + # Hermetic CI has no cua-driver binary; pin the resolver so the test + # exercises the spawn-env path instead of the install-hint early exit. + monkeypatch.setattr( + cua_backend, "resolve_cua_driver_cmd", lambda override=None: "cua-driver" + ) monkeypatch.setattr( cua_backend.subprocess, "run",