diff --git a/python/leanguard/inspection.py b/python/leanguard/inspection.py index 805dcde..713811b 100644 --- a/python/leanguard/inspection.py +++ b/python/leanguard/inspection.py @@ -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.", }, diff --git a/tests/test_inspection.py b/tests/test_inspection.py index 8d4cbd9..1c06195 100644 --- a/tests/test_inspection.py +++ b/tests/test_inspection.py @@ -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 diff --git a/tests/test_mcp_http.py b/tests/test_mcp_http.py index 5c40ab6..421a044 100644 --- a/tests/test_mcp_http.py +++ b/tests/test_mcp_http.py @@ -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 @@ -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