From cb26ccd9a7a06cb3611d75c84864c3ec4386d14f Mon Sep 17 00:00:00 2001 From: indieindie7 Date: Sat, 31 Oct 2026 22:47:57 -0300 Subject: [PATCH] test: skip native bash tool tests on Windows (2 modules) (#6872) * tests: skip native bash behavior test on Windows in test_production_external_bridge On Windows the only containment mechanism (windows_tree) enforces wall-clock only; ENFORCING mode refuses bash (filesystem/process_tree unavailable), so exit_code is 1. The test asserts bubblewrap/process_group: POSIX-only by design. Part of #4287 Co-Authored-By: Claude Fable 5.1 * tests: skip native bash exit-status test on Windows in test_preview_execution_evidence BashTool needs enforcing containment (filesystem/process_tree); Windows windows_tree gives wall-clock only, so the command is not executed and exit_code is 1 instead of 7. POSIX-only by design. Part of #4287 Co-Authored-By: Claude Fable 5.1 --------- Co-authored-by: Claude Fable 5.1 Co-authored-by: Alexandre Teixeira --- tests/test_preview_execution_evidence.py | 2 ++ tests/test_production_external_bridge.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/test_preview_execution_evidence.py b/tests/test_preview_execution_evidence.py index 40bfc3253..21b4f8d4b 100644 --- a/tests/test_preview_execution_evidence.py +++ b/tests/test_preview_execution_evidence.py @@ -1,5 +1,6 @@ """Execution outcomes must reach the model, not just the tool-event UI.""" import json +import os import pytest @@ -7,6 +8,7 @@ from src.agent_tools.subprocess_tools import BashTool from src.clean_agent_preview import preview_tool_result_text +@pytest.mark.skipif(os.name == "nt", reason="POSIX-only: enforcing containment (bubblewrap/process group) needed to run native bash; Windows windows_tree gives wall-clock only") @pytest.mark.asyncio async def test_failed_shell_retains_exit_status_and_both_streams_for_followup(tmp_path): from tests.process_resource_helpers import launch_authority diff --git a/tests/test_production_external_bridge.py b/tests/test_production_external_bridge.py index 8f365543a..defac25f3 100644 --- a/tests/test_production_external_bridge.py +++ b/tests/test_production_external_bridge.py @@ -3,6 +3,7 @@ P2-2 invariant: external bridge execution != local containment. """ import asyncio +import os from types import SimpleNamespace from unittest.mock import patch @@ -180,6 +181,7 @@ async def test_external_record_does_not_grant_authority(tmp_path): await containment.run(grant, "id") +@pytest.mark.skipif(os.name == "nt", reason="POSIX-only: enforcing containment (bubblewrap/process group) needed to run native bash; Windows windows_tree gives wall-clock only") @pytest.mark.asyncio async def test_native_local_bash_python_behavior_unchanged(tmp_path, monkeypatch): """4. Native local Bash/Python behavior is unchanged."""