Skip to content

fix(schemas): one definition per response envelope - #9220

Open
KonstantinMirin wants to merge 117 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/one-definition-per-envelope
Open

KonstantinMirin wants to merge 117 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/one-definition-per-envelope

Conversation

@KonstantinMirin

@KonstantinMirin KonstantinMirin commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #9202.

Revised 2026-11-25: merged #9202 at 8f3fa349e0, which makes the discovery tool bundler inline definitions used once and lowers the compact discovery tools/list bound to 144 KiB; this head measures 142,995 bytes (merge 6d927003e8).

This PR gives each response envelope one definition. Documents that restated the failed response or the submitted, working, or input-required body now compose it through allOf and keep only their own title, description, guard, and added fields. It closes #8470, #8516, and #8720, and lands the 3.3 parts of #8969, #8885, and #9051.

Commits

Each tightening comes before the deduplication that relies on it.

  1. Two failed responses list at least one error: create_content_standards and get_creative_features, which Failed-response envelope {context, errors, ext} has 12 spellings across 26 documents; 5 omit errors.minItems #8516 missed.
  2. The failed response. 28 failed bodies compose core/task-error-response.json, so it now covers 33 sites. That includes:
  3. sync_catalogs progress takes the shared current_step bound.
  4. Async bodies with no error list compose the shared bodies. These are four input-required payloads (sync_creatives, sync_catalogs, update_media_buy, get_products, each keeping its reason codes) and three submitted bodies (get_creative_features twice, preview_creative).
  5. The submitted and working bodies. core/media-buy-submitted.json and the sync_audiences branch, the last site The submitted-task envelope is named in core/compact-task-submitted.json and still restated inline at 9 nodes #8470 lists, compose core/task-submitted-response.json. The get_products and get_signals submitted documents compose core/compact-task-submitted.json. The sync_creatives and sync_catalogs working payloads compose core/compact-task-working.json.
  6. success is deprecated where the envelope status reports the outcome (3.2: four different properties carry a response's outcome, and two documents carry two of them at once #8969): on update_content_standards and provide_performance_feedback, with x-removed-in: 4.0.0 and a 4.0 compatibility registry entry. Senders keep sending it through 3.x.
  7. Request-signing error codes state their header (4.0: one UPPER_SNAKE_CASE vocabulary for error, reason and outcome codes, defined per protocol and checked by the build #8885, item 5): enumMetadata[code].http_header on all 29 codes, and a list generated from the enum in the compliance catalog.
  8. The create_content_standards success branch states its title once. fix(schemas): one definition per object field, and a blocking near-duplicate gate #9202 left a second, identical title key on it.
  9. Failed branches state required: ["errors"] beside their allOf. The composed body already requires errors, but released @adcp/sdk versions find the failed branch by reading required on the branch itself (server/error-arm-tools.js), without following allOf or $ref. Without it, the SDK stops copying adcp_error into errors[], and sellers lose errors[0].field and details. The keyword returns on 24 failed branches and on the two failed documents that branches reference by $ref (core/media-buy-failed-result.json, core/media-buy-issue-task-failure.json). The keyword can go once the SDK reads the whole conjunction (describeErrorArm misses failed branches that compose their body through allOf adcp-client#3807).

The storyboard path lints and three tests read a branch through its composition.

How each change was checked

The #9119 equivalence check (5c7860699a, --manifest auto --corpus --witness) passes for each commit against its parent, and for the whole range from #9202's head.

  • Commits 5 to 9: class 1, so the canonical forms are identical.
  • Commit 2: identical except two masked lines (direction: none):
    • type: object at six brand error branches. Each root composes core/protocol-envelope.json, which admits only objects.
    • ext on the get_reporting_status failed branches, which the root declares the same way.
  • Commits 1, 3, and 4: class 3. The differences equal the manifest, no corpus instance changes verdict, and every tightening has a verified witness. In commit 4, the shared reason bounds (1 to 200 characters) are masked: each task's own reason enum holds only values of 11 to 20 characters.

lint:additive-minor, the near-duplicate gate, and audit:oneof --check pass at every commit, the oneof proof check reports the same four unions as #9202, and no commit loses an annotation.

What changes validation

All four changes tighten the response side. Each is a DR-0036 correction, quoted and permalinked in the commit's manifest.

  • Commit 1. "errors": [] is rejected on the two failed responses. Every 3.2.12 task error branch that bounds errors sets minItems: 1 (CreateMediaBuyError), and error-handling.mdx says the payload errors[] "reports one or more issues". fix(schemas): one definition per object field, and a blocking near-duplicate gate #9202 uses this basis for the content standards errors.
  • Commit 3. A current_step over 500 characters is rejected, the bound 3.2.12 core/compact-task-working.json sets and fix(schemas): one definition per object field, and a blocking near-duplicate gate #9202 applies to sync_creatives.
  • Commit 4. On the seven bodies, an errors value that isn't an array of core/error.json is rejected. 3.2.12 core/compact-task-input-required.json and core/compact-task-submitted.json declare it that way. 3.2.12 core/protocol-envelope.json calls the payload errors[] "the canonical normative shape". This is a concept-level bound, so if you'd rather not take it, drop commit 4. The seven bodies then keep composing only core/task-*.json, and commit 5 still applies.

There are no tightenings without published text.

The DR-0036 register follows the definitions:

Pinned figures move in commit 5: the submitted-body floor (12 to 11) and the MCP parity compile limit (1,490,000; the controller request measures 1,489,519 bytes).

Generated types

I generated both SDKs from the bundle at #9202's head and at this head, as validate-schema-bundle does, skipping the Zod post-processor that already fails at #9202's head.

  • TypeScript: no exported name changes.
  • Python: only three enum collision counters move (Status21, Status32, and Status62 become Status19, Status24, and Status46), because composing documents no longer emit their own Status class. The SDK doesn't export them by name.

A named error list (core/task-errors.json) is not part of this PR: Python wraps it in a RootModel, which would turn 37 errors fields from list[Error] into a wrapper. Its item, core/error.json, already has one definition.

Left for 4.0

Tests

CI-derived stages on the box, against #9202's head:

Closes #8516
Closes #8470
Closes #8720
Refs #8969
Refs #8885
Refs #9051

… from 336 sites

The source tree declared the same five subschemas repeatedly without naming
them: an ISO 4217 currency code at 87 sites, an ISO 3166-1 alpha-2 country
code at 72, an idempotency key at 69, a DNS domain name at 57, and an HTTPS
URL at 51. A reader or code generator can see that the sites share a regex,
but cannot learn what the regex means.

Move each into a titled core/ document, register it in index.json, and
reference it. Each site is edited in place and keeps its own description and
other annotations, so the diff has no whitespace churn.

No document's accepted set changes. tests/named-schema-extraction.test.cjs
resolves every added $ref, overlays the siblings each site keeps, and
compares the result with the base document: 218 touched documents, 336 added
$refs, 0 differing. Run it with npm run test:schema-extraction. The test also
requires that a $ref to a scalar core document keeps only annotations beside
it, because draft-07 ignores $ref siblings.

Sites that share a constraint but mean something else stay inline: the IATA
airport codes in core/flight-item.json and the ten reporting receipt and
status identifiers that share the idempotency key's pattern.

Named definitions enlarge the MCP projection, so its bounds move: total
projection 24 MiB, media-buy model context 486 KiB, parity compile limit
1,380,000 bytes.

Refs: adcontextprotocol#8525
…hem from 672 sites

Finish the extraction adcontextprotocol#8525 asks for. Measure every repeated pattern and
identical scalar subschema, then extract those whose sites provably mean one
concept: 116 new core/ documents and 2 existing ones, across 269 documents.

A concept counts as proven when the sites state identical constraints and
appear in at least two documents, and either share an x-entity value, share a
property name with compatible descriptions, or follow a named standard. The
identifier pattern ^[A-Za-z0-9_.:-]{1,255}$ turns out to be eleven concepts,
such as notification-id, reporting-revision-id, and opportunity-id, plus three
singletons that stay inline.

x-entity moves to the document only when every site that references it states
the same value. Otherwise it stays at each site, so the resolved documents
stay identical. The proof now reports 377 touched documents, 1,008 added
$refs, 0 differing.

Sites that share a constraint but mean something else stay inline, as do sites
that mean the same thing under a different constraint, because tightening them
would change what they accept. The pull request lists them with reasons.

audit-oneof.mjs treated a $ref to a scalar document as an opaque reference, so
a named hex color beside an array read as undiscriminated. It now classifies
the target by its JSON type when the branches' types differ, which also removes
two stale entries from its baseline.

Named definitions enlarge the MCP projection, so its bounds move: media-buy
model context 518 KiB, creative model context 425 KiB, parity compile limit
1,405,000 bytes.

Refs: adcontextprotocol#8525
…sites

Finish the extraction with the enums that repeat across documents: 67 new
enums/ documents and 2 existing ones. A site moves only when it has the same
property name and values as the others, and its descriptions state one
concept. Values alone prove nothing: delivery_period_state and the opportunity
status both list open and closed, so each gets its own document.

Three narrower copies stay inline, and their enums stay unnamed, because naming
them would report the copies as drift: brand.json store lacks fire_tv and
vizio, native_in_feed asset_source lacks publisher_host_recorded, and
list_products incomplete scope lacks proposals. Whether those are intentional
subsets is a separate decision.

The proof now reports 401 touched documents, 1,172 added $refs, 0 differing.

Named definitions enlarge the MCP projection, so its bounds move: media-buy
model context 522 KiB, creative model context 427 KiB, parity compile limit
1,415,000 bytes.

Refs: adcontextprotocol#8525
…opies

The gate in the next commit found inline copies of documents that already
exist, or that the earlier commits added: ten under a different property name,
for example accepted_formats and enums/reporting-file-format.json, and business
calendar days and enums/day-of-week.json, and account_id on the
set_account_timezone controller result. These sites mean the same concept, so
they now reference the document. Each keeps its own annotations.

Bundling the named definitions also moves the compact discovery tools/list
budget from 162 KiB to 166 KiB (169,806 bytes measured).

Refs: adcontextprotocol#8525
…med repeats

Keep the schemas normalized without relying on review. The pass and this gate
land together, so new inline copies cannot start accumulating.

scripts/lint-schema-named-constraints.cjs fails when an inline subschema states
a named schema's constraints, with a message that gives the file, the JSON
pointer, and the $ref to use. It also fails when an unnamed constraint repeats
at 3 or more sites across documents. At 3, the current tree needs 50 recorded
repeats. At 2, it would need 126, of which 76 are pairs.

A pattern, an enum, or a two-sided numeric range is evidence on its own. A
length bound or one-sided numeric bound is shared by free text and dozens of
identifiers, so it counts as a copy only with the named schema's x-entity or a
property name that already references it.

scripts/schema-named-constraints.json holds the exceptions: 55 held-apart sites
and 50 recorded repeats, each with a reason. An entry that stops occurring
fails, and on pull requests a raised threshold or a grown count fails against
the target branch's copy unless it states a growth_reason. New entries are
printed for the reviewer. Single-fault tests cover each of these rules.

npm run schemas:normalize lists the mechanical fixes, and --write applies them
and runs the identical-comparison proof.

The lint runs in npm test and in Build Check, and the playbook tells authors to
look in core/ and enums/ first.

Refs: adcontextprotocol#8525
…ounds walk

Canonical CI stages read the inline form that the normalization commits
replaced.

Restore two tests to test:schemas. The first commit dropped a space between
tests/seller-offers-contract.test.cjs and tests/service-commitments.test.cjs,
so neither ran, and test:schemas still exited 0.

capabilities-structural-bounds.cjs treated a $ref to a scalar document as the
position, so it reported a bound the site declares with x-max-length-4.0 as
missing. It now overlays the annotations the site keeps. The pinned worst-case
figure of 91,816,283 bytes and 107 open positions is unchanged, which shows the
walk sees what it saw before the extraction.

The other tests now read through the reference and keep their assertions:

- lint-version-envelope compares each surface's resolved grammar. The copies it
  guarded against drift now reference one document.
- audience-evidence reads the methodology enum from the referenced document.
- lint-storyboard-sample-request-schema gives Ajv the currency code document.
- media-buy-name-contract compiles the resolved schema with the site's
  annotations, so its length and whitespace checks still run.
- spot-delivery-reporting-contract checks the $ref and the target's x-entity.
- counterparty-asserted-capability-bounds follows an item's $ref, so its domain
  array guard still finds both arrays.
- capabilities-structural-bounds overlays the site when it checks an exemption.

Refs: adcontextprotocol#8525
Four tests moved to asserting a $ref during the extraction and stopped checking
what they checked before: the catalog x-entity values, the country code type
and pattern, the currency type, and the idempotency key minimum length. Each
now also asserts that value on the referenced document.

Refs: adcontextprotocol#8525
…ition

Name the repeats the earlier commits left inline: constraints repeated inside
one document, constraints shared by exactly two documents, numeric ranges,
string bounds on one property name, and enums that list their values in a
different order. A concept in several documents gets a titled schema under
core/ or enums/ (110 new), and one that repeats inside a document gets a
definitions entry there (47 new). 517 sites now reference them.

Sites that reference a named schema whose only difference was annotations
gain those annotations: brand IDs, account status, cost and ROAS strengths,
pricing models, delivery recipient clouds, offer reasons, and placement IDs.

Two enums had drifted and now share one enum with their other sites:
brand.json store accepts fire_tv and vizio, and native_in_feed asset_source
accepts publisher_host_recorded. Both only add accepted values.

Sites that mean something else, or that a reference would loosen or tighten,
stay inline and are listed with their reasons in the next commit.
core/webhook-auth-credential.json becomes core/auth-credential.json, because
governance agent authentication uses the same credential.

Tests that read a constraint from the inline site now read it through the
reference with tests/helpers/named-scalar-schemas.cjs, and keep their
assertions. The platform-agnostic allowlist moves its 12 app store entries to
the 4 values of enums/app-store.json.

The enum-drift lint now skips enums under if and not, the same rule the
named-constraints gate uses: a condition names the values a branch applies
to, so it is narrower on purpose. Naming enums/reporting-schedule-alignment.json
would otherwise report the period_duration conditions in
core/reporting-schedule.json and core/reporting-schedule-offering.json as
drift. The installment publication conditional no longer needs its allowlist
entry.

Named definitions enlarge the MCP projection, so its bounds move: total
25 MiB, media-buy model context 539 KiB, creative model context 437 KiB,
parity compile limit 1,443,000 bytes, compact discovery tools/list 169 KiB.

The training agent embedded source schemas in its MCP tool definitions
without their references, so report_plan_outcome published a dangling
reference once reported-outcome-error.json referenced named schemas.
loadSourceSchema now bundles references with the existing bundleSchema.

Refs: adcontextprotocol#8525
…or across two

Lower the gate from 3 sites across documents to 2 sites anywhere. A repeat
inside one document asks for a definitions entry in it, and a repeat across
documents asks for a schema under core/ or enums/. The lint now also:

- treats a local definition as a named schema for its own document, so an
  inline copy of it fails with the "#/definitions/..." reference to use;
- fills in a type that the constraint implies (an enum whose values all have
  it, or a propertyNames key), so typed and untyped spellings compare equal;
- compares equivalent pattern spellings, such as \d and [0-9], as equal.

scripts/schema-named-constraints.json drops unnamed_repeats. Every exception
is now a held_apart site with what it means that the named schema or the other
sites don't: 192 sites. A repeat fails while 2 or more of its sites are not
listed, and an entry that no longer needs to be there fails. Against the base
branch, a raised threshold fails and an entry added without a reason fails.
The lint also fails when a document that another document composes uses a local
reference that the composing site doesn't restate, because generators flatten
that document and the reference no longer resolves. Main has no such site.

New single-fault tests cover a repeat inside one document, a two-site repeat
across documents, a local definition, implied types, and pattern spellings;
each fails when its rule is removed from the lint.

The proof resolves references to local definitions and accepts a definition
only as the target of an added reference. It compares both sides in a
canonical form that changes nothing a validator accepts, and it names its two
exceptions: annotations adopted from a schema that differed only in
annotations, and the two drifted enums. 494 touched documents, 1,701 added
$refs, 0 differing.

npm run schemas:normalize accepts a local definition with --doc and adopts
annotations with --adopt-annotations.

Refs: adcontextprotocol#8525
The test, new on main, compiles core/error.json on its own, which now
references core/open-error-code.json. It registers the named scalar schemas
first and keeps its assertions.

Refs: adcontextprotocol#8525
… definition

These sites state the same constraint as a named schema or as another site, and
mean something else: an IATA airport code is not a currency code, and a warning
message is not a reporting setup message. They were listed as exceptions. Each
now references a titled document of its own, so the list holds only sites that
mean the same thing as a named schema and state a different constraint.

Nothing accepts anything different. The proof still passes: 519 touched
documents, 1,791 added $refs, 0 differing.

The bulk read page sizes get core/bulk-page-size.json because they default to
1,000 items, which core/page-size.json doesn't allow. enums/optimization-metric.json
keeps the attention metrics that enums/canonical-optimization-metric.json leaves
out on purpose.

manifest.schema.json now references enums/error-recovery.json, so the build
registers the named schemas it references before it validates the manifest.

Refs: adcontextprotocol#8525
28 sites stated a timezone inline: plain non-empty strings, or strings bounded
to 255 characters. Each now references core/iana-timezone.json, so a timezone
validates the same everywhere. These sites get tighter. They now reject a value
longer than 255 characters, a value with characters outside the IANA identifier
pattern, and inventory_local. UTC stays valid.

core/iana-timezone.json no longer states x-added-in, because fields older than
3.2 now reference it and the training agent reads that annotation to decide what
an older caller sees. fixed_timezone loses x-max-length-4.0: 64, which can't sit
below the 255 the schema now enforces.

This changes what schemas accept, so it sits after the refactor commits. The
proof passes at the commit before this one.

Refs: adcontextprotocol#8525
These sites meant the same thing as a named schema and stated a different
constraint. Each now references the schema, so this changes what they accept.
The changeset lists each concept and the direction.

Where the copies disagreed, the stricter rule wins and the named schema takes it:

- core/media-buy-id.json, core/account-id.json, and
  core/creative-evaluation-id.json gain maxLength 255.
- core/account-request-id.json gains the ID pattern.
- core/cancellation-reason.json and core/signal-description.json gain minLength 1.
- core/domain-name.json gains the 253-character limit of RFC 1035.
- enums/mraid-version.json holds 2.0 and 3.0, the values html5 already stated,
  and replaces core/mraid-version.json, so mraid_versions tightens.

Two groups still loosen, because the stricter copy rejects a published value:
whole-number aspect ratios (core/format.json published 1.91:1), and list_products
incomplete scope (get_products and request_proposals publish proposals).

These references change nothing a site accepts:

- core/canonical-format-option.json format_kind references
  core/canonical-format-kind.json. The inline copy existed for an SDK
  post-processor, and the test now requires the reference.
- core/audience-evidence.json and core/canonical-audience-evidence.json
  relationship reference enums/audience-evidence-relationship.json, which now
  states x-added-in 3.2.0, because these fields shipped in 3.2.
- core/reporting-verification-profile-set.json references
  core/reporting-verification-profile.json.
- media-buy/commercial-terms.json cancellation_terms reason references
  core/cancellation-reason.json, and a reporting subscription's account_ids
  reference core/account-id.json.

manifest.schema.json tool_name moves from a local definition to core/tool-name.json.
enums/vast-fullscreen-version.json and core/audience-description.json name values
that shared a constraint with the new definitions.

DR-0036 records the 97 length bounds this adds to released sites as corrections
(e), (f), and (g), with the published text behind each. The additive-minor check
reports 0 new changes.

Refs: adcontextprotocol#8525
…-out

Every site that was listed now references a named schema, so the list is empty.
Delete scripts/schema-named-constraints.json, and with it the shrink-only check
against the base branch and the configurable threshold. A site that means the
same thing references the named schema. A site that means something else gets a
named schema of its own. Tests require that a list passed to the lint changes
nothing and that the file stays gone.

Sites inside if and not stay exempt, because a condition isn't a declaration:
113 such sites in 73 documents state a scalar constraint.

Refs: adcontextprotocol#8525
…site

Every site now references a named definition, so the projection carries more
shared definitions. The media-buy model context bound moves to 549 KiB, creative
to 443 KiB, the parity compile limit to 1,453,000 bytes, and compact discovery
tools/list to 170 KiB. Definition counts in the input-field weight report rise
by 57 instances and 10 unique definitions. The projection stays under its 25 MiB
cap at 25,961,497 bytes. The documented worst-case capabilities document moves
to 91,766,393 bytes, because named schemas now state their limits.

Refs: adcontextprotocol#8525
A list_products response never contains proposals, and 3.2.8 published its
incomplete scope as products, pricing, forecast, and wholesale_feed. Pointing it
at enums/incomplete-scope.json let it accept proposals.

enums/product-incomplete-scope.json now holds the four product scopes, with a
description of each, and list_products references it. enums/incomplete-scope.json
is that set plus proposals, so get_products and request_proposals accept the same
five values as before. The changeset no longer lists list_products as looser.

The vocabulary test accepts a branch that references another enums document or
states a const, because both are finite. The comply test controller grows to
1,453,708 bytes, so the parity compile limit moves to 1,454,000. The
additive-minor check reports 0 new changes against 3.2.8.

Refs: adcontextprotocol#8525
13 more sites stated an IANA timezone inline: budget_cap_timezone on the media
buy, the planned delivery, the create, get and update media-buy responses, and
the control and update requests; the reporting timezone in
reporting_capabilities, its canonical form, get_account_financials and
get_creative_delivery; the date timezone in a catalog field mapping; and the
supported_timezones items. Each now references core/iana-timezone.json. The two
nullable request sites use anyOf with null, so null still restores the default.

These sites get tighter. They reject a value longer than 255 characters, a value
outside the IANA identifier pattern, and inventory_local. The 10 plain strings
also reject an empty string. supported_timezones items lose
x-max-length-4.0: 64, which can't sit below the 255 the schema enforces.

DR-0036 correction (f) and scripts/lint-additive-minor-corrections.json record
the 21 new length bounds, each from 3.2.8 core/iana-timezone.json, so the
additive-minor check reports 0 new changes against 3.2.8.

enums/audience-evidence-relationship.json drops x-added-in, like
core/iana-timezone.json, because 3.2 fields reference it.

The documented worst-case capabilities document moves from 91,766,393 to
91,765,369 bytes, because a supported timezone is now a patterned string. The
MCP projection bounds hold.

The changesets list the new sites and the wholesale signal description limit,
and no longer name the deleted exception list.

Refs: adcontextprotocol#8525
…he maximum

Correction (f) now records minLength 1 at the sites that were bare strings,
so its title says a timezone identifier is 1 to 255 characters.

Refs: adcontextprotocol#8525
…fiers

core/iana-timezone.json gains x-max-length-4.0: 64, so every timezone site
plans that limit for 4.0. The longest IANA timezone identifier is 32
characters (America/Argentina/ComodRivadavia), and 64 matches the 4.0 limit
core/brand-id.json plans. 3.2.8 published maxLength 255, and a minor release
can't tighten it, so 3.x keeps 255.

The structural-bounds test lets a 4.0 annotation sit below the keyword that
enforces the limit today, because a 4.0 limit plans a tightening. It still
rejects an annotation above the keyword, which would plan a loosening, and
an annotation that isn't a positive integer.

In 4.0 mode, scripts/capabilities-structural-bounds.cjs takes the lower of
the keyword and the annotation for maxItems, maxLength and maxProperties.
Enforced mode is unchanged. The documented worst-case capabilities document
moves from 91,765,369 to 91,551,067 bytes: the 1,122 timezone strings it can
hold each drop from 257 to 66 bytes. The MCP projection bounds hold.

Refs: adcontextprotocol#8525
…e register

DR-0036 states the rule and its departures: a closed schema stays closed
for the major, a minor changes a schema only by addition, and the only
departures are corrections and named exceptions. A correction either
opens a schema that the published text keeps open or applies a bound or
required name that the published text already sets. The record no longer
lists corrections location by location.

scripts/lint-additive-minor-corrections.json is the register. The
additive-minor check no longer parses correction tables from the
decision record; it still requires the register to name an existing
decision record, verifies each quoted source, and accepts exactly the
listed changes. Each reason names its kind of correction in place of a
correction letter.

DR-0019's amendment note, the 3.3 release docs, the migration guides and
the versioning page describe corrections by kind.
…eated-shapes-8525

DR-0036 now states only the decision, and the corrections register is the
only list of corrections. This branch takes that DR-0036 as it stands and
makes no edit to it. Its 118 register entries stay, with reasons that begin
with the kind of correction: "Applies the bound the published text sets."
…ections for 3.3

The 3.2 to 3.3 migration guide listed the 3.3 corrections by kind but not
the three bound corrections in this branch's register entries. It now says
that a domain name is at most 253 characters, that a timezone identifier is
1 to 255 characters, and that each concept bounded at some sites carries
that bound at every site, and names those concepts. These ship in 3.3 only,
not in a 3.2.x patch.

The versioning page, the release notes, What's new, and the 3.3 beta
program page note the same corrections.
core/iana-timezone.json drops its character pattern and its
not: {const: inventory_local}. A timezone is a string of 1 to 255
characters that must resolve in the implementation's IANA Time Zone
Database, and no value either rule rejected resolves there. Removing both
only widens the schema 3.2.8 published. The daypart timezone stays the
only site that accepts inventory_local, as a const branch beside the IANA
identifier.

The 3.2 to 3.3 migration guide now lists five corrections. Two apply a
rule that 3.2.8 already published for the concept: governance_context is
printable ASCII on every request, as 3.2.8's protocol envelope published
it, and an MRAID version is 2.0 or 3.0 at every site, as 3.2.8's html5
format published it, so capabilities mraid_versions no longer accepts
other versions. They ship in 3.3 only. The versioning page, the release
notes, and What's new say the same, and the changeset describes both as
corrections under DR-0036.

Two tests that relied on the pattern or on the exclusion now reject an
empty or 256-character timezone. Without the pattern a timezone is free
text in the capabilities worst case, so the documented figure moves to
91,766,491 bytes.
Brings the branch up to date with main at 867fdce (3.3.0-beta.5,
match keys, the dependency bumps, and the compliance fixes since
a00249e). Five files conflicted. Every other file merged cleanly.

Resolution ledger

Mechanical (resolved by measuring the merged tree, not by choosing a
side):
- tests/capabilities-structural-bounds.test.cjs and
  docs/building/by-layer/L1/security.mdx: the documented worst case is
  the figure scripts/capabilities-structural-bounds.cjs computes in 4.0
  mode on the merged tree: 99,051,189 bytes (about 94 MiB), with 108
  open positions. That is main's 99,100,981 plus this branch's
  -49,792, which adds up exactly. The block sizes and the open-position
  count in security.mdx keep main's text, which the merged
  measurement confirms (media_buy 34 MiB, creative 27 MiB, 108 open).
- tests/mcp-schema-projection.test.cjs: PARITY_COMPILE_LIMIT is set
  from the merged measurement. The compliance test controller request
  measures 1,461,855 bytes with match keys on top of the named schemas,
  so the bound is 1,462,000. The comment keeps both histories: main's
  match-keys step and this branch's naming steps. The other bounds hold
  on the merged tree without a change: total projection 26,016,883
  bytes under 25 MiB, media-buy model context 560,534 bytes under
  549 KiB, creative 452,770 bytes under 443 KiB.

Semantic (both sides kept):
- package.json: main's version (3.3.0-beta.5), dependency bumps and
  test:auction-only-compliance list, and its new tests/match-keys
  entry in test:schemas. This branch's schemas:normalize,
  test:schema-named-constraints, test:schema-extraction, and its
  tests/named-schema-extraction entry in test:schemas. The merged
  test:schemas list is main's list plus that one file.
  package-lock.json is main's, unchanged; npm ci installs from it.
- docs/reference/3-3-beta.mdx: the DR-0036 row takes this branch's
  wording of what a minor may change and its corrections list with
  adcontextprotocol#8536, and main's status (goes to ratification at the 2026-11-09
  working-group session). Main's new DR-0037 row follows it.

Merged without conflict, checked against the merged tree:
- core/match-key.json, enums/match-key-use.json, the match_keys
  additions to core/product-identity.json, core/product.json,
  protocol/get-adcp-capabilities-response.json and
  trusted-match/provider-registration.json already reference named
  schemas (uid-type, brand-ref, reach-unit, property-type, ext). The
  named-constraints gate reports no inline copy and no repeated
  constraint on the merged tree, so no site needed a reference.
- index.json takes both sides' registry entries.
- The migration guide, release notes and What's new keep main's beta.4
  and beta.5 sections and this branch's DR-0036 corrections text.

Checks on the merged tree, against main and the pre-merge branch:
build:schemas, typecheck, test:schemas (1,172 passed; main 1,168, the
branch 1,165; 1 skipped, the on-demand extraction proof),
test:additive-minor (0 new changes against 3.2.8; 89 passed, as on
the branch, where adcontextprotocol#8777 replaced 4 tests that read correction tables
from DR-0036 with 1), test:composed, test:json-schema,
test:schema-named-constraints (35), test:mcp-schema-projection (42),
the structural-bounds test (26), test:oneof-discriminators,
test:platform-agnostic, test:unit (1,282 vitest tests), and
tests/match-keys (7).
Resolution ledger:
- mechanical, main's side (DR-0036 rewrite in adcontextprotocol#8858 supersedes adcontextprotocol#8777):
  .changeset/pre/*, DR-0019, DR-0036, scripts/lint-additive-minor.cjs,
  docs/reference/migration/v4-compatibility.mdx
- mechanical, main's deletions accepted: price-adjustments.json,
  tests/audience-evidence-targets.test.cjs, withdrawn get_products and
  create_media_buy fields
- corrections register: main's header and entries plus this branch's
  bound entries; reopen entries dropped, since opening needs none
- package.json: main's scripts plus this branch's scripts and test hooks
- semantic, union: schema files keep this branch's $refs with main's new
  descriptions, open additionalProperties and new fields; main's 17
  loosened URL sites reference core/https-url.json, so the unused
  canonical-https-url, public-https-url and price-adjustment-name schemas
  go
- enums/audience-evidence-relationship.json stays as the shared enum for
  the two stable inline copies main kept
- main's new repeats get shared definitions: creative-review-sla
  durations, installment-change product_id, execution_readiness version,
  enums/membership-action.json, core/country-or-subdivision-code.json
- tests: url-pattern-loosening, deprecated-task-withdrawals and
  service-commitments resolve $refs; lint-additive-minor.test.cjs uses
  main's applyBound fixture
Resolution ledger:
- package.json: main's test:schemas list (adds the two sync_plans tests
  from adcontextprotocol#9007) plus this branch's named-schema-extraction test and its
  three scripts
Brings in the two adcontextprotocol#9180 delta manifests regenerated for the order-independent conjunction merge of the equivalence check. No file of this series changes.
…es responses list an error

The failed bodies of create_content_standards and get_creative_features
were the two task error responses that accepted "errors": []. Each now
sets minItems 1 on errors, as every other task error response does.

This is a correction under DR-0036: every 3.2.12 task error branch that
states the bound sets minItems 1 (CreateMediaBuyError in
media-buy/create-media-buy-response.json), and error-handling.mdx says
the payload errors[] "reports one or more issues".
.schema-deltas/one-definition-envelopes-failed-bounds.yaml lists the
lines. No corpus instance changes verdict.
Failed response bodies that wrote out {errors, context, ext} compose
core/task-error-response.json through allOf instead, and keep their
title, description, guard, and what they add. That covers the 21 error
branches adcontextprotocol#8720 lists, among them build_creative's and sync_catalogs'
(which keeps its catalog error items), the media buy failed result
(status failed), the media buy issue task failure (outcome failed),
update_content_standards (success, conflicting_standards_id),
create_content_standards, get_creative_features, and the two
get_reporting_status failed branches (the unavailable lookup keeps its
one closed error). Per-site errors and context descriptions stay beside
the shared definition.

The equivalence check reports identical canonical forms at every other
site. Two kinds of line are masked (direction none) in
.schema-deltas/one-definition-envelopes-failed.yaml:
- type object at six brand error branches that stated no type: each root
  composes core/protocol-envelope.json, which admits only objects;
- ext on the two get_reporting_status failed branches, which the root
  declares the same way.
No corpus instance changes verdict.

The DR-0036 register drops the two entries the previous commit added for
create_content_standards and get_creative_features: their bound now
comes from core/task-error-response.json, which lint:additive-minor does
not see through the composed document, as for the content standards
error responses.

Tooling that reads a failed branch's own keywords follows the
composition: the storyboard validation and context-output path lints
find the error arm through what it composes (requiresName), and the
extension-field test reads ext through the error variant's allOf.
The sync_catalogs working payload's current_step references
core/task-current-step.json (at most 500 characters), as compact working
payloads and sync_creatives already do.

Correction under DR-0036: 3.2.12 core/compact-task-working.json, the
progress payload of a working task, sets "current_step": { "type":
"string", "maxLength": 500 }. The register records the bound. No corpus
instance changes verdict.
…ction

The schema equivalence check (adcontextprotocol#9119) now treats `items: A` beside
`items: B` in one conjunction as `items: allOf[A, B]`. Three manifests
declared lines for differences that only came from the old handling:

- account-agents alignment: the four masked items and allOf lines for
  the registry event's agents_added and agents_removed are gone. The
  check now shows the restated items equal to the composed ones.
- signals alignment: the two masked items and allOf lines for the
  signal listing's categories are gone, for the same reason.
- content standards alignment: the four lines for the evaluator
  exemplars become one `oneOf` line at core/calibration-exemplar.json#,
  declared `none`. The evaluator's exemplars compose the calibration
  exemplars and keep their own artifact items, so the URL-or-artifact
  union is masked: an artifact fails the URL branch and passes the
  artifact branch. Ajv at 3ca3c4e^ and 3ca3c4e gives the same
  verdicts for a URL-reference exemplar (invalid), an artifact, and an
  artifact with type and value (both valid), and the witness search finds
  no payload in either direction. Two of the old lines declared this as a
  loosening, which no payload showed; the check now reports what the
  change is.

No schema changes and no other manifest changes. Each commit's
differences match its manifest exactly, and no corpus instance changes
verdict.
The schema equivalence check (adcontextprotocol#9119) now verifies a payload a manifest
line records (`witness: {root, instance}`): Ajv at both commits must give
it the line's direction, and reverting the line, or the whole schema at
its site, must give it the base verdict again. A payload in a note does
not count. 19 lines here had only a note.

- 15 lines get a recorded witness, each a full root payload built from
  the value their note gives: the validate-input target, the reporting
  destination and delivery provider domains, the reporting schedule
  durations, the legacy available action's review_sla, the compact
  pricing option's four cpa and revenue_share rules, the reporting
  subscription ID ".", and the three bounds with no published text.
- 3 lines become `none`: the get_products suggestions minItems and the
  catalog error's recovery enum, whose notes already said no payload
  changes verdict because of them, and the delivery provider domain's
  label pattern, which stays in effect as its own conjunct beside the
  dotted rule (its note now says so).
- 1 line, list_creatives' capability guard, names the allOf member that
  writes its `not` (allOf/3, not allOf/0); with that, the search finds
  its witness.

No schema changes. Each commit's differences match its manifest, no
corpus instance changes verdict, and every line passes the witness check.
…odies

Seven async bodies declared no errors and restated the rest of a shared
body. They now compose it and keep their own fields:
- the sync_creatives, sync_catalogs, update_media_buy, and get_products
  input-required payloads compose core/compact-task-input-required.json
  and keep their reason codes (and get_products its partial results and
  suggestions);
- the get_creative_features submitted document composes
  core/compact-task-submitted.json, and the get_creative_features and
  preview_creative submitted branches compose
  core/task-submitted-response.json, keeping evaluation_id and
  response_type.

Validation change, a correction under DR-0036 argued per line in
.schema-deltas/one-definition-envelopes-async-errors.yaml: an errors
value that is not an array of core/error.json is rejected on these
bodies. 3.2.12 core/compact-task-input-required.json and
core/compact-task-submitted.json declare errors that way, and 3.2.12
core/protocol-envelope.json calls the payload errors[] "the canonical
normative shape".

The compact input-required reason bounds (1 to 200 characters) are
masked at the four input-required payloads by each task's own reason
enum; the manifest records them as direction none. No corpus instance
changes verdict.

tests/preview-creative-async-opt-in.test.cjs and
tests/get-creative-features-idempotency.test.cjs check that the
preview_creative submitted arm and the get_creative_features submitted
document compose the shared submitted body, which composes
core/task-submitted.json.
- core/media-buy-submitted.json and the sync_audiences submitted branch
  compose core/task-submitted-response.json. The media buy body keeps
  its status tag, its context description, and expected_confirmation_at;
  the sync_audiences branch keeps its guard.
- The get_products and get_signals submitted documents compose
  core/compact-task-submitted.json and keep estimated_completion and
  their guards.
- The sync_creatives and sync_catalogs working payloads compose
  core/compact-task-working.json and keep their counters.

Site descriptions that say more than the shared definition stay at the
site: get_signals' advisory errors and sync_catalogs' current step.

No payload changes verdict: the equivalence check reports identical
canonical forms.

The DR-0036 register drops its entry for the sync_creatives progress
current_step: the bound now comes from core/compact-task-working.json,
which lint:additive-minor does not see through the composed document.

Pinned figures, measured at this commit after npm run build:schemas:
- tests/response-envelope-composition.test.cjs: the floor of submitted
  bodies and branches moves from 12 to 11, because the sync_audiences
  submitted branch now only references core/task-submitted-response.json,
  which the test checks once;
- tests/mcp-schema-projection.test.cjs: the comply_test_controller
  request projection measures 1,489,519 bytes (1,488,814 after the failed
  response commit), so the parity compile limit moves from 1,489,000 to
  1,490,000.
On update_content_standards and provide_performance_feedback, success
repeats the envelope status, which the envelope describes as the single
authoritative AdCP response state. It gains deprecated: true,
x-deprecated-in 3.3.0, and x-removed-in 4.0.0. Senders keep sending it
through 3.x. Annotations only: no payload changes verdict.

The 4.0 compatibility registry lists the three sites under
schema_removals_not_checked (adcontextprotocol#8969): senders keep the flag through 3.x,
so a 3.x run cannot grade its use.

comply_test_controller keeps its success flag unannotated: it reports
the scenario's outcome, and no published text relates it to status.
…ies them

Each request-signing error code's enumMetadata names the header that
carries it: WWW-Authenticate, scheme Signature, parameter error, as the
enum's description and security.mdx state. The compliance snippet
generator lists every code with that header, its recovery, and its
suggested action in the compliance catalog, next to the task error
codes, and checks that every code has the metadata;
tests/generate-compliance-snippets.node.mjs covers the new renderer.

Annotations and generated docs only: no payload changes verdict.
adcontextprotocol#9202's final head regenerates three delta manifests for the items
conjunction and records its hand-checked witnesses. Both commits change
.schema-deltas only, so no schema in this series changes.
…e once

The success branch carried "title" twice with the same value. JSON parsers keep the last key, so the accepted payloads are unchanged.
Each failed branch composes core/task-error-response.json through allOf,
which already requires errors. Released @adcp/sdk versions find the failed
branch by reading required directly on the oneOf branch in the bundled
schema, without following allOf (server/error-arm-tools.js). Without the
keyword on the branch, the SDK stops copying adcp_error into errors[], and
sellers lose errors[0].field and details.

24 failed branches state required: ["errors"] again, and so do the two
failed documents that response branches reference by $ref
(core/media-buy-failed-result.json, core/media-buy-issue-task-failure.json).
The accepted payloads are unchanged. The keyword can go once the SDK reads
the whole conjunction (adcontextprotocol/adcp-client#3807).
@mintlify

mintlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 5918884.

Approve preview

@aao-secretariat

Copy link
Copy Markdown
Contributor

Ladon cannot review this PR until merge conflicts are resolved.

…chemas

Each discovery tool schema in tools/list stands alone, so the bundler puts
every referenced document in $defs and points at it with a $ref, even when
only one site uses it. Such a definition adds its key and a pointer and
saves nothing, so naming a repeated constraint grew tools/list even where
it removed a duplicate.

The bundler now inlines each $defs entry that exactly one bare $ref names.
Shared definitions stay in $defs, as do entries that a pointer reaches
into or that only their own body names. Definitions carry no $id, and
draft-07 treats a bare $ref as its target, so validation is unchanged:
fully dereferenced, all seven product discovery tool schemas are identical
to the parent's.

The four budgeted tools measure 146,682 bytes / 143.24 KiB, down from
169,524 bytes / 165.55 KiB; the bound drops from 170 to 144 KiB.
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 25, 2026
…ross-document-fragment-refs

Stacks this branch on adcontextprotocol#9220, so adcontextprotocol#9180, adcontextprotocol#9202, adcontextprotocol#9220, and this branch form
one line. The equivalence check of the result against adcontextprotocol#9220's head finds
1,882 roots, none different: proof class 1.

Resolution ledger:
- mechanical: static/schemas/source/index.json -> three-way JSON union;
  every registry entry from both sides, no value conflicts.
- mechanical: package.json -> both sides' test:schemas lists
  (lint-schema-cross-document-refs and lint-schema-near-duplicates).
- semantic: core/canonical-forecast-point.json -> union: budget references
  core/budget-amount.json (this branch), product_id references
  core/product-id.json (adcontextprotocol#9202).
- semantic: core/reporting-schedule.json -> union: period_duration
  references core/reporting-period-duration.json (adcontextprotocol#9202), alignment
  references core/reporting-schedule-alignment.json (this branch).
- semantic: core/targeting.json -> this branch's whole-document refs. The
  two field documents, core/targeting-browser.json and
  core/targeting-browser-exclude.json, now compose adcontextprotocol#9202's
  core/browser-families.json instead of restating its body, so the
  concept keeps one definition and the documents keep their titles.
- semantic: core/product-offer-filters.json -> this branch:
  core/targeting-geo-proximity.json holds the same array of
  core/geo-proximity.json that adcontextprotocol#9202 inlined.
- semantic: core/reporting-delivery-offering.json -> this branch:
  core/reporting-cloud.json composes the same enum and keeps the
  ReportingCloud name, as reporting-dataset-share-destination.json does.
- semantic: core/wholesale-feed-event.json -> adcontextprotocol#9202's description for
  collection_card.removed publisher_domain; both sides replaced the same
  fragment ref with core/domain-name.json.
- semantic: core/vast-versions.json (added on both sides) -> this branch's
  "Vast Versions" title, which keeps the generated VastVersions name.
- formatting only: core/vast-tracker-constraints.json and
  protocol/get-principal-response.json -> this branch.
- measured: tests/mcp-schema-analysis.test.cjs and
  tests/mcp-schema-projection.test.cjs keep both sides' history and pin
  the merged figures: 1,577 definition instances, 423 unique, 284
  repeated (each side's additions sum exactly); creative model-context
  inputs 472,637 bytes, bound 462 KiB; media-buy 596,494 bytes, within
  584 KiB. The discovery tools/list schemas measure 143,454 bytes.
…erenced schema

The single-use inlining is correct only if each tools/list schema, with
every local $ref expanded, is the same as the bundle that keeps every
definition in $defs. That was checked by hand. loadProductDiscoveryInputSchema
takes inlineSingleUse: false to return the shared form, and the parity test
compares the two, dereferenced, for all seven product discovery request
schemas, and checks that inlining makes each one smaller.

The test fails if the inliner drops a definition body (checked by making it
return {} for core/idempotency-key).

This branch has not been deployed

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

Labels

None yet

Projects

None yet

1 participant