Skip to content

training-agent: emit adcp.supported_versions and adcp_version envelope echo (#3570 follow-up) #4711

Description

@bokelley

Context

PR #4702 lands the universal version_negotiation storyboard exercising both halves of the release-precision negotiation contract introduced by spec PR #3493:

  1. Seller advertises adcp.supported_versions on get_adcp_capabilities.
  2. Seller echoes adcp_version at the envelope root on every response.

Both validations ship severity: advisory at 3.1 per docs/reference/versioning.mdx § Migration timeline and promote to required at 3.2.

The training agent — the reference implementation everyone copies — currently emits neither. It passes the storyboard solely because the validations are advisory. To feed the 3.2 cutover with a reference implementation that passes the (then-required) checks, both emissions need to land in the 3.1 window.

What's missing

adcp.supported_versions advertisement

server/src/training-agent/task-handlers.ts:3053-3068 returns:

adcp: {
  major_versions: [...SUPPORTED_MAJOR_VERSIONS],   // present
  idempotency: { supported: true, replay_ttl_seconds: 86400 },
  // no supported_versions
  // no build_version
}

Add supported_versions: [...SUPPORTED_RELEASE_VERSIONS] (release-precision strings, e.g. ["3.0"] initially; ["3.0", "3.1"] once the agent's pinned SDK ships 3.1.x schemas). Pattern: ^\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?$ per /schemas/protocol/get-adcp-capabilities-response.json.

build_version (full semver, e.g. "3.0.6+training-agent.42") is optional advisory metadata — nice-to-have but not required.

adcp_version envelope echo

grep -rn adcp_version server/src/ returns only badge/registry surfaces — there is no envelope-level emission anywhere on the response path. The envelope echo lives at the framework-server response-wrapping layer, not the task-handler layer.

Spec posture (versioning.mdx § Bidirectional negotiation, step 4):

Server echoes: adcp_version on every response tells the buyer which release the seller actually served. The echoed value is the release served, never the seller's own latest release — a 3.1 seller serving a 3.0 buyer at 3.0 echoes "3.0". Buyers SHOULD validate the response against that release's schema, not against their pin.

Implementation:

  1. Read incoming request's adcp_version (release-precision) and adcp_major_version (legacy integer fallback).
  2. Resolve against SUPPORTED_RELEASE_VERSIONS per the algorithm in versioning.mdx (exact match → downshift within major → VERSION_UNSUPPORTED if no release ≤ pin in same major or different major).
  3. On normal responses, echo the resolved release on the envelope. When the request omitted both fields, echo the default release (highest supported).
  4. On VERSION_UNSUPPORTED errors, populate error.data per /schemas/error-details/version-unsupported.jsonsupported_versions array is authoritative.

The core/version-envelope.json allOf composition already covers the field on every request/response schema after spec PR #3493 — this is a runtime emission change, not a schema change.

Acceptance

  • adcp.supported_versions present on get_adcp_capabilities response (release-precision strings)
  • adcp_version echo on every response envelope (or all responses on the public surface)
  • Echoed value reflects the served release, not the agent's own pin (i.e. downshift behavior wired)
  • VERSION_UNSUPPORTED returned with structured error.data when the buyer's pin can't be honored
  • version_negotiation storyboard passes with both advisory validations now satisfied
  • Once landed, the storyboard's two permanent_advisory markers can be removed when the 3.2 cut promotes them to required

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.compliance-suite

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions