Repository navigation
Conversation
|
Warning Amazon Q Developer for GitHub: end of support On January 30, 2027, AWS will discontinue support for the Amazon Q Developer for GitHub App. New app installations will no longer be available starting November 18, 2026. For capabilities similar to the Amazon Q Developer for GitHub App, explore Kiro and the Kiro GitHub App. For more information about the end of support, see Amazon Q Developer end-of-support announcement on the AWS DevOps Blog. |
There was a problem hiding this comment.
Review Summary
This PR addresses two distinct issues: (1) a shared-reference mutation bug in inspect_policy where the "pack" property list was not deep-copied, and (2) switching the MCP HTTP test transport from httpx to httpx2 to match the pinned SDK dependency.
The core fixes are correct. The deepcopy in inspection.py properly isolates the returned "pack" list from the engine manifest, and the new test assertion in test_inspection.py correctly validates that isolation.
One blocking issue found:
test_http_requires_auth_and_dispatches_only_through_host in tests/test_mcp_http.py is declared async def but is missing a @pytest.mark.asyncio decorator (or equivalent, e.g., via asyncio_mode = "auto" in pytest config). Without it, pytest silently skips the entire coroutine body — every assertion passes vacuously, meaning the new auth/dispatch tests are not actually exercised. Please verify that either the decorator is present or the project's pytest configuration applies automatic asyncio mode globally, and add @pytest.mark.asyncio if neither applies.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
| transport=httpx2.ASGITransport(app), base_url="http://localhost:8000" | ||
| ) as client, | ||
| ): | ||
| assert (await client.post("/mcp", json=payload, headers=headers)).status_code == 401 |
There was a problem hiding this comment.
🛑 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.
Findings
The documented
.[test,mcp]install cannot collect the HTTP MCP tests because they importhttpx. The pinned MCP SDK supplieshttpx2, which runs the same ASGI assertions.inspect_policycopies the inspection tree but shares the manifest's pack property list. Editing an inspection result can therefore change the property names that another consumer reads from the same engine. This change copies that list and extends the manifest-isolation regression.Validation