Skip to content

[reporting] Make required canonicalization golden-vector cases machine-verifiable #6994

Description

@bokelley

Summary

reporting-canonicalization-contract.json currently requires only golden_vectors.minItems: 2. Its description says the vectors MUST include:

  • an empty report; and
  • an ordering/encoding case.

Two trivial non-empty vectors satisfy the schema, so an SDK cannot tell whether the required cross-language cases are present. The TypeScript work in adcontextprotocol/adcp-client#2744 had to enforce the intent outside the generated schema.

Proposed contract

Give each vector a machine-readable purpose with values such as empty_report, ordering_encoding, or additional.

Then encode and test these requirements:

  • at least one empty_report vector;
  • empty_report.input_rows is exactly an empty array;
  • at least one ordering_encoding vector;
  • required purposes are unique;
  • names remain unique;
  • every vector's base64 bytes and SHA-256 agree.

If fixed normative names are preferred over a new purpose field, require those names explicitly and document them as stable protocol identifiers.

Why this helps

Consumers must validate every golden vector before using a canonicalization contract. Machine-identifiable purposes let TypeScript, Python, and future SDKs prove they exercised the required empty and ordering/encoding semantics instead of merely counting vectors.

Acceptance signal

A contract with two ordinary/trivial vectors fails schema or protocol contract validation. A contract containing the required empty and ordering/encoding vectors passes in protocol tests and both SDKs.

Related: #6953, adcontextprotocol/adcp-client#2744.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.compliance-suiteschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions