Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/control_plane/test_todo_list_record_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 9 additions & 6 deletions tests/test_status_server_extension_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
),
}


Expand All @@ -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
Expand All @@ -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
Expand Down
Loading