Skip to content

sdk(server): A2A comply_test_controller response missing result.artifacts #211

@bokelley

Description

@bokelley

Observed

Every round-4 seller storyboard run logs:

Schema validation failed for comply_test_controller: [ 'A2A response missing result.artifacts field' ]

Where

The storyboard runner dispatches comply_test_controller over A2A. The SDK's A2A executor currently returns the test-controller result under result but not result.artifacts, which is what A2A Task responses are expected to carry for completed operations (per the a2a-sdk Task shape — Task.artifacts: list[Artifact]).

MCP transport is unaffected because MCP payloads are just tool results.

Impact

On storyboards that exercise comply_test_controller over A2A (governance denial / approval flows, delivery-reporting verify, state-machine simulation), the harness emits a schema-validation warning on every call. The scenarios currently pass because the validator's soft-fail path surfaces a warning rather than failing the track, but (a) the log noise is misleading to anyone debugging a real failure, and (b) any AdCP-compliant A2A verifier that strictly requires Task.artifacts will reject.

Suggested fix

In src/adcp/server/a2a_server.py's ADCPAgentExecutor, wrap the tool result into an Artifact (with one DataPart containing the JSON body) and push it onto Task.artifacts before publishing the completed status update. The existing create_a2a_webhook_payload path already constructs Artifact(parts=[DataPart(data=...)]) correctly for webhook emission — adapt the same shape for direct A2A tool returns.

Acceptance

  • A new test in tests/conformance/a2a/ builds a seller, calls comply_test_controller over A2A, asserts the returned Task has a populated artifacts list with the tool result.
  • bash scripts/skill-run.sh seller 3011 media_buy_seller runs without the A2A response missing result.artifacts field log line.

Priority

4.0 or 4.1 — it's a real spec-compliance gap on A2A, but (a) no storyboard currently fails because of it and (b) the fix has A2A-specific surface area that warrants its own review. Not gating 4.0 IMO; worth filing now so we don't forget.

Surfaced during round-4 storyboard validation: #205

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions