Skip to content

feat(schema): add experimental per-account execution readiness - #7934

Merged
bokelley merged 12 commits into
mainfrom
conductor/33-wg-7763-exec-readiness
Oct 27, 2026
Merged

bokelley merged 12 commits into
mainfrom
conductor/33-wg-7763-exec-readiness

Conversation

@bokelley

@bokelley bokelley commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Piece 2 of #7763: per-account execution readiness for products that declare execution_requirements (#7774). Experimental, additive, feature id media_buy.execution_readiness. A buyer sets include_execution_readiness: true with an account on get_products and gets a response-level execution_readiness map keyed by product_id, so it can tell before create_media_buy whether the account has what each product needs.

This is a draft for the 3.3 working-group decision. The decisions that need a vote are in the brief on #7763.

{
  "cache_scope": "public",
  "wholesale_feed_version": "wf_2026_10_06",
  "execution_readiness": {
    "version": "er_7f3a",
    "products": {
      "social_app_installs": {
        "readiness_status": "setup_required",
        "requirements": [
          { "requirement": { "kind": "event_source", "event_types": ["app_install"] },
            "readiness_status": "selection_required",
            "binding_field": "packages[].optimization_goals[].event_sources[].event_source_id",
            "candidates": [ { "resource_id": "es_app_main" }, { "resource_id": "es_app_beta" } ] },
          { "requirement": { "kind": "downstream_connection", "connection": { "connection_type": "publisher_identity" } },
            "readiness_status": "setup_required",
            "connection_state": { "connection_type": "publisher_identity", "status": "missing", "authorization_url": "https://social.example/connect" } }
        ]
      }
    }
  }
}

What it specifies

  • Statuses (readiness_status, $ref to enums/execution-readiness-status.json), per requirement and rolled up per product: ready, setup_required, selection_required, input_required, unknown. The rollup is the first blocking state any requirement reports (setup_required, input_required, selection_required, unknown), else ready.
  • Could not check is not lacking. unknown carries unknown_reason (permission_denied, platform_unavailable, not_evaluated) and no resources. A seller MUST NOT report setup_required for a resource it could not read; a buyer MUST NOT treat unknown as not runnable.
  • ready does not waive binding. For event_source and catalog the buyer still passes resolved.resource_id in binding_field; feat(schema): add experimental product execution requirements #7774's not_bound rule is unchanged.
  • Candidates are directly usable. resource_id is the sync_event_sources event_source_id or a catalog_id, never a raw platform ID. Account-scoped, only for selection_required, never disclosed across accounts.
  • Connections report one connection_state (the connection the seller would use, its documented default when several are connected). readiness_status derives from connection_state.status (connected / not_required → ready; missing / pending / expired / revoked → setup_required); a missing, expired, or revoked connection SHOULD carry authorization_url.
  • Caching. The map is not part of the cache_scope layer: cache_scope, wholesale_feed_version, and pricing_version are unchanged, and it is omitted on unchanged: true responses. Buyers key it by (account, version); it never goes in wholesale feed webhooks.
  • Opt-in request field, because computing readiness can need platform reads. Sellers read once per account and requirement kind and stamp every product on the page. Products beyond a seller's evaluation budget may be unknown / not_evaluated.
  • Conformance: media_buy_seller/execution_readiness, gated on the experimental feature. It covers a unique candidate, setup required, selection required, and a seller that cannot read the account, and checks that the map is omitted without opt-in and that cache_scope stays public. Sellers register event sources through sync_event_sources; the only reserved fixture is the brand readiness-unreadable.example.

Changes

  • New: enums/execution-readiness-status.json, core/execution-requirement-readiness.json, core/product-execution-readiness.json.
  • media-buy/get-products-request.json (include_execution_readiness), media-buy/get-products-response.json (execution_readiness), index.json. Both new fields are optional and x-status: experimental.
  • Docs: new spec section in media-buy/specification.mdx, get_products request and response reference, experimental registry.
  • tests/execution-readiness.test.cjs (10 tests, wired into test:schemas). PARITY_COMPILE_LIMIT is not touched here. On the head I rebased onto (db452cc6) main's comply-test-controller-request.json parity bundle is already 1,280,033 bytes against the 1,280,000 limit, and the readiness map adds ~11.5 KB (1,291,566 with this PR). Canonical tests (2/4) therefore needs a limit raise that has to land first or alongside the other open PRs that touch the same constant; I have not bumped it per the coordination rule.
  • Changeset (minor).

Alternatives considered and not picked

  1. Map only in account-scoped responses. Simpler: no new version token and no extra cache rule. But any request with readiness would have to be cache_scope: "account", so the whole wholesale catalogue is keyed per account and buyers lose public dedupe. Not picked because it defeats the "public catalogue stays cacheable" acceptance criterion.
  2. Readiness embedded in the Product object (the measurement_readiness precedent). Same cache problem as 1, and it would put account state in the product feed that webhooks and public caches carry.
  3. Typed lead_form_id / messaging_destination_id package fields, or a generic resource_bindings[{kind, resource_id}] list. The generic list was rejected in the RFC: per-account execution readiness for products (required resources, candidates, and binding) #7763 decision (harder for buyer agents to discover and validate). Typed fields are not added in this slice: Meta and TikTok attach lead forms at the ad or creative level, so placement on the creative is checked first. The vocabulary stays at the three kinds feat(schema): add experimental product execution requirements #7774 declares.
  4. Listing several identities as candidates[] and a buyer-supplied identity binding. Needs a binding field that RFC: advertiser identity model (brand claims, account connections, buy binding) #7782 has not placed yet (package, media buy, or creative). This slice reports one connection_state and keeps the seller's documented default, and candidates[] can be added to connection requirements later without breaking this shape. If candidates ship, only connected identities are listed; a non-connected identity surfaces through connection_state and authorization_url.
  5. A separate bindable status for event sources and catalogs that have a resolvable resource (suggested in review so ready can't be read as "skip binding"). Not picked because the five-value vocabulary was set in the RFC: per-account execution readiness for products (required resources, candidates, and binding) #7763 proposal; the schema and spec say ready does not waive binding, and resolved is required for ready on those kinds.
  6. A positional requirement_index instead of echoing the requirement. The map is versioned separately from the product feed, so an index can go stale silently. An echoed entry that must deep-equal a declared one makes staleness detectable.
  7. Four reserved fixture accounts for conformance. Too heavy for sellers to provision. The scenario provisions accounts and event sources through the protocol and reserves only the unreadable brand.
  8. Map on unchanged: true responses. That was the point of versioning separately, but an unchanged response carries no products, so the map has nothing to cover and conditional fetch of readiness would need its own design. Omitted there; deferred.
  9. A seller_default reason for a resolved event source or catalog. Several suitable resources mean selection_required; an unbound requirement is not_bound. A default only exists for connections, where it is connection_state.
  10. New comply_test_controller scenario to force the unreadable state. Avoided to keep the controller surface unchanged in 3.3.

Not in this PR

  • lead_form and messaging_destination requirements and bindings.
  • Listing several identities, buyer choice among them, and the identity binding field (RFC: advertiser identity model (brand claims, account connections, buy binding) #7782).
  • Proposal-buy bindings (packages from proposal_id stay outside the execution_requirements rejection rule).
  • Conditional fetch of the map (if_execution_readiness_version), readiness on unchanged responses, and readiness change notifications.
  • list_products, which also takes account: readiness is added to get_products only in 3.3.

Test plan

  • npm run test:schemas (includes the new tests)
  • npm run test:mcp-schema-projection
  • npm run build:compliance -- --check, plus the storyboard lint suites
  • check:registry, lint:schema-links, test:docs-nav
  • json-schema-validation on the changed docs
  • Prettier on the new files; changeset scope check and changeset status
  • CI. The local pre-commit hook (full server unit suite) is skipped locally; CI runs the same gates.

🤖 Generated with Claude Code


Open workspace in Conductor

Piece 2 of #7763. Optional include_execution_readiness on get_products and a
response-level execution_readiness map keyed by product_id, versioned apart from
wholesale_feed_version so public catalogs keep cache_scope public. Reports
ready/setup_required/selection_required/input_required/unknown per declared
execution requirement and rolled up per product, with account-scoped candidates
whose resource_id is directly usable in the existing binding field. Adds the
media_buy_seller/execution_readiness conformance scenario.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
bokelley and others added 4 commits October 6, 2026 09:49
…tate

Merge origin/main; rename the nested status fields to readiness_status, state
which connection_state members are meaningful, mark the new schemas
experimental with x-added-in 3.3.0, and require the controller for the
execution readiness scenario.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@bokelley bokelley added the needs-wg-review Blocked on a working-group decision — surface in WG meeting agendas label Oct 9, 2026 — with conductor.build App
@bokelley
bokelley marked this pull request as ready for review October 21, 2026 11:21

Copy link
Copy Markdown
Contributor Author

Deferred to beta.1: parity budget. After merging current main, compliance/comply-test-controller-request.json measures 1,302,030 bytes against PARITY_COMPILE_LIMIT 1,300,000 (main: 1,290,497; this PR +11,533), so tests/mcp-schema-projection.test.cjs fails. The limit is not being bumped for the beta.0 cut. To land in beta.1, trim the compiled size or raise the limit with a measured justification.

@aao-secretariat

Copy link
Copy Markdown
Contributor

Ladon cannot review this PR until merge conflicts are resolved.

Copy link
Copy Markdown
Contributor Author

Parity budget (beta.1 train): stopped. Merged current main into this branch (conflicts in experimental-status.mdx and the package.json test:schemas list; tests/execution-readiness.test.cjs kept). With PARITY_COMPILE_LIMIT = 1,315,000, compliance/comply-test-controller-request.json measures 1,324,773 bytes on this PR against 1,313,240 on main (+11,533; 1,760 bytes of headroom), so tests/mcp-schema-projection.test.cjs fails. The limit is not being raised; not merging.

Comment thread docs/reference/experimental-status.mdx Resolved

@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 paths touched without required approval.

This PR modifies the published protocol surface under static/schemas/source/** (three new schemas, an enum, plus modifications to index.json, get-products-request.json, get-products-response.json). That makes gated_paths true, and review_decision is REVIEW_REQUIRED (not APPROVED). Per decision rule row 2, the hard approval gate is not satisfied, so the outcome must be escalate pending human/CODEOWNERS review of the gated schema files.

The change itself looks clean and non-blocking: additive, experimental, non-breaking surface (optional include_execution_readiness request flag, response-level execution_readiness map), correctly carried by a minor changeset, no undiscriminated oneOf, no released-artifact mutation, and schema↔docs coherence verified (all seven connection-readiness status values map onto the downstream enum; tests enforce it). Only two non-blocking Medium docs findings remain. None of these are blockers — the escalation is purely the gated-path/review-status gate, not a code defect.

Gated files requiring human/CODEOWNERS approval:

  • static/schemas/source/core/execution-requirement-readiness.json (added)
  • static/schemas/source/core/product-execution-readiness.json (added)
  • static/schemas/source/enums/execution-readiness-status.json (added)
  • static/schemas/source/index.json (modified)
  • static/schemas/source/media-buy/get-products-request.json (modified)
  • static/schemas/source/media-buy/get-products-response.json (modified)

Medium findings (non-blocking):

  • docs/reference/experimental-status.mdx:124 — Duplicate media_buy.execution_requirements row in experimental-status table
  • docs/media-buy/task-reference/get_products.mdx:200 — Broken anchor links to execution_readiness section

Once a human/CODEOWNERS approval lands (review_decision → APPROVED), the gate lifts and this falls through to a normal review — likely an approve, since no blocking findings exist.

Medium findings

  • docs/reference/experimental-status.mdx:124 — Duplicate media_buy.execution_requirements row in experimental-status table
  • docs/media-buy/task-reference/get_products.mdx:200 — Broken anchor links to execution_readiness section in get_products.mdx

Why human review

  • Gated paths touched under static/schemas/source/** (6 files) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge (decision rule row 2).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/execution-requirement-readiness.json (added) matches static/schemas/source/**; static/schemas/source/core/product-execution-readiness.json (added) matches static/schemas/source/**; static/schemas/source/enums/execution-readiness-status.json (added) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-products-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-products-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 Oct 24, 2026
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. needs-wg-review Blocked on a working-group decision — surface in WG meeting agendas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant