Skip to content
Draft
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 python/leanguard/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def inspect_policy(engine: Engine) -> dict:
**tree,
"engine_sha256": engine.fingerprint,
"properties": {
"pack": engine.manifest.get("properties", []),
"pack": deepcopy(engine.manifest.get("properties", [])),
"engine": ["decision_sound", "decision_no_errors"],
"note": "Declaration names identify compiled claims; source prose is not a proved specification.",
},
Expand Down
1 change: 1 addition & 0 deletions tests/test_inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_inspection_preserves_manifest_and_parameters():
"scope": "principal",
}
tree["rules"].clear()
tree["properties"]["pack"].append("local_edit")
assert engine.manifest == before


Expand Down
6 changes: 3 additions & 3 deletions tests/test_mcp_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

pytest.importorskip("mcp")
import httpx
import httpx2
from leanguard import GuardHost
from leanguard.demo import MemoryTools
from leanguard.mcp_http import build_http_app
Expand Down Expand Up @@ -33,8 +33,8 @@ async def test_http_requires_auth_and_dispatches_only_through_host(host):
}
async with (
app.router.lifespan_context(app),
httpx.AsyncClient(
transport=httpx.ASGITransport(app), base_url="http://localhost:8000"
httpx2.AsyncClient(
transport=httpx2.ASGITransport(app), base_url="http://localhost:8000"
) as client,
):
assert (await client.post("/mcp", json=payload, headers=headers)).status_code == 401

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Logic Error: test_http_requires_auth_and_dispatches_only_through_host is an async def function but has no @pytest.mark.asyncio decorator (or equivalent async runner marker). Without it, pytest collects the coroutine object but never awaits it — the entire test body is silently skipped and all assertions pass vacuously. This means the auth and dispatch checks added in this PR are never actually executed. Add @pytest.mark.asyncio above the function definition.

Expand Down
Loading