Skip to content

format_id.agent_url compared without canonicalization in valuesMatch, making get_products_pagination_integrity/wholesale_first_page unsatisfiable for schema-conformant sellers #7367

Closed

Description

@idemidenko

Bug

get_products_pagination_integrity/wholesale_first_page asserts field_contains on products[0].format_ids[*] against:

{"agent_url": "https://compliance.adcontextprotocol.org", "id": "get_products_pagination_integrity_display"}

matching the fixture seeded at universal/get-products-pagination-integrity.yaml:70.

3.1/core/format-id.json types agent_url as string with format: uri, and its own description states:

"Callers comparing two format-id values MUST canonicalize agent_url per the AdCP URL canonicalization rules before treating two formats as the same."

The runner does the opposite. In dist/lib/testing/storyboard/validations.mjs, validateFieldContains → containsValueMatches → valuesMatch ends at actual === expected for strings, with no canonicalization step.

Why this makes the step unsatisfiable

Any implementation that parses agent_url as a URI canonicalizes an empty path to / and emits https://compliance.adcontextprotocol.org/ (trailing slash). This fails raw === against the fixture value (no trailing slash). The step can only pass by emitting a deliberately non-canonical URL — directly contradicting the schema's own MUST.

Bundle self-inconsistency (further evidence)

media_buy_seller/canonical_formats asserts products[0].format_ids[0].agent_url == "https://creative.adcontextprotocol.org/" with the trailing slash, while the pagination fixture above omits it. The bundle disagrees with itself on what canonical form looks like.

Verified against schema

Confirmed via get_schema on core/format-id.json (3.1.20):

"URL of the agent that defines this format... Callers comparing two format-id values MUST canonicalize agent_url per the AdCP URL canonicalization rules before treating two formats as the same. See docs/reference/url-canonicalization."

Suggested fix

Either:

  1. Canonicalize both sides in valuesMatch for fields the schema types as format: uri (this matches the schema's stated intent), or
  2. Seed fixtures in canonical form consistently across the bundle

The schema text implies (1) is correct — canonicalization is a caller-side MUST, not a producer-side formatting convention.

Impact

Sellers that correctly canonicalize agent_url per spec cannot pass wholesale_first_page without deliberately violating the schema's own normative guidance.

Activity

  1. added
    claude-triaging
    on Sep 8, 2026
  2. bokelley commented on Sep 8, 2026

    @bokelley
    Contributor

    Triage

    Classification: Conformance failure / Bug
    Bucket(s): compliance-suite, spec-adjacent enablement
    Status: ready-to-implement

    What the experts said:

    • ad-tech-protocol-expert: Valid bug — docs/reference/url-canonicalization.mdx step 5 is an explicit MUST covering format-id fields with no runner carve-out. The runner fix in adcp-client is the load-bearing fix; the source storyboard's migration to format_options papers over the issue for 3.2+ rather than making the runner correct.
    • code-reviewer: dist/compliance/3.1.20/ artifacts are immutable; fixture values cannot be patched in-place. The runner fix in adcp-client is the only actionable 3.1.x remediation. URI normalization should be scoped to format: uri schema-annotated fields only to avoid false positives on non-URI strings.

    My take: The bug is clear-cut and confirmed against the dist bundle. The fix has two components — one cross-repo (primary) and one optional source patch (secondary).

    Implementation brief:

    • Primary — adcp-client (cross-repo): In valuesMatch (source: src/testing/storyboard/validations.ts or equivalent), before any string equality comparison, canonicalize both the fixture value and the actual response value when the schema field carries format: uri. Minimum rule: if a URI has an authority but an empty path, append / (RFC 3986 §6.2.3 / url-canonicalization.mdx step 5). Both sides must be normalized — seeding a non-canonical test value into the seller under test is itself a protocol violation by the runner. Patch version bump in adcp-client.

    • Secondary — adcp 3.1.x branch (optional): On 3.1.x, static/compliance/source/universal/get-products-pagination-integrity.yaml still uses format_ids (main has migrated to format_options). Correct agent_url: "https://compliance.adcontextprotocol.org" → "https://compliance.adcontextprotocol.org/" in both the fixtures block and the wholesale_first_page field_contains validation value. This makes the 3.1.21 bundle self-consistent with the spec even before the runner fix ships. Patch-eligible per the conformance-harness rule (fixture correction, no new steps or step-kind changes). No changeset needed in this repo for the non-protocol-surface fix; does need a changeset if the 3.1.x compliance artifact is considered protocol surface.

    • 3.2.0-rc source is already clean (uses format_options — no agent_url comparison in wholesale_first_page). No action needed there.

    Sibling-repo-fix-needed: adcp-client — src/testing/storyboard/validations.ts, valuesMatch function: add URI canonicalization (RFC 3986 §6.2.3 empty-path rule at minimum) for format: uri string fields before equality comparison.


    Triaged by Claude Code. Session: https://claude.ai/code/session_017pjzzxnxsqebkaNsKubEvi


    Generated by Claude Code

  3. added this to the 3.0.0 milestone on Sep 8, 2026
  4. added
    bug
    claude-triaged
    priority:P0
    and removed
    claude-triaging
    on Sep 8, 2026
  5. modified the milestones: 3.0.0, P0 Bugs on Sep 8, 2026
  6. bokelley commented on Sep 23, 2026

    @bokelley
    Contributor

    The in-repo 3.1 fixture correction has now merged as #7652 (f2abd962b02eefb5d1c94c9db58c2ed3fe259639). The general runner-side stable fix is now adcontextprotocol/adcp-client#3019 against 13.x; it canonicalizes identity URL fields across literal, subset, context, and cross-response comparisons while leaving resource URLs byte-significant. Keep open until that patch is published and verified.

  7. bokelley commented on Sep 23, 2026

    @bokelley
    Contributor

    Release verification update: adcp-client #3020 merged and its release job reports @adcp/[email protected] published under adcp-3.1, with Git tag @adcp/[email protected] pushed. The job failed only on the follow-up latest dist-tag move because no maintainer npm credential was available. npm registry propagation/fetch verification is still pending, so this issue remains open.

  8. bokelley commented on Sep 23, 2026

    @bokelley
    Contributor

    Verified the published stable package end to end. @adcp/[email protected] is fetchable from npm under the adcp-3.1 dist-tag, and its packed dist/lib/testing/storyboard/validations.{mjs,js} contains canonical identity-URL comparison (canonicalTargetUri(actual) === canonicalTargetUri(expected)) plus the distinct-agent normalization regression fix. This resolves the unsatisfiable stable-runner comparison. The separate credential-only task of moving npm latest from 13.1.0 to 13.1.1 does not affect availability of the fixed stable package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugclaude-triagedcompliance-suitepriority:P0

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions