The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: migrate upstream host gates to platforms markers
ethernetbc2721f17b1d
diff --git a/tests/agent/lsp/test_client_e2e.py b/tests/agent/lsp/test_client_e2e.pyindex 5bd03b6849e..293984c069a 100644--- a/tests/agent/lsp/test_client_e2e.py+++ b/tests/agent/lsp/test_client_e2e.py@@ -160,7 +160,7 @@ async def test_cancelled_start_terminates_spawned_server(tmp_path: Path):assert client._proc is None[email protected]_only[email protected]("linux")@pytest.mark.asyncioasync def test_cancelled_start_hard_kills_sigterm_ignoring_descendant(tmp_path: Path):"""A launcher exiting on SIGTERM must not let an ignoring server child escape cleanup."""diff --git a/tests/agent/test_shell_hooks.py b/tests/agent/test_shell_hooks.pyindex 12332cf38c3..d36d64b78db 100644--- a/tests/agent/test_shell_hooks.py+++ b/tests/agent/test_shell_hooks.py@@ -783,7 +783,7 @@ class TestRoutedProfileEnv:# faking ``sys.platform``.[email protected]_only[email protected]("windows")def test_bare_script_hook_path_executes_on_windows(tmp_path):"""A hook whose command is a bare script path — the shape every example in``website/docs/user-guide/features/hooks.md`` uses — must run. POSIX gets there through the@@ -804,7 +804,7 @@ def test_bare_script_hook_path_executes_on_windows(tmp_path):assert missing["error"] == "command not found"[email protected]_only[email protected]("windows")def test_unroutable_script_hook_names_the_remediation(tmp_path):"""A suffix we deliberately do not route still fails, but the diagnostic has to say what to do:the raw WinError text is localized, so a non-English Windows install could not act on it."""diff --git a/tests/agent/test_skill_inline_bash_windows.py b/tests/agent/test_skill_inline_bash_windows.pyindex 7d8736d57fa..c49489fd801 100644--- a/tests/agent/test_skill_inline_bash_windows.py+++ b/tests/agent/test_skill_inline_bash_windows.py@@ -4,7 +4,7 @@ import pytestfrom agent.skill_preprocessing import preprocess_skill_content, run_inline_shell[email protected]_only[email protected]("windows")@pytest.mark.parametrize(('command', 'expected'), [('printf "hello"', 'hello'),(':', ''),@@ -15,7 +15,7 @@ def test_inline_shell_keeps_output_contract(tmp_path, command, expected):assert run_inline_shell(command, tmp_path, 5) == expected[email protected]_only[email protected]("windows")def test_inline_shell_resolver_failure_is_a_marker(tmp_path, monkeypatch):from tools.environments import local@@ -26,7 +26,7 @@ def test_inline_shell_resolver_failure_is_a_marker(tmp_path, monkeypatch):assert run_inline_shell(':', tmp_path, 5) == '[inline-shell error: Git Bash unavailable]'[email protected]_only[email protected]("windows")def test_disabled_inline_shell_does_not_resolve_bash(tmp_path, monkeypatch):from tools.environments import local@@ -37,7 +37,7 @@ def test_disabled_inline_shell_does_not_resolve_bash(tmp_path, monkeypatch):assert preprocess_skill_content('!`printf hello`', tmp_path, skills_cfg={}) == '!`printf hello`'[email protected]_only[email protected]("windows")def test_inline_shell_executes_in_native_skill_directory(tmp_path):(tmp_path / 'marker.txt').write_text('native-skill', encoding='utf-8')result = preprocess_skill_content(diff --git a/tests/cron/test_cron_bot_chat_delivery.py b/tests/cron/test_cron_bot_chat_delivery.pyindex c42f176ee7a..39695f5ba9f 100644--- a/tests/cron/test_cron_bot_chat_delivery.py+++ b/tests/cron/test_cron_bot_chat_delivery.py@@ -277,7 +277,7 @@ def test_turn_report_books_the_delivery_while_the_child_still_lingers(tmp_path):proc.wait(timeout=10)[email protected]_only[email protected]("linux")def test_delivery_child_runs_in_the_target_home_not_the_schedulers_cwd(tmp_path, monkeypatch):"""The spawn pins ``cwd`` to the target home: a scheduler left in a reaped kanban scratchworkspace must not hand its dead cwd to the child, which then dies before argv (#102941)."""diff --git a/tests/gateway/test_homeassistant.py b/tests/gateway/test_homeassistant.pyindex a013b21f34f..c45d23caa8e 100644--- a/tests/gateway/test_homeassistant.py+++ b/tests/gateway/test_homeassistant.py@@ -331,7 +331,7 @@ class TestLocalNetworkConnectHint:assert _connect_error_detail(err) == str(err)assert _connect_error_detail(RuntimeError("auth failed")) == "auth failed"- @pytest.mark.macos_only+ @pytest.mark.platforms("macos")def test_ehostunreach_under_launchd_names_the_remedy(self, monkeypatch):"""Only the launchd-supervised gateway can be denied by Local Network Privacy (#71206)."""from plugins.platforms.homeassistant.adapter import _connect_error_detaildiff --git a/tests/gateway/test_host_rendezvous_windows.py b/tests/gateway/test_host_rendezvous_windows.pyindex bfb49ac78f8..9f2dba149c4 100644--- a/tests/gateway/test_host_rendezvous_windows.py+++ b/tests/gateway/test_host_rendezvous_windows.py@@ -1,4 +1,4 @@-"""Windows confidentiality for the host rendezvous token + lock (``windows_only``).+"""Windows confidentiality for the host rendezvous token + lock (``platforms("windows")``).``os.open(..., 0o600)`` sets NO ACLs on Windows, so the host token — which holds the backend'sLIVE session token — would inherit whatever the parent directory grants. The SSH runtime's@@ -11,7 +11,7 @@ import pytestfrom gateway import host_rendezvous as hr-pytestmark = pytest.mark.windows_only+pytestmark = pytest.mark.platforms("windows")@pytest.fixturediff --git a/tests/gateway/test_status.py b/tests/gateway/test_status.pyindex 74fb85e5798..e6249a88fca 100644--- a/tests/gateway/test_status.py+++ b/tests/gateway/test_status.py@@ -652,7 +652,7 @@ class TestPidExistsZombieProbe:monkeypatch.setattr(psutil.Process, "status", spy)return calls- @pytest.mark.windows_only+ @pytest.mark.platforms("windows")def test_windows_skips_zombie_status_probe(self, monkeypatch):# Faking os.name on POSIX proves nothing about the cost on the real host; the wine2e# runner receipt (red on main, green on the fix) is the live repro for this test.@@ -660,7 +660,7 @@ class TestPidExistsZombieProbe:assert status._pid_exists(os.getpid()) is Trueassert calls == []- @pytest.mark.linux_only+ @pytest.mark.platforms("linux")def test_posix_still_probes_zombie_status(self, monkeypatch):# Control: on POSIX a zombie still answers pid_exists(), so the probe must survive.calls = self._spy_status(monkeypatch)diff --git a/tests/gateway/test_webhook_filter_interpreter.py b/tests/gateway/test_webhook_filter_interpreter.pyindex d3e5dbc5fb3..d7f4577371f 100644--- a/tests/gateway/test_webhook_filter_interpreter.py+++ b/tests/gateway/test_webhook_filter_interpreter.py@@ -24,7 +24,7 @@ def _fake_bash(tmp_path, body: str):return script[email protected]_only # POSIX shebang fixture; the Windows half is the wine2e receipt[email protected]("linux") # POSIX shebang fixture; the Windows half is the wine2e receiptdef test_shell_filter_runs_under_find_bash_interpreter(tmp_path, monkeypatch):"""The .sh filter must be spawned through ``_find_bash()``, never a PATH/``which`` lookup (#116818)."""marker = tmp_path / "ran"@@ -38,7 +38,7 @@ def test_shell_filter_runs_under_find_bash_interpreter(tmp_path, monkeypatch):assert accepted is True and transformed == {"ok": True}[email protected]_only # POSIX shebang fixture; the Windows half is the wine2e receipt[email protected]("linux") # POSIX shebang fixture; the Windows half is the wine2e receiptdef test_silent_nonzero_exit_is_logged_as_warning(tmp_path, monkeypatch, caplog):"""rc!=0 with no stdout AND no stderr is the interpreter-never-ran signature: WARNING, not INFO."""fake = _fake_bash(tmp_path, "exit 1\n")diff --git a/tests/hermes_cli/test_chat_q_exit_clear.py b/tests/hermes_cli/test_chat_q_exit_clear.pyindex 6ad0c4674eb..aa0fd08b7de 100644--- a/tests/hermes_cli/test_chat_q_exit_clear.py+++ b/tests/hermes_cli/test_chat_q_exit_clear.py@@ -193,7 +193,7 @@ def test_clear_fallback_spawns_no_shell(monkeypatch):assert calls == [(["/usr/bin/clear"], {"stdin": sp.DEVNULL, "creationflags": 0, "check": False})][email protected]_only[email protected]("windows")def test_clear_fallback_windows_runs_cls_with_hidden_console(monkeypatch):"""Native Windows: `cls` is a cmd builtin, so the argv is cmd /c cls, run with thereal windows_hide_flags() (CREATE_NO_WINDOW) so no console flashes (#116904)."""diff --git a/tests/hermes_cli/test_gateway_windows.py b/tests/hermes_cli/test_gateway_windows.pyindex a71165856d5..3c92dd46e88 100644--- a/tests/hermes_cli/test_gateway_windows.py+++ b/tests/hermes_cli/test_gateway_windows.py@@ -43,7 +43,7 @@ def test_exec_schtasks_decodes_ansi_output_under_utf8_mode(monkeypatch):assert gateway_windows._is_access_denied(err) and gateway_windows._should_fall_back(1, err)[email protected]_only[email protected]("windows")def test_exec_schtasks_round_trips_non_ascii_task_argument_live(monkeypatch):"""Real schtasks.exe on a real task whose argument carries a non-ASCII (ANSI-representable)character, queried from a UTF-8-mode interpreter: the template/live comparison indiff --git a/tests/hermes_cli/test_gitlock_tmp_packs.py b/tests/hermes_cli/test_gitlock_tmp_packs.pyindex 2cb3a0d79d5..92113b87906 100644--- a/tests/hermes_cli/test_gitlock_tmp_packs.py+++ b/tests/hermes_cli/test_gitlock_tmp_packs.py@@ -119,7 +119,7 @@ def test_never_raises_on_unlink_failure(tmp_path, monkeypatch):assert clear_stale_tmp_packs(repo) == [] # skipped, not raised[email protected]_only[email protected]("windows")def test_windows_readonly_debris_is_cleared(tmp_path, monkeypatch):"""git renames its transfer temps into place read-only, and Windows refuses to unlink aread-only file with EACCES — the exact rule that let aborted-fetch debris survive thisdiff --git a/tests/hermes_cli/test_kanban_worktree_unicode_path.py b/tests/hermes_cli/test_kanban_worktree_unicode_path.pyindex 984b8572f48..08d8cbbe81d 100644--- a/tests/hermes_cli/test_kanban_worktree_unicode_path.py+++ b/tests/hermes_cli/test_kanban_worktree_unicode_path.py@@ -51,7 +51,7 @@ def test_path_key_ignores_unicode_form():assert kbw._path_key("/tmp/repo-Personlich") != kbw._path_key(composed)[email protected]_only[email protected]("macos")def test_nfc_workspace_path_resolves_against_nfd_repo_root(tmp_path):"""A task row in NFC form resolves on macOS, where git reports NFD."""repo = tmp_path / _nfd("repo-Persönlich")@@ -80,7 +80,7 @@ def test_nfc_workspace_path_resolves_against_nfd_repo_root(tmp_path):)[email protected]_only[email protected]("macos")def test_repo_root_treated_as_repo_root_in_other_unicode_form(tmp_path):"""A root passed in NFC form must take the anchored-worktree path, not fail."""repo = tmp_path / _nfd("root-Persönlich")diff --git a/tests/hermes_cli/test_legacy_launchers_windows_live.py b/tests/hermes_cli/test_legacy_launchers_windows_live.pyindex 375c43a5185..268bc875d81 100644--- a/tests/hermes_cli/test_legacy_launchers_windows_live.py+++ b/tests/hermes_cli/test_legacy_launchers_windows_live.py@@ -14,7 +14,7 @@ import pytestimport hermes_cli.gateway_windows as gateway_windows[email protected]_only[email protected]("windows")def test_status_warns_and_uninstall_removes_pre_suffix_launchers(tmp_path, monkeypatch, capsys):home = tmp_path / "hermes"(home / "gateway-service").mkdir(parents=True)diff --git a/tests/hermes_cli/test_startup_fast_guards.py b/tests/hermes_cli/test_startup_fast_guards.pyindex 6bf6328fae3..106b582cec0 100644--- a/tests/hermes_cli/test_startup_fast_guards.py+++ b/tests/hermes_cli/test_startup_fast_guards.py@@ -42,7 +42,7 @@ _FORBIDDEN_MODULES = ()[email protected]_only[email protected]("linux")def test_cli_starts_from_a_deleted_cwd(tmp_path):"""A child spawned into a directory that was removed since (a cron delivery from a reapedkanban workspace) must still reach argv parsing: a relative ``sys.path`` entry madediff --git a/tests/hermes_state/test_write_lock_owner_attribution.py b/tests/hermes_state/test_write_lock_owner_attribution.pyindex c652331e15a..5cd869d7288 100644--- a/tests/hermes_state/test_write_lock_owner_attribution.py+++ b/tests/hermes_state/test_write_lock_owner_attribution.py@@ -33,7 +33,7 @@ def test_parse_proc_locks_keeps_only_write_locks_on_our_inodes_and_decodes_the_w][email protected]_only[email protected]("linux")def test_live_writer_in_another_process_is_named_by_pid(tmp_path):db = tmp_path / "state.db"conn = sqlite3.connect(db)diff --git a/tests/scripts/install/test_install_sh_system_package_probe.py b/tests/scripts/install/test_install_sh_system_package_probe.pyindex 8522a2f1a47..6f7a84fbda8 100644--- a/tests/scripts/install/test_install_sh_system_package_probe.py+++ b/tests/scripts/install/test_install_sh_system_package_probe.py@@ -12,7 +12,7 @@ REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"pytestmark = [- pytest.mark.linux_only,+ pytest.mark.platforms("linux"),pytest.mark.skipif(shutil.which("bash") is None, reason="needs bash"),]diff --git a/tests/tools/test_computer_use_doctor_stale_units.py b/tests/tools/test_computer_use_doctor_stale_units.pyindex 60e6623a2d3..41457853a03 100644--- a/tests/tools/test_computer_use_doctor_stale_units.py+++ b/tests/tools/test_computer_use_doctor_stale_units.py@@ -16,7 +16,7 @@ import pytestfrom tools.computer_use import doctor-pytestmark = pytest.mark.linux_only+pytestmark = pytest.mark.platforms("linux")_STALE = "%h/.cua-driver/packages/releases/0.20.0-x86_64-unknown-linux-gnu/cua-driver"diff --git a/tests/tools/test_skills_hub.py b/tests/tools/test_skills_hub.pyindex 1724459ad0b..c1681400f62 100644--- a/tests/tools/test_skills_hub.py+++ b/tests/tools/test_skills_hub.py@@ -1359,7 +1359,7 @@ class TestQuarantineBundleBinaryAssets:assert (q_path / "SKILL.md").read_bytes() == bundle.files["SKILL.md"].encode("utf-8")assert content_hash(q_path) == bundle_content_hash(bundle)- @pytest.mark.windows_only+ @pytest.mark.platforms("windows")def test_quarantine_bundle_hash_matches_bundle_on_windows(self, tmp_path):"""Real Windows text mode: the quarantined SKILL.md hashes like the fetched bundle (#117181)."""import tools.skills_hub as hub