Repository navigation
fix(compliance): canonicalize format-id agent_url in pagination storyboard - #7652
Merged
bokelley merged 1 commit intoSep 23, 2026
Conversation
…board core/format-id.json states that callers comparing two format-id values MUST canonicalize agent_url first, and url-canonicalization.mdx step 5 substitutes "/" for an empty path when an authority is present. The get_products_pagination_integrity storyboard seeds and compares "https://compliance.adcontextprotocol.org" with no path, so a seller that follows that MUST emits the trailing-slash form and fails the runner's raw string comparison. The step could only pass by emitting a deliberately non-canonical URL. Corrects all six occurrences in the storyboard: both seeded product fixtures, both get_products request filters, and the field_contains values on wholesale_first_page and wholesale_terminal_page. The bundle was also self-inconsistent: canonical_formats.yaml already uses the canonical "https://creative.adcontextprotocol.org/" form. Partially addresses adcontextprotocol#7367. Runner-side canonicalization in adcp-client remains the general fix for every other uri-typed comparison. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean conformance fix on 3.1.x, no findings.
Checked: canonicalizes format_ids[].agent_url (trailing slash per url-canonicalization step 5 / format-id MUST) across all six occurrences in get-products-pagination-integrity.yaml; all sites patched with no stray references; only widens the passing set (no contract break); patch-scoped changeset present and correct.
No blocking or medium findings. No high-risk paths, no gated paths, no author team gate. Falls through to row 9.
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.
Summary
The secondary, in-repo half of #7367: make the
get_products_pagination_integritystoryboard'sformat-idvalues canonical on the 3.1.x line, so a schema-conformant seller can satisfy it without waiting on the cross-repo runner fix.core/format-id.jsonstates the requirement on the comparing side:and
docs/reference/url-canonicalization.mdxstep 5 is explicit about what that does to this value:The storyboard seeds and compares
"https://compliance.adcontextprotocol.org"— empty path, authority present. A seller that follows the MUST emits"https://compliance.adcontextprotocol.org/", and the step can only pass by emitting a deliberately non-canonical URL.Verified against the runner the 3.1.x line actually pins
@adcp/sdk9.6.2 (this branch'spackage.jsonpin),dist/lib/testing/storyboard/validations.js:595:No canonicalization on either side. Replaying that function against the fixture:
A seller emitting the non-canonical form now fails, which is the correct outcome per the
format-idMUST.Scope: six occurrences, not two
The triage names the seeded fixtures and the
wholesale_first_pagefield_containsvalue. Reading the file, the same value appears in six places across three roles, and the request filters matter as much as the assertions — a filter asking for the non-canonical form may not select the product on a seller that canonicalizes on ingest:get_productsrequest filters (filters.format_ids)field_containsvalues —wholesale_first_pageandwholesale_terminal_pagewholesale_terminal_pagecarries the identical assertion and is affected identically; it isn't mentioned in the issue or the triage.Supporting evidence for the canonical form being the right target
The bundle disagrees with itself today. Across
static/compliance/sourceon this branch,agent_url: "https://creative.adcontextprotocol.org/"appears 9 times and the non-canonical spelling 4 times;canonical_formats.yaml— the storyboard whose whole subject is canonical formats — uses the trailing-slash form. This change moves the pagination storyboard onto the same side.Patch eligibility
Patch-eligible conformance correction, same shape as #7554 and #7572: it corrects fixture values so a previously-unsatisfiable assertion becomes satisfiable by a conformant seller. No new steps, no step-kind changes, no protocol surface added, and no previously-conformant response is newly rejected — a seller that was passing this step was necessarily emitting a non-canonical
agent_url, which theformat-iddescription already forbids relying on.mainneeds no equivalent change: it has migrated this storyboard toformat_optionsand no longer comparesagent_urlhere.Validation
npm run build:compliance— clean, all storyboard lints pass; regenerateddist/compliance/latest/carries 6 canonical and 0 non-canonical occurrencestests/lint-compliance-source-authority,lint-compliance-packaged-refs,lint-storyboard-contradictions,lint-storyboard-check-enum— 52 assertions, all passnpm run precommit— 62/62 root tests, 285/285 server test files (4365 passed, 30 skipped)One note on the last item, since it cost some time and may bite the next contributor: running the precommit on this branch in a working tree whose
node_moduleswas installed frommainproduces 310 unrelated failures acrossserver/tests/unit/(training-agent,idempotency,storyboard-fix-plan-e2e). Reproduced on unmodifiedupstream/3.1.xwith an empty diff, so it is not caused by any change —mainresolves@adcp/sdkat 14.x while this branch pins 9.6.2.npm cion the branch clears all of it.Partially addresses #7367. The runner-side fix in
adcp-client(canonicalize both sides forformat: urifields) remains the general remedy for every other uri-typed comparison and is unaffected by this.🤖 Generated with Claude Code