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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Alexandre Teixeira <general@alexandreteixeira.dev>
This commit is contained in:
indieindie7
2026-11-01 01:47:57 +00:00
committed by GitHub
co-authored by Claude Fable 5.1 Alexandre Teixeira
parent 23a480571a
commit cb26ccd9a7
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1,5 +1,6 @@
"""Execution outcomes must reach the model, not just the tool-event UI.""" """Execution outcomes must reach the model, not just the tool-event UI."""
import json import json
import os
import pytest import pytest
@@ -7,6 +8,7 @@ from src.agent_tools.subprocess_tools import BashTool
from src.clean_agent_preview import preview_tool_result_text 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 @pytest.mark.asyncio
async def test_failed_shell_retains_exit_status_and_both_streams_for_followup(tmp_path): async def test_failed_shell_retains_exit_status_and_both_streams_for_followup(tmp_path):
from tests.process_resource_helpers import launch_authority from tests.process_resource_helpers import launch_authority
+2
View File
@@ -3,6 +3,7 @@
P2-2 invariant: external bridge execution != local containment. P2-2 invariant: external bridge execution != local containment.
""" """
import asyncio import asyncio
import os
from types import SimpleNamespace from types import SimpleNamespace
from unittest.mock import patch 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") 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 @pytest.mark.asyncio
async def test_native_local_bash_python_behavior_unchanged(tmp_path, monkeypatch): async def test_native_local_bash_python_behavior_unchanged(tmp_path, monkeypatch):
"""4. Native local Bash/Python behavior is unchanged.""" """4. Native local Bash/Python behavior is unchanged."""