From 650aa5b62ea28d42dd02d8cb4f0e02edbd3cc66f Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 20 Sep 2026 15:19:17 -0700 Subject: [PATCH] fix(tests): drop the unread detect_hardline_command patch in test_shell_exec_security tui_gateway.server never reads that name (the hardline check lives in methods_tools via the approval import); also add the trailing newline. --- tests/tui_gateway/test_shell_exec_security.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/tui_gateway/test_shell_exec_security.py b/tests/tui_gateway/test_shell_exec_security.py index 3dfcb7f6de..8f5965ebb9 100644 --- a/tests/tui_gateway/test_shell_exec_security.py +++ b/tests/tui_gateway/test_shell_exec_security.py @@ -24,7 +24,6 @@ def test_shell_exec_scrubs_child_env_and_force_redacts_rpc_output(monkeypatch): monkeypatch.setenv("OPENROUTER_API_KEY", secret) monkeypatch.setattr(redact, "_REDACT_ENABLED", False) monkeypatch.setattr(server.subprocess, "run", fake_run) - monkeypatch.setattr(server, "detect_hardline_command", lambda _command: (False, ""), raising=False) response = server.handle_request( {"id": "security", "method": "shell.exec", "params": {"command": "echo safe"}} @@ -33,4 +32,4 @@ def test_shell_exec_scrubs_child_env_and_force_redacts_rpc_output(monkeypatch): assert "OPENROUTER_API_KEY" not in captured["env"] assert secret not in response["result"]["stdout"] assert secret not in response["result"]["stderr"] - assert "visible" in response["result"]["stdout"] \ No newline at end of file + assert "visible" in response["result"]["stdout"]