Description
With adcp==8.0.0b14 and mcp==2.2.0, a compact list_products handler returning the canonical listed arm produces an invalid result after framework enrichment.
The handler returns:
{'outcome': 'listed', 'products': [], 'feed_version': 'fixture-feed', 'cache_scope': 'public'}create_mcp_server adds status: completed. The pinned media-buy/list-products-response.json has additionalProperties: false and does not declare status; its discriminator is outcome. A real MCP client's call_tool rejects the result with:
Invalid structured content returned by tool list_products: Additional properties are not allowed ('status' was unexpected)
This is reproduced by the Python driver in adcp#7447, using an explicit server artifact pin 3.2.0-rc.1, the schema-valid wire selector 3.2-rc.1, create_mcp_server, and the MCP in-memory transport. The driver retains the actual wire response through the public request API and then invokes the client's normal output validator; both that validator and the independent immutable-artifact check reject it.
Please apply envelope enrichment according to each compact task's contract, preserving the native outcome arm, and add a server-to-client test with response validation enabled. Do not require applications to repair framework-added fields. This is separate from lifecycle coordination or reverse legacy facade support.
Activity
bokelley commentedon Sep 13, 2026
Triage
Classification: Bug
Bucket(s): handlers, validation (neither label exists in repo — flagged in run summary)
Status: ready-to-implement
What the experts said:
list_products,decline_proposals,request_proposals,refine_proposals— all withadditionalProperties: falseandoutcomeas discriminator; recommends frozenset method-name guard over value-based check to avoid false negatives from non-compact methods that echo anoutcomefield;test_compact_lifecycle_matrix.py:189asserts the broken shape and must be updated.{"status": "completed", ...}shape.My take:
_normalize_response_envelope(mcp_tools.py:123–125) injectsstatus: completedinto any response withoutstatus/task_id, but four compact lifecycle methods use closed schemas wherestatusis schema-invalid. The three remaining compact methods (buy_products,accept_proposal,control_media_buy) discriminate onstatusand correctly continue to receive the injection.src/adcp/server/mcp_tools.py— add_OUTCOME_DISCRIMINATED_METHODS = frozenset({"list_products", "decline_proposals", "request_proposals", "refine_proposals"})and extend the guard at line 123 toif "status" not in result and "task_id" not in result and method_name not in _OUTCOME_DISCRIMINATED_METHODS:tests/test_compact_lifecycle_matrix.py— update_DirectLifecyclePlatform.list_products(line 91) and assertion at line 189 to use the schema-validoutcome: listedarm; audit proposal-mode fixture handlers (lines 108–115) for the same patterntests/test_schema_validation_server.py— add acreate_tool_callertest forlist_productsreturning{"outcome": "listed", "products": [], "feed_version": "fixture", "cache_scope": "public"}, assertingstatusabsent andvalidate_responsepassespytest tests/test_schema_validation_server.py tests/test_compact_lifecycle_matrix.py;mypy src/adcp/server/mcp_tools.py;ruff check .; non-breaking — removes schema-invalid enrichment with no public API changeTriaged by Claude Code. Session: https://claude.ai/code/session_019pvZfcQ6nCsBnjNCzwGVHu
Generated by Claude Code