From 742ec52808e11268d8384c2115f5ed81e7d8ff3a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 15 Sep 2026 04:44:26 +0000 Subject: [PATCH] Fix Windows path assertion in colleague spawn test. Compare workspace_dir via parsed config_json and Path.resolve() instead of as_posix() substring matching, which fails when Windows paths are JSON-escaped with backslashes. Co-authored-by: XYAI Labs --- tests/unit/test_colleague_spawn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_colleague_spawn.py b/tests/unit/test_colleague_spawn.py index 0707637e..8418572f 100644 --- a/tests/unit/test_colleague_spawn.py +++ b/tests/unit/test_colleague_spawn.py @@ -2,6 +2,7 @@ from __future__ import annotations +import json from pathlib import Path from octop.modules.org_os.compiler.compile import compile_blueprint @@ -38,4 +39,5 @@ def test_spawn_writes_registry_and_agent_row(tmp_path: Path) -> None: assert row is not None assert row.name == "Policy Analyst" assert row.system_prompt and "Policy Analyst" in row.system_prompt - assert compiled.workspace.as_posix() in (row.config_json or "") + config = json.loads(row.config_json or "{}") + assert Path(config["workspace_dir"]).resolve() == compiled.workspace.resolve()