Skip to content

fix(schemas): constrain asset requirements, mcp_resource_uri, and registry documents - #9174

Open
KonstantinMirin wants to merge 8 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/asset-requirements-uri-registries
Open

KonstantinMirin wants to merge 8 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/asset-requirements-uri-registries

Conversation

@KonstantinMirin

@KonstantinMirin KonstantinMirin commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Revised 2026-11-22: merged with main at 14651cc07c (#9170); the proof compares against it, and the manifests still match exactly.

Revised 2026-11-23: The Python SDK job passes again, so its CI note is gone.

This PR makes three groups of schemas accept only what their own descriptions already say. I split it from #9124 at @bokelley's request, so each part gets its own ruling. #9124 keeps the either/or union guards for 4.0.

Each change is a tightening that no schema example, docs payload, storyboard sample, or example file in the repo depends on. The delta manifests under .schema-deltas/ list every difference with a witness payload.

Closes #8476
Closes #9104
Refs #8924

asset_requirements follows its asset_type (#8476)

core/requirements/offering-asset-constraint.json referenced asset-requirements.json, a 12-branch anyOf in which every branch accepts {}, so asset_requirements accepted any object. That document's description already says "The applicable schema is determined by the sibling asset_type field." The parent now carries one if/then rule per asset type that has a requirements schema, the same pairing core/format.json uses. The union stays referenced, so zip, brief, video_brief, catalog, and published_post keep it, and no URL changes. The offering_asset_constraints examples in docs/creative/catalogs.mdx stay valid.

mcp_resource_uri states format: uri (#8924)

The value is a URI such as ui://si/session-abc123. format: uri accepts any scheme, which core/app-item.json deep_link_url already relies on for custom app schemes. The description now says the value is not limited to http or https. deep_link in si-ui-element.json stays a plain string: the SI chat protocol's own app handoff example (docs/sponsored-intelligence/si-chat-protocol.mdx) sends "deep_link": "flights/boston", a path with no scheme, which format: uri refuses.

Registry documents describe their own data (#9104)

core/asset-group-vocabulary.json, core/format-shape-vocabulary.json, creative/asset-types/index.json, and extensions/index.json declared $schema and no keyword, so each admitted every JSON value. Following registries/v1-canonical-mapping.json, each document now states type: object and the schema of its entries, and validates against itself. The build copies these keywords from the extensions placeholder into the generated extensions/index.json. The roots require no property yet, because a new required name is not additive in a minor release (lint:additive-minor). tests/registry-documents-self-schema.test.cjs checks that each registry, including the generated one, validates against itself and refuses non-objects.

Proof

The schema equivalence check (proposed in #9119) compares every published root at main 14651cc07c and at the head:

Roots compared: 1113; roots that differ: 8; proof class: 3 (differences remain)
Differences: 68 entries at 27 sites
Manifest .schema-deltas/asset-requirements-by-asset-type.yaml, .schema-deltas/mcp-resource-uri-format.yaml, .schema-deltas/registry-document-schemas.yaml: matches the differences exactly
Corpus: 2/2669 bound instances checked, 50629 probe values against 3 changed sites
  Verdict changes: none
Witnesses: 27/27 manifest entries pass the witness check (an attributed witness per declared direction, none for "none")
Result: PASS

No unbound probe value hits a changed site.

verify-build finds no semantic difference between the source and the built tree. The check treats every index.json as a registry, so the self-schema test covers creative/asset-types/index.json and extensions/index.json. No message schema $refs any of the four registry documents.

The manifests and witnesses are the same as in #9124, minus its union lines.

Merge order

…quirements

offering-asset-constraint.json referenced asset-requirements.json, a
12-branch anyOf in which every branch accepts {}, so asset_requirements
accepted any object whatever its asset_type said. The union's own
description says the applicable schema is determined by the sibling
asset_type field.

Add one if/then rule per asset type that has a requirements schema,
following the pairing core/format.json already uses. The union stays
referenced, so the five asset types without a requirements schema keep
it and no URL changes.

Refs adcontextprotocol#8476
The field carries an MCP resource URI such as ui://si/session-abc123.
format: uri accepts any scheme, as core/app-item.json deep_link_url
already relies on for custom app schemes, and refuses values with no
scheme. The description now says the value is not limited to http(s).

deep_link in si-ui-element.json stays a plain string: the SI chat
protocol's own app handoff example uses "flights/boston", a path with
no scheme, which format: uri would refuse.

Refs adcontextprotocol#8924
core/asset-group-vocabulary.json, core/format-shape-vocabulary.json,
creative/asset-types/index.json, and extensions/index.json declare
$schema but state no keyword, so each is the empty schema and admits
every JSON value.

Follow registries/v1-canonical-mapping.json, a registry that states
type and properties for its own data: each document now states
type: object and the shape of its entries, and validates against
itself. The build copies the schema keywords from the extensions
placeholder into the generated registry. No URL changes.

The roots require no property yet, because a new required name is not
additive in a minor release.

Closes adcontextprotocol#9104
The equivalence check merges a schema split across allOf members, so it
reports the first asset_type rule in offering-asset-constraint.json as
if and then keywords at allOf/0 rather than as an added allOf member.
Rewrite those manifest lines to match.

Refs adcontextprotocol#8476
…heck reports it

The equivalence check now folds an integer's exclusiveMinimum: 0 into
minimum: 1, so the image rule's then line in
asset-requirements-by-asset-type.yaml no longer matched the reported
difference. Both forms accept the same integers. With this line the
manifest matches all 76 entries at 33 sites, and 33 of 33 witnesses
pass.
…holder

The build now reads the schema keywords of the generated
extensions/index.json from the source placeholder, so a source tree
without that file fails with ENOENT before it reaches the bundling
step the test checks. Every real source tree has the placeholder; the
fixture gets an empty one.

Refs adcontextprotocol#9104
@mintlify

mintlify Bot commented Nov 22, 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 1174d3a.

Approve preview

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated path change requires human/CODEOWNERS approval.

This PR modifies protocol source under static/schemas/source/**, which is under a hard, deterministic approval gate (gated_paths: true), and review_decision is REVIEW_REQUIRED (not APPROVED). Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval lands.

No blocking findings exist. The reviewer found the change to be a clean schema-tightening across three witnessed changesets (#8476, #8924, #9104), all patch with matching .schema-deltas/*.yaml Ajv witnesses (direction: tighten), schema↔docs coherent, correct changeset classification, and no oneOf discriminator regression. On the merits this would otherwise approve — the gate is procedural, not quality-driven.

Escalation reasons

  • Modifies gated protocol-source files under static/schemas/source/** (asset-group-vocabulary.json, format-shape-vocabulary.json, requirements/asset-requirements.json, requirements/offering-asset-constraint.json, creative/asset-types/index.json, extensions/index.json, sponsored-intelligence/si-send-message-response.json) while review_decision is REVIEW_REQUIRED. Human/CODEOWNERS approval required to satisfy the hard approval gate.

Why human review

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED — human/CODEOWNERS approval required before merge (decision rule row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/asset-group-vocabulary.json (modified) matches static/schemas/source/**; static/schemas/source/core/format-shape-vocabulary.json (modified) matches static/schemas/source/**; static/schemas/source/core/requirements/asset-requirements.json (modified) matches static/schemas/source/**; static/schemas/source/core/requirements/offering-asset-constraint.json (modified) matches static/schemas/source/**; static/schemas/source/creative/asset-types/index.json (modified) matches static/schemas/source/**; static/schemas/source/extensions/index.json (modified) matches static/schemas/source/**; static/schemas/source/sponsored-intelligence/si-send-message-response.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Nov 22, 2026
@aao-secretariat
aao-secretariat Bot requested a review from bokelley November 22, 2026 16:23
…tries

Brings in 3 commits from main: adcontextprotocol#9170 (not-guards that resolve 11
overlapping oneOf unions, with tests/oneof-overlap-resolution.test.cjs),
adcontextprotocol#9141 (3.3.0-rc.3 version packages) and adcontextprotocol#9176 (rc.3 docs snapshot).

Resolution ledger:
- package.json (conflicted): test:schemas keeps both sides' entries,
  tests/registry-documents-self-schema.test.cjs from this branch and
  tests/oneof-overlap-resolution.test.cjs from main, at main's
  position. Every test file it names exists. The version (3.3.0-rc.3)
  is main's.
- package-lock.json: main's (version field only).
- Interaction with adcontextprotocol#9170: this branch changes none of the files adcontextprotocol#9170
  touched, nor the files its guards refer to.
  tests/oneof-overlap-resolution.test.cjs passes on the merged tree
  (38 of 38).

Proof: schema equivalence against 14651cc with --manifest auto
--corpus --witness: 1113 roots, 8 differ, 68 entries at 27 sites, the
same as against 2db59ba; the three manifests match exactly, 27/27
witnesses pass, no corpus verdict changes, no informational entries.
verify-build: PASS.
…tries

Resolution:
- tests/build-schemas-exit-status.test.cjs: main's version, which builds
  its fixture with tests/helpers/build-schemas-fixture.cjs (adcontextprotocol#9167).
- tests/helpers/build-schemas-fixture.cjs: the shared fixture gets this
  branch's extension registry placeholder (d42f0db), because the build
  here reads extensions/index.json from source. The two hoist tests that
  share the helper need it too.

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

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

1 participant