Repository navigation
feat(schema): add experimental product execution requirements - #7774
Conversation
Let a product declare, independent of the caller's account, the resources a package needs before create_media_buy succeeds: an event_source (bound through an event optimization goal), a catalog (bound through packages[].catalogs, including app catalogs for app promotion), or a downstream_connection (reusing downstream-connection-requirement). Unmet event-source or catalog requirements reject with VALIDATION_ERROR and the new execution-requirement-unmet details. First half of #7763; per-account readiness is deferred to 3.3. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval that is not yet present.
This PR adds an experimental Product.execution_requirements surface. The reviewer found the change clean: schema↔docs coherence verified (event_source/catalog/downstream_connection binding paths exist), a correct minor changeset for a non-breaking Normative change, a properly discriminated oneOf, no dist mutation, and comprehensive tests wired into test:schemas. No Critical/High/Medium findings.
However, the PR modifies files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true). The required review status is REVIEW_REQUIRED, not APPROVED. Per decision rule row 2, a gated-paths PR without review_decision: APPROVED must not be approved and must escalate for human/CODEOWNERS review.
Escalation reasons
- Modifies gated protocol source (
static/schemas/source/core/canonical-product.json,core/product.json,core/product-execution-requirement.json,error-details/execution-requirement-unmet.json,index.json,media-buy/product-fields.json) — hard approval gate; requires human/CODEOWNERS approval (review_decisionisREVIEW_REQUIRED).
Once a real approval lands, a clean diff like this can fall through to approve.
>Why human review
- Modifies gated protocol source under static/schemas/source/** (canonical-product.json, product.json, product-execution-requirement.json, execution-requirement-unmet.json, index.json, product-fields.json) — hard approval gate requires human/CODEOWNERS approval; review_decision is REVIEW_REQUIRED, not APPROVED.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-product.json (modified) matches
static/schemas/source/**; static/schemas/source/core/product-execution-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/error-details/execution-requirement-unmet.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/product-fields.json (modified) matchesstatic/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.
…e budget Tighten execution_requirements descriptions and keep one schema example so comply_test_controller's product-bearing request stays under the parity compile limit, and report actual bytes when the limit is exceeded. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol source touched, human/CODEOWNERS approval required.
This PR adds a new product-execution-requirement concept: two new schema files (static/schemas/source/core/product-execution-requirement.json, static/schemas/source/error-details/execution-requirement-unmet.json) plus modifications to canonical-product.json, product.json, index.json, and product-fields.json — all under static/schemas/source/**, a deterministic hard approval gate.
gated_paths: true and review_decision: REVIEW_REQUIRED (not APPROVED). Per decision-table row 2, this cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is. The reviewer's delta pass surfaced no Critical/High/Medium findings (editorial description rewording, whitespace-only allOf reformat, example pruning, test-message byte interpolation — all wire-shape-preserving; discriminator intact, no oneOf regression), and this is a subsequent push on a prior escalate. But the gate is path-based and mechanical, not defeated by a clean diff.
Additionally, this introduces new normative protocol surface (new fields/concepts) which the constitution treats as never-auto-approvable without human ratification.
Escalation reasons
- Modifies/adds gated protocol source under
static/schemas/source/**(product-execution-requirement.json, execution-requirement-unmet.json, canonical-product.json, product.json, index.json, product-fields.json) — hard approval gate; review_decision is REVIEW_REQUIRED, not APPROVED. Human/CODEOWNERS approval required.
Why human review
- Touches gated protocol source under static/schemas/source/** (canonical-product.json, product.json, index.json, product-fields.json modified; product-execution-requirement.json, execution-requirement-unmet.json added) — hard, non-overridable approval gate; review_decision is REVIEW_REQUIRED, not APPROVED. Human/CODEOWNERS approval required before merge.
- New normative protocol surface (product-execution-requirement concept and error-detail) is not auto-approvable without human ratification per the constitution's decision-class hard gate.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-product.json (modified) matches
static/schemas/source/**; static/schemas/source/core/product-execution-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/error-details/execution-requirement-unmet.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/product-fields.json (modified) matchesstatic/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.
- Retitle requirement branches so codegen does not collide with the existing DownstreamConnectionRequirement type. - Define completeness as product requirements plus the selected formats' required_connections; format-conditional connections stay on the format. - Scope the rejection MUST to buyer-supplied packages and new_packages; proposal-derived packages are deferred with per-account readiness. - Forbid connection_id and expires_at on connection requirements and require required_for to include create_media_buy when present. - Evaluate event goals and sources the seller will actually use. - Point field at the offending entry for not_found/ineligible, align issues[] ordering, and list the details schema in transport errors. - Document seller-managed event source IDs, app single-item and app/event source association, attribution-only pixels, retail catalog selectors, error precedence, and the update_media_buy error row. - Assert the specific missing property in negative tests and cover the new connection restrictions; raise the MCP parity compile limit to fit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Expert review (protocol, ad-tech product, DX, code)Four expert agents reviewed the PR in parallel. Every blocking and should-fix finding is addressed in 7f60acc. Blocking — fixed
Should-fix — fixed
Other
|
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol source under hard approval gate, review not yet APPROVED.
This PR adds an experimental Product.execution_requirements refinement across static/schemas/source/** (product.json, canonical-product.json, index.json, product-fields.json modified; product-execution-requirement.json and execution-requirement-unmet.json added) plus corresponding docs and a correct additive changeset. The reviewer's delta pass is clean: connection-variant constraints are well-formed, the oneOf stays discriminated by kind, schema↔docs↔changeset agree, and new tests cover every new constraint. No Critical, High, or Medium findings.
However, gated_paths is true (files under static/schemas/source/**) and review_decision is REVIEW_REQUIRED, not APPROVED. Per decision-table row 2 and the repo's decision-class hard gate, new normative protocol surface cannot be auto-approved without human/CODEOWNERS ratification, regardless of how clean the diff is. This mirrors the prior escalate decision; the gate remains unsatisfied.
Escalation reasons
- Gated protocol source under
static/schemas/source/**modified/added;review_decisionisREVIEW_REQUIRED, notAPPROVED— hard, non-overridable approval gate requires human/CODEOWNERS sign-off. - New normative protocol surface (product-execution-requirement concept and execution-requirement-unmet error detail) requires human ratification per the constitution's decision-class hard gate.
Why human review
- Gated paths: static/schemas/source/** files modified/added (product.json, canonical-product.json, index.json, product-fields.json, product-execution-requirement.json, execution-requirement-unmet.json) and review_decision is REVIEW_REQUIRED, not APPROVED — hard approval gate requires human/CODEOWNERS review before merge.
- New normative protocol surface (Product.execution_requirements concept and execution-requirement-unmet error detail) requires human ratification per the constitution's decision-class hard gate.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-product.json (modified) matches
static/schemas/source/**; static/schemas/source/core/product-execution-requirement.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/product.json (modified) matchesstatic/schemas/source/**; static/schemas/source/error-details/execution-requirement-unmet.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/product-fields.json (modified) matchesstatic/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.
|
Thanks for splitting this out. From the implementer side, the static declaration maps cleanly onto a per-product requirements table we already keep, and the event-source binding works as specified. Two points, plus one question: 1. Several connected identities and the "documented default" rule. For publisher identity, the PR says that "with several eligible connected identities, the seller applies its documented default". Combined with "complete when present", a seller that declares the identity requirement can't reject a package because the buyer didn't say which identity to use. For social platforms, a single ad account often has several Pages or profiles (brands, markets), and running ads as the wrong one is a visible brand error, not a detail a default can safely settle. Until the 3.3 buyer-choice work lands, could a seller that has no configured default for the account reject with a correctable error (for example 2. App promotion binding. The PR binds app promotion through Question: platform-side subsets of a catalog. Catalogue-sales products often target a subset the advertiser already defined on the platform (a product set) rather than a whole catalog. |
|
Thanks for the detailed read — these are the right questions to push on before this lands. 1. Multi-identity and the "documented default" The concern is accurate: a seller with no configured default for a specific ad account is stuck, and the safe exit today is to leave That said, I'd lean against patching it in 3.2 with a free-form Worth flagging to @bokelley: should the 3.3 2. App catalog ↔ event_source cross-satisfaction These bindings are intentionally separate: The practical concern — buyers having to name the app twice — is real, and it's a case where 3.3's account-readiness candidates map could help (the seller could pre-validate that the app's event sources are connected without the buyer supplying them explicitly). That feels like the right fix rather than blurring the binding semantics here. Question: platform-side catalog subsets The 3.2 intent is filters ( Generated by Claude Code |
|
Thanks, that reasoning works for me on all three. On point 1, one data point for scoping the 3.3 work: on the social platforms we integrate with, essentially every product runs as a Page or profile, so a publisher-identity connection is required on every package. With "complete when present" plus "apply the documented default", a seller without a per-account default can't declare |
… and cost targets Keep the GA wording over main's rc.53 pin bumps in the docs pages, and keep main's exact rc.53 pins in Addie certification text until @adcp/sdk 14.0.0 publishes. Add #7774 (experimental execution requirements) and #7778 (outcome_target cost_per) to the 3.2.1 release notes and what's new. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
GA wording for release notes, what's new, migration guide, versions, versioning, roadmap, intro, FAQ and long-tail pages; 3-2-beta becomes "AdCP 3.2 prerelease history"; docs.json banner; RELEASING.md and playbook release topology; GA homepage strip (new dismissal cookie); Addie knowledge snapshot and GA curriculum wording migration (613); CODE_VERSION bump; patch changeset. The docs.json default-version flip is left to release-docs.yml at the v3.2.1 tag. Release notes also cover the GA-day fixes: governance storyboards (#7788, #7803), brand-rights interim fix (#7792), strict sf-binary under the 3.2 signing profile (adcp-client#3073), execution requirements (#7774), cost targets (#7778, #7799). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
GA wording for release notes, what's new, migration guide, versions, versioning, roadmap, intro, FAQ and long-tail pages; 3-2-beta becomes "AdCP 3.2 prerelease history"; docs.json banner; RELEASING.md and playbook release topology; GA homepage strip (new dismissal cookie); Addie knowledge snapshot and GA curriculum wording migration (613); CODE_VERSION bump; patch changeset. The docs.json default-version flip is left to release-docs.yml at the v3.2.1 tag. Release notes also cover the GA-day fixes: governance storyboards (#7788, #7803), brand-rights interim fix (#7792), strict sf-binary under the 3.2 signing profile (adcp-client#3073), execution requirements (#7774), cost targets (#7778, #7799). Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
This is Piece 1 of #7763. A product can now say what the buyer has to supply before
create_media_buywill succeed. Today products only say what they support (for example,conversion_trackingmeans "event goals are accepted"), so buys fail at creation when a pixel, catalogue, app or identity is missing.The new field is
Product.execution_requirements[], experimental for 3.2 with feature idmedia_buy.execution_requirements. Each kind binds through a request field that already exists:kindevent_source(optionalevent_types)event_sources[].event_source_idsync_event_sources, or a seller-managed sourcecatalog(catalog_types)packages[].catalogs[]of a listed type. App promotion uses"app";app-itemalready carriesapp_id,bundle_id,apple_idandstore_urlsync_catalogsor an inline catalogdownstream_connectiondownstream-connection-requirement)AUTHORIZATION_REQUIREDRules:
cache_scope, so wholesale catalogues stay publicly cacheable. It carries no account resource IDs or names. For connections, the schema forbidsresource_refand allows nostatusother thanunknown.AUTHORIZATION_REQUIRED. When the field is absent, the product hasn't declared anything.Product: anevent_sourcerequirement requiresconversion_tracking.catalogrequirement requirescatalog_types.VALIDATION_ERROR, witherror.fieldat the binding anderror.detailsper the newerror-details/execution-requirement-unmet.json. Thereasonisnot_bound,not_foundorineligible, and the product's requirement is repeated back. This applies tocreate_media_buypackages,update_media_buynew_packages[], and updates that remove or replace a satisfying binding. Unrelated updates to existing buys are not re-checked.The rules bind only sellers that declare the field, so currently conformant sellers are unaffected.
Deferred to 3.3 (#7763 stays open)
ready/setup_required/selection_required/input_required/unknown) and candidates.lead_formandmessaging_destination.Changes
core/product-execution-requirement.json(a discriminated union onkind) anderror-details/execution-requirement-unmet.json.core/product.jsonandcore/canonical-product.json: the new field plus the coherence rules. Also added tomedia-buy/product-fields.jsonandindex.json.get_products,create_media_buyandmedia-productsreferences;tests/execution-requirements.test.cjs(9 tests), wired intotest:schemas.Review
An ad-tech protocol expert agent reviewed this. It confirmed:
package-request,optimization-goal,catalog-type,event-typeandapp-item;update_media_buy.new_packages[]exists;oneOf+ discriminator matches theoptimization-goal.jsonpattern the SDK code generators already handle.All six of its findings are fixed in this PR:
resource_refloophole;update_media_buy;Test plan
npm run test:schemas, including the new testsnpm run build:compliance -- --checkcheck:registry,lint:schema-links,test:error-handling,test:contractsjson-schema-validationon the changed docschangeset status🤖 Generated with Claude Code