From dd342d98f4252863a9d7cffa958d35b3f921c32c Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Thu, 15 Oct 2026 10:54:47 +0800 Subject: [PATCH 1/2] test: align failure fixtures with current transport owners Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- .../test_todo_list_record_references.py | 2 +- tests/extensions/test_lark_goal_channel.py | 2 +- tests/test_status_server_extension_projection.py | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/control_plane/test_todo_list_record_references.py b/tests/control_plane/test_todo_list_record_references.py index 693339a083..9a067cc0d3 100644 --- a/tests/control_plane/test_todo_list_record_references.py +++ b/tests/control_plane/test_todo_list_record_references.py @@ -47,7 +47,7 @@ def cli(registry, runtime, flags, output_format="json"): def test_projection_failure_returns_the_standard_cli_error_without_source_changes(tmp_path, monkeypatch, capsys): from loopx.cli import main - from loopx.cli_commands import todo as todo_command + from loopx.cli_commands import todo_list as todo_command isolate_sqlite_runtime(tmp_path, monkeypatch) registry, state = _write_fixture(tmp_path) diff --git a/tests/extensions/test_lark_goal_channel.py b/tests/extensions/test_lark_goal_channel.py index 9fabb1efd4..18b926402a 100644 --- a/tests/extensions/test_lark_goal_channel.py +++ b/tests/extensions/test_lark_goal_channel.py @@ -439,7 +439,7 @@ def fail_replace(source: object, destination: object) -> None: raise OSError("fixture replace failure") monkeypatch.setattr( - "loopx.extensions.lark.private_json.os.replace", + "loopx.file_lock.os.replace", fail_replace, ) diff --git a/tests/test_status_server_extension_projection.py b/tests/test_status_server_extension_projection.py index 0f36adbd52..f9b040e3e7 100644 --- a/tests/test_status_server_extension_projection.py +++ b/tests/test_status_server_extension_projection.py @@ -193,7 +193,7 @@ def test_status_server_advertises_and_serves_projection_by_exact_ref( assert capabilities["presentation_detail_url"] == DEFAULT_EXTENSION_PROJECTION_PATH status, surfaces_payload = _request_json( f"{base_url}{DEFAULT_EXTENSION_PRESENTATION_SURFACES_PATH}", - origin="http://127.0.0.1:5173", + origin=base_url if chat else "http://127.0.0.1:5173", ) assert status == 200 surfaces = surfaces_payload["presentation_surfaces"] @@ -202,7 +202,7 @@ def test_status_server_advertises_and_serves_projection_by_exact_ref( assert surfaces["items"][0]["state"] == "ready" status, status_payload = _request_json( f"{base_url}{DEFAULT_STATUS_PATH}", - origin="http://127.0.0.1:5173", + origin=base_url if chat else "http://127.0.0.1:5173", ) assert status == 200 assert "presentation_surfaces" not in status_payload @@ -216,7 +216,7 @@ def test_status_server_advertises_and_serves_projection_by_exact_ref( ) status, payload = _request_json( f"{base_url}{DEFAULT_EXTENSION_PROJECTION_PATH}?{query}", - origin="http://127.0.0.1:5173", + origin=base_url if chat else "http://127.0.0.1:5173", ) assert status == 200 @@ -251,7 +251,10 @@ def test_status_server_projection_route_rejects_non_loopback_origin( assert status == 403 assert payload == { "ok": False, - "error": "extension projection reads only accept loopback browser origins", + "error": ( + "LoopX Chat requires a loopback Host and an allowed browser origin." + if chat else "extension projection reads only accept loopback browser origins" + ), } @@ -275,7 +278,7 @@ def test_status_server_projection_route_rejects_owner_only_surface( ) status, payload = _request_json( f"{base_url}{DEFAULT_EXTENSION_PROJECTION_PATH}?{query}", - origin="http://127.0.0.1:5173", + origin=base_url if chat else "http://127.0.0.1:5173", ) assert status == 400 @@ -293,7 +296,7 @@ def test_status_server_projection_route_requires_complete_detail_ref( with _published_projection_server(tmp_path, chat=chat) as (base_url, _installed, _receipt): status, payload = _request_json( f"{base_url}{DEFAULT_EXTENSION_PROJECTION_PATH}?extension_id=test-research-extension", - origin="http://localhost:5173", + origin=base_url if chat else "http://localhost:5173", ) assert status == 400 From 4591c660c1956ef8e5b0740e1c43439522fd97b5 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Thu, 15 Oct 2026 11:14:15 +0800 Subject: [PATCH 2/2] test: reuse the atomic-write fixture repair from PR 6463 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- tests/extensions/test_lark_goal_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/extensions/test_lark_goal_channel.py b/tests/extensions/test_lark_goal_channel.py index 18b926402a..9fabb1efd4 100644 --- a/tests/extensions/test_lark_goal_channel.py +++ b/tests/extensions/test_lark_goal_channel.py @@ -439,7 +439,7 @@ def fail_replace(source: object, destination: object) -> None: raise OSError("fixture replace failure") monkeypatch.setattr( - "loopx.file_lock.os.replace", + "loopx.extensions.lark.private_json.os.replace", fail_replace, )