Skip to content

fix(schemas): restore adcp_major_version in compact beta.0 request schemas - #6802

Closed
garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/preserve-adcp-major-version-beta0
Closed

fix(schemas): restore adcp_major_version in compact beta.0 request schemas#6802
garvitkaushik-123 wants to merge 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/preserve-adcp-major-version-beta0

Conversation

@garvitkaushik-123

Copy link
Copy Markdown
Collaborator

Summary

The 3.2.0-beta.0 frozen snapshots for buy-products, accept-proposal, and control-media-buy request schemas were published before adcp_major_version was added to the source schemas in #6647. Since these schemas set additionalProperties: false, conforming SDK buyers that emit both version fields (as the spec requires through 3.x) fail MCP input validation before the seller handler runs.

Subsequent betas (beta.1+) are not affected — the build picked up the source change correctly.

Changes

  • 18 dist schema files across all beta.0 output paths (bundled, MCP, profiles/production, profiles/media-buy, model-context) patched to include adcp_major_version with the correct representation for each path type (fully inlined for bundled, $ref to $defs for MCP, absolute URL $ref for standalone)
  • tests/compact-version-envelope.test.cjs — removed COMPACT_SCHEMAS_WITHOUT_MAJOR set that encoded the bug as expected behavior; all tools now expect adcp_major_version: 3
  • tests/lint-version-envelope.test.cjs — added two regression guards:
    • Source lint: every request schema with adcp_version must also declare adcp_major_version
    • Dist lint: every versioned bundled dist schema must preserve both version fields

Verification

  • compact-version-envelope.test.cjs passes (SDK validates all 7 lifecycle tools against the patched beta.0 source schemas)
  • lint-version-envelope.test.cjs passes (4 tests including both new guards)
  • Full root unit suite passes (67 files, 1052 tests)
  • Manually verified the $ref targets in MCP schemas resolve correctly (the $defs["external:core/version-envelope.json"] block already contained adcp_major_version in beta.0 — only the property-level reference was missing)

Refs #6649

…hemas

The 3.2.0-beta.0 snapshot for buy-products, accept-proposal, and
control-media-buy was cut before the source schemas gained the deprecated
adcp_major_version field (adcontextprotocol#6647). Combined with additionalProperties:
false, conforming SDK buyers that emit both version fields (required
through 3.x per the spec) fail MCP input validation before the seller
handler runs.

Patches the 18 affected dist files across all beta.0 output paths
(bundled, MCP, profiles, model-context) to include adcp_major_version
with the same definition used in the version envelope and in all
subsequent beta snapshots.

Also fixes compact-version-envelope.test.cjs which encoded the bug as
expected behavior, and adds two regression guards to
lint-version-envelope.test.cjs:
- source lint: every request schema with adcp_version must also declare
  adcp_major_version
- dist lint: every versioned bundled dist schema must preserve both
  version fields

Refs adcontextprotocol#6649
@bokelley

Copy link
Copy Markdown
Contributor

This approach cannot merge because it rewrites files inside the already-published dist/schemas/3.2.0-beta.0 artifact. Released beta artifacts are immutable release records; the failing immutable-artifact check is intentional.

The source schemas and later beta artifacts already contain adcp_major_version, so there is no forward source fix to ship here. If beta.0 needs clarification, please re-scope this to a known-limitation note without changing dist/**/3.2.0-beta.0. Otherwise this PR should be closed.

@bokelley

Copy link
Copy Markdown
Contributor

@bokelley's analysis is correct: the failing "Build and static checks" run enforces the immutable-artifact policy, and dist/schemas/3.2.0-beta.0 cannot be patched after publication regardless of what was missing before the freeze.

@garvitkaushik-123 — two paths forward:

  1. Known-limitation note (if the gap needs a paper trail). Revert all dist/**/3.2.0-beta.0 changes and instead add a short note in the changelog or release notes documenting that the beta.0 frozen snapshots for buy-products, accept-proposal, and control-media-buy do not include adcp_major_version, and that SDK buyers should target beta.1 or later. No dist/ files change; the immutable-artifact check passes.

  2. Close this PR. Since source schemas and all beta.1+ artifacts already carry adcp_major_version (via fix(media-buy): accept compact version envelope #6647), there is no active interop gap on the forward track. The beta.0 gap is a historical fact of the release, not something the dist tree can be retroactively corrected to address.

Either way, the current approach of editing dist/**/3.2.0-beta.0 cannot merge.


Generated by Claude Code

@bokelley

Copy link
Copy Markdown
Contributor

Closing because the proposed changes rewrite the published 3.2.0-beta.0 release artifact. The forward source and later beta artifacts already contain the field; beta.0 remains immutable. A documentation-only known-limitation follow-up can be opened separately if needed.

@bokelley bokelley closed this Aug 23, 2026
@garvitkaushik-123

Copy link
Copy Markdown
Collaborator Author

Thanks for clarifying, and sorry I missed the immutable-artifact policy. I understand why the PR was closed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants