Conversation
…ntroller scenarios Adds two new TestControllerStore scenarios for storyboard parity with the Node training-agent (adcp#3115, adcp#3194). Sellers running the create_media_buy_async.yaml storyboard suite will now grade `passing` rather than `not_applicable` on the submitted-arm phase. https://claude.ai/code/session_01HcWEyL1xWQtFTmDEaMme8Q
…chema, whitespace task_id - Add force_create_media_buy_arm + force_task_completion to the generated Scenario enum so _apply_pydantic_schemas() doesn't clobber the live ADCP_TOOL_DEFINITIONS enum at import time - Add arm/task_id/result fields to the generated Params model to match the updated request schema cache - Add ForcedDirectiveSuccess oneOf variant to comply-test-controller- response.json so spec-compliant validators accept the new response shape - Strip whitespace from task_id in both force_create_media_buy_arm and force_task_completion dispatchers to prevent empty-string bypass - Add force_create_media_buy_arm + force_task_completion to ListScenariosSuccess.scenarios.items.enum in the response schema https://claude.ai/code/session_01HcWEyL1xWQtFTmDEaMme8Q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #281
Adds two new
TestControllerStorescenarios for storyboard parity with the Node training-agent (adcp#3115, adcp#3194). Sellers running thecreate_media_buy_async.yamlstoryboard suite against a Python reference seller will now gradepassingrather thannot_applicableon the submitted-arm phase.Changes
src/adcp/server/test_controller.py— addsforce_create_media_buy_armandforce_task_completiontoSCENARIOS, adds abstract base stubs with full docstrings (including idempotency/isolation contract examples), adds dispatcher branches with centralized input validation (arm enum, conditional task_id-when-submitted, char limits, non-empty result dict, whitespace-strip on task_id for both scenarios), and derivesregister_test_controller's inline enum fromSCENARIOSso it can't drift.src/adcp/server/mcp_tools.py— adds both new scenario names toADCP_TOOL_DEFINITIONScomply_test_controller enum (the static stub; the Pydantic-generated path also now carries them).src/adcp/types/generated_poc/compliance/comply_test_controller_request.py— addsforce_create_media_buy_armandforce_task_completionto theScenarioenum andarm/task_id/resultfields toParams, so_apply_pydantic_schemas()generates the correct live MCP tool schema rather than clobbering the new names with the stale generated enum.schemas/cache/compliance/comply-test-controller-request.json— adds both scenario names to the request schema enum,arm/task_id/resultparam properties, andallOfconditional constraints.schemas/cache/compliance/comply-test-controller-response.json— addsForcedDirectiveSuccessas a newoneOfvariant (required:success,arm; discrimination vianot: required:[previous_state|scenarios|simulated|error]), and adds both new names toListScenariosSuccess.scenarios.items.enum.tests/test_force_create_media_buy_arm_and_force_task_completion.py— 19 new tests at parity with the Node training-agent nine-test pattern: valid registration (submitted + input-required arms), overwrite-pending, INVALID_PARAMS for missing/bad arm, task_id conditional requirement, char limits, whitespace task_id rejection, force_task_completion valid/idempotent/diverging/cross-account, INVALID_PARAMS for missing task_id/empty result/long task_id, list_scenarios advertisement (both implemented, neither implemented, partial).What was tested
pytest tests/(excluding slow integration + ip_pinned_transport): 2181 passed, 21 skipped, 0 failuresruff check src/: cleanmypy src/adcp/server/test_controller.py: no errorsADCP_TOOL_DEFINITIONS["comply_test_controller"]enum at import time includes both new names after the Pydantic schema generation pipeline runsPre-PR review
ForcedDirectiveSuccessoneOf discrimination is airtight across all four sibling variants;NOT_FOUNDcross-account isolation matches AdCP caller-isolation semantics; both original blockers resolved; one nit (whitespace task_id also absent fromforce_task_completion) fixed in follow-up commitNits surfaced (not fixed — follow-up candidates)
arm=""produces "Missing required parameter: 'arm'" rather than the more accurate "arm must be 'submitted' or 'input-required'" — misleading wording, correct error codetask_id(e.g. integer from JSON) passes the not-check and hitslen()withTypeError, landing inINTERNAL_ERRORinstead ofINVALID_PARAMS— pre-existing pattern in other dispatchers; low-severity since MCP clients are typed_BothStorein tests has a redundant explicitTestControllerStorebase (already inherited via both parents)**kwargsrather than the documented*, context=Noneopt-in patternSession: https://claude.ai/code/session_01HcWEyL1xWQtFTmDEaMme8Q
Generated by Claude Code