fix(tests): make the test suite pass on Windows without regressing Linux

Gate the POSIX-only and symlink-only tests with the linux_only and
require_symlinks markers. Fix the real cross-platform bugs:

- file_operations: use the translate_path flag, send snippets as base64, and
  use sys.executable (the MS Store python3 stub and the list2cmdline
  backslash collapse both broke snippets)
- approval: treat backslash as a Windows path separator, not an escape
- registry, browser_registry, secret_sources, plugins: normalize scope-key case
- checkpoint_manager, plugins_cmd: clear read-only bits before delete
- deadline: make MAX_SAFE_TIMEOUT_S fit the Windows limit
- image_routing, acp, cua_backend, daytona: fix Windows and POSIX paths
- hermes_state: match backslash in the retag LIKE clause
- kanban, disk-cleanup: match drive paths and split command arguments
- scripts: emit host separators through as_posix

207 test files are gated or isolated.
This commit is contained in:
ethernet
2026-08-27 07:34:01 -07:00
parent d95682cd04
commit bd258480d3
222 changed files with 894 additions and 242 deletions

View File

@@ -87,6 +87,7 @@ class TestSkillsDirectoryMount:
assert mounts[0]["container_path"] == "/home/user/.hermes/skills"
@pytest.mark.require_symlinks
def test_symlinks_are_sanitized(self, tmp_path):
"""Symlinks in skills dir should be excluded from the mount."""
hermes_home = tmp_path / ".hermes"
@@ -126,6 +127,7 @@ class TestSkillsDirectoryMount:
class TestIterSkillsFiles:
@pytest.mark.require_symlinks
def test_returns_files_skipping_symlinks(self, tmp_path):
hermes_home = tmp_path / ".hermes"
skills_dir = hermes_home / "skills"
@@ -490,6 +492,7 @@ class TestIterCacheFiles:
assert "upload.zip" in names
assert "report.pdf" in names
@pytest.mark.require_symlinks
def test_skips_symlinks(self, tmp_path, monkeypatch):
"""Symlinks inside cache dirs are skipped."""
hermes_home = tmp_path / ".hermes"