Skip to content

feat(schema): typed vendor_relationship and play-based coverage denominators for vendor metrics - #7177

Merged
bokelley merged 3 commits into
mainfrom
feat/vendor-metric-measurement-source
Sep 4, 2026
Merged

bokelley merged 3 commits into
mainfrom
feat/vendor-metric-measurement-source

Conversation

@bokelley

@bokelley bokelley commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Refs #7150 (RFC: verified attention as a reportable vendor metric). Implements the position laid out in this comment: accept §4.1 and §4.3, replace the free-text measurement_basis object in §4.2 with a typed field, and fix the methodology_version pin the measurement catalog already promises.

What changes

New enum enums/vendor-relationship.json — first_party | affiliated | third_party. Who produced the number relative to the seller, not how and not how well. Defined on structural ownership/control facts; explicitly a relationship disposition, not a trust ranking. Generalises the existing completion_source (seller_attested | vendor_attested) pattern from completion_rate to every vendor metric.

reporting_capabilities.vendor_metrics[].vendor_relationship — required whenever the vendor resolves to the seller's own brand.json or an entity under common ownership/control, recommended otherwise; absence is undeclared, never third_party. It is the seller-scoped declaration. The relationship is a property of the (seller, vendor) pair, so it cannot live on the vendor's catalog: the same measurement agent is first_party when its operator sells the inventory and third_party when anyone else reports it. The array description now states normatively that vendor MAY resolve to the seller's own brand.json, provided the seller publishes the metric catalog like any other vendor and declares the relationship (§4.1).

vendor_metric_values[] rows —

  • measurable_plays and measurable_play_seconds (medium-neutral — place-based audio has plays and duration but no screen): sibling coverage denominators for channels where a play or screen-second is the atomic observation unit (§4.3). DOOH impressions is plays × audience multiplier, so measurable_impressions / impressions divides a measured count by a model output. Mirrored on forecast-vendor-metric-value.json as ForecastRange.
  • vendor_relationship: optional echo of the declaration so the row is self-describing without a discovery hop (same reasoning as viewability.vendor). MUST equal the declared value when present.

committed_metrics[] vendor scope gains methodology_version (response-side committed-metric.json, request-side package-request.json). The capabilities catalog's methodology_version description already said "buyer agents pin the contracted version on committed_metrics", but no such field existed. Now it does; the catalog text names it.

Docs — optimization-reporting.mdx (lifecycle table + Vendor-Defined Metrics bullets + new "Seller as its own vendor" bullet), get_media_buy_delivery.mdx, create_media_buy.mdx (methodology pin), measurement/taxonomy.mdx (closed-loop topologies: adds sensor-instrumented place-based media and the disclosure requirement), creative/channels/dooh.mdx (first-party attention example with measurable_plays), get_adcp_capabilities.mdx, media-products.mdx.

Design notes for reviewers

  • Why an enum, given "The End of Taxonomy" / DR-0004. DR-0004 is about open, externally-governed corpora (languages, currencies, instruments, methodologies), where a mirror enum is stale on arrival. A three-way disposition is closed by construction, and a buyer agent that wants to discount or exclude self-measured rows needs a value to branch on. Everything open-corpus in the RFC's measurement_basis (instrument, unit definition, attestation prose) already has a home at the vendor catalog's description, methodology_url, methodology_version, standard_reference, and accreditations[] — as URLs and version pins, not paragraphs. This PR adds no prose fields.
  • Why affiliated. A media owner and its measurement subsidiary sharing a parent is common and is neither first_party nor independent. Buyers MAY collapse it to first_party for trust discounts.
  • Why not a qualifier key. Qualifiers partition rows for the same (vendor, metric_id) and join into reconciliation. The seller–vendor relationship is constant across every row for a pair and does not partition anything; putting it in the join key would only create ways for reconciliation to fail. It is a top-level field on the declaration and the row. The metric-qualifier-parity test is untouched.
  • additionalProperties: false on vendor-metric-value.json is unchanged. The schema's own description makes the closed envelope deliberate ("vendors place extra fields inside breakdown"), so it is not a DR-0009 tightening by this PR. It does mean the new optional fields require the minor changeset included here, since a strict old-schema validator will reject rows carrying them. If the WG wants to open the envelope, that is a separate policy decision.
  • No flattering default. The field is required in exactly the case §4.1 newly permits (vendor is the seller or under common ownership with it), and an absent value is undeclared — consumers MUST NOT read it as third_party. Encoded as x-adcp-validation.verifier_constraints on the declaration so a conformance checker can grade it.

Revisions after WG feedback (B. Masse, 2026-09-03)

  • Renamed measurement_source → vendor_relationship. Not from the feedback directly, but surfaced while checking it: measurement_source already exists on delivery-metrics.json and delivery-forecast.json as the audience-measurement provider slug (nielsen_audio, geopath). Same name, different meaning, on adjacent rows — unacceptable. The enum description now cross-references the existing field.
  • affiliated defined on structural facts only — parent/subsidiary, controlling stake, joint venture, disclosed board overlap. The "material commercial dependency" clause is gone: it was the one judgment-based branch inside an otherwise checkable enum. The issuer-pays incentive problem is real but graded, and is routed to accreditation / RFC: Generalized attribute-value confidence schema for publisher-declared audience signals #5758 in the description. If the set is ever collapsed to two, it collapses toward first_party.
  • "Relationship disposition, not a trust ranking" stated on the enum, the declaration, and in the docs, so third_party is not misread as "most trustworthy".
  • Required when self-measuring; absence is undeclared. Replaces the previous optional-with-third_party-assumption, which put the burden on the buyer to detect affiliation by domain matching — the thing RFC: verified attention as a reportable vendor metric #7150 §2 says buyers can't do.
  • measurable_screen_seconds → measurable_play_seconds. The duration denominator was named for a screen; the play denominator wasn't. Place-based audio (RFC: Support place-based audio as DOOH inventory, not screen-only or generic streaming audio #5878) has plays and duration and no screen.
  • Methodology-pin signal documented. The observable event is the methodology_version string in the vendor's catalog; sellers that pin SHOULD re-read on a schedule and subscribe to the vendor agent's capabilities.changed notification where supported. The catalog is experimental, so where a vendor publishes neither a version nor notifications, sellers SHOULD decline to commit a pin. Whether sellers accept the obligation at all is a seller-membership question this PR does not settle.
  • Q2 (top-level vs qualifier) checked empirically against collectVendorMetricExamples in build-schemas.cjs: two rows for the same (vendor, metric_id) differing only in vendor_relationship are rejected as duplicates — and so are two rows differing only in qualifier, because the build-time uniqueness key is (vendor.domain, vendor.brand_id, metric_id) with no qualifier component (pre-existing gap vs. the delivery-metrics.json prose, which allows qualifier-distinct rows). The AOOH transition case — operator-reported plays next to a third-party currency figure for the same metric_id — is two different vendors and is accepted. Top-level stands: a seller's relationship to one vendor is a single fact and never partitions rows.

Deliberately out of scope

  • Declared impression basis for DOOH (RFC §3, DOOH: Add structured selling-unit fields to placements (slot_duration, share_of_time, screen_resolution, delivery_unit) #5537's audience_multiplier). That is a claim about how impressions is derived, not about vendor-metric provenance. Should be its own item on dooh_metrics / Placement.
  • Verifiable third-party attestation of a self-measured metric. The portable attestation framework (attestation-reference.json) could let a catalog metric reference an auditor-issued credential instead of the RFC's independent_verification: "none" prose. Worth a follow-up once the WG ratifies the relationship field.
  • Promoting any attention metric into available-metric.json (RFC §6 agrees).

Verification

Passing locally: test:schemas, test:json-schema (281 blocks), test:composed (435), test:examples, test:extensions, test:extension-schemas, test:oneof-discriminators, test:schema-utf8, test:build-schemas-vendor-metric-uniqueness, test:build-schemas-hoist-enums, test:build-schemas-hoist-marked, metric-qualifier-parity, lint:schema-links, test:docs-nav, test:owned-links, test:storyboard-doc-parity, test:doc-compliance-drift, test:openapi (registry unchanged), check-changeset-protocol-scope, changeset status (minor). test:snippets has 26 pre-existing failures that need a live agent + Postgres; none are in files touched here.

🤖 Generated with Claude Code

…nators for vendor metrics

Refs #7150. Adds the closed measurement-source enum (first_party | affiliated | third_party) on reporting_capabilities.vendor_metrics[] with an optional echo on vendor_metric_values[] rows, measurable_plays / measurable_screen_seconds coverage denominators for play-based channels (delivery + forecast), methodology_version on vendor-scope committed_metrics (request + response), and normative docs that a seller MAY be its own measurement vendor when it publishes the catalog and declares the relationship.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 2, 2026

@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 schema paths require human/CODEOWNERS review.

This PR is a clean, entirely additive Normative-class spec change: a new closed measurement-source enum, optional measurement_source/measurable_plays/measurable_screen_seconds fields on vendor-metric-value surfaces, and methodology_version on vendor-scope committed metrics. Reviewer verified schema↔docs coherence across six doc pages, a correct minor changeset, denominator references resolving to real delivery-metrics.json fields, and no oneOf regression or dist mutation. No Critical, High, or Medium findings.

Despite the clean diff, this PR modifies/adds files under static/schemas/source/**, which is a hard, deterministic approval gate (gated_paths: true). review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied and the outcome must be escalate (decision table row 2). The gate lifts automatically once a human/CODEOWNERS approval lands.

Escalation reasons

  • static/schemas/source/** files touched under a hard approval gate; review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • Gated paths touched (static/schemas/source/**) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/committed-metric.json (modified) matches static/schemas/source/**; static/schemas/source/core/forecast-vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/enums/measurement-source.json (added) matches static/schemas/source/**; static/schemas/source/media-buy/package-request.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-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.

…ship and tighten its semantics

Addresses WG feedback on #7177 / #7150:

- Rename measurement_source -> vendor_relationship (and the enum file) to avoid colliding with the existing measurement_source provider slug on delivery-metrics / delivery-forecast rows.
- Define affiliated on structural facts only (ownership, control, board overlap); route commercial-dependency concerns to accreditation / #5758. State explicitly that the field is a relationship disposition, not a trust ranking.
- Make the field REQUIRED when the vendor resolves to the seller's own brand.json or an entity under common ownership/control; absence is undeclared, never third_party. Add x-adcp-validation verifier constraints.
- Rename measurable_screen_seconds -> measurable_play_seconds (medium-neutral; place-based audio has plays and duration but no screen).
- Document the observable signal for a vendor methodology_version change (catalog re-read + capabilities.changed) and that the measurement catalog is experimental.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@bokelley bokelley changed the title feat(schema): typed measurement_source and play-based coverage denominators for vendor metrics feat(schema): typed vendor_relationship and play-based coverage denominators for vendor metrics Sep 4, 2026

@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 approval gate unsatisfied.

This PR modifies published protocol source under static/schemas/source/** (7 files, including a renamed field measurement_source→vendor_relationship with a new enum replacing a deleted one, and measurable_screen_seconds→measurable_play_seconds). gated_paths is true and review_decision is REVIEW_REQUIRED (not APPROVED), so decision-table row 2 fires: human/CODEOWNERS approval is required before merge.

Separately, the reviewer classified the delta as a mechanical-but-load-bearing rename with renamed fields and a new enum value — a Breaking-class protocol change per the constitution, which is never auto-approved regardless of a clean diff, and only proceeds when review_decision is APPROVED.

No blocking (critical/high) findings were raised. Two Medium findings were posted inline (stale affiliated gloss in reporting-capabilities.json:90; self-contradicting Declaration bullet in optimization-reporting.mdx:341) — surfaced for the human reviewer but not independently blocking.

Medium findings

  • static/schemas/source/core/reporting-capabilities.json:90 — stale "material commercial dependency" gloss of affiliated contradicts canonical vendor-relationship enum
  • docs/media-buy/media-buys/optimization-reporting.mdx:341 — self-contradicting Declaration bullet vs. vendor-relationship enum

Escalation reasons

  • Gated paths (static/schemas/source/**) touched and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
  • Breaking-class protocol change (field renames + new/deleted enum) — ratification is a human act; never auto-approved absent an APPROVED review.

Why human review

  • Gated paths (static/schemas/source/**) touched and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge (decision-table row 2).
  • Breaking-class protocol change: measurement_source→vendor_relationship field rename with a new enum replacing the deleted one, plus measurable_screen_seconds→measurable_play_seconds rename. Per the constitution, breaking-class changes are never auto-approved; ratification is a human act unless review_decision is APPROVED.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/committed-metric.json (modified) matches static/schemas/source/**; static/schemas/source/core/forecast-vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/enums/vendor-relationship.json (added) matches static/schemas/source/**; static/schemas/source/media-buy/package-request.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-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.

@bokelley

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Cross-cutting follow-up filed as requested in review: #7224 — whether closed (additionalProperties: false) row schemas should open per DR-0009 or be ratified as a deliberate class. Not a blocker for this PR; the minor bump here is correct under the current rule.

@bokelley

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-ups from review filed: #7224 (closed row schemas vs DR-0009, with DR-0019 proposed in #7233 as Option A), #7235 (seller consultation on the methodology_version pin obligation — this PR stays at SHOULD), #7234 (pre-existing uniqueness-lint bug surfaced by the Q2 check; fix PR incoming).

Ladon medium findings on #7177: the reporting-capabilities field description and the optimization-reporting Declaration bullet still carried the pre-revision 'material commercial dependency' gloss of affiliated. Both now match the canonical structural-facts definition in enums/vendor-relationship.json.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@bokelley

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Ladon's two Medium findings on 2b1846c are fixed in 21040e9: the reporting-capabilities.json:90 field description and the optimization-reporting.mdx:341 bullet now carry the same structural-facts definition of affiliated as the canonical enums/vendor-relationship.json. No other "commercial dependency" wording remains except the deliberate negations.

On the classification: Ladon read the measurement_source → vendor_relationship and measurable_screen_seconds → measurable_play_seconds renames as Breaking-class. They are intra-PR revisions — neither identifier exists in any published dist/schemas/<version>/, in main, or in any released SDK; both were introduced by the first commit of this PR and renamed by the second after review. Nothing a conformant implementation could have shipped against is removed or renamed. The change class remains Normative (optional fields, new closed enum, new doc sections) per the constitution's table. Recording that here so the sticky verdict isn't read as a Breaking finding at ratification.

@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 — hard approval gate unsatisfied (gated paths + breaking-class protocol change).

This PR modifies the protocol source of truth under static/schemas/source/** (committed-metric.json, forecast-vendor-metric-value.json, reporting-capabilities.json, vendor-metric-value.json, package-request.json, get-adcp-capabilities-response.json) and adds enums/vendor-relationship.json. gated_paths is true and review_decision is not APPROVED (unknown/none), so the hard approval gate (decision-table row 2) is not satisfied — human/CODEOWNERS approval is required before merge.

Additionally, the prior run identified this as a breaking-class protocol change (measurement_source→vendor_relationship field rename with a new enum replacing a deleted one, plus measurable_screen_seconds→measurable_play_seconds rename). Per the repo constitution's hard gate, breaking-class changes are never auto-approved regardless of a clean diff; ratification is a human act unless review_decision is APPROVED.

The reviewer's current delta pass (narrowing the affiliated definition to structural-facts-only, tightening docs↔schema↔enum coherence) surfaced no critical/high/medium findings — this is a clean coherence improvement with no wire-shape change. But the gates above are semantic/mechanical and independent of finding cleanliness. No blocking reviewer findings, but the gate stands.

Escalation reasons

  • Gated paths (static/schemas/source/**) touched and review_decision is not APPROVED — human/CODEOWNERS approval required before merge (row 2).
  • Breaking-class protocol change (field/enum renames on the published wire surface) — constitution hard gate: never auto-approved without human ratification unless review_decision is APPROVED.

Why human review

  • Gated paths (static/schemas/source/**) touched and review_decision is not APPROVED (unknown/none) — human/CODEOWNERS approval required before merge (decision-table row 2). Files: committed-metric.json, forecast-vendor-metric-value.json, reporting-capabilities.json, vendor-metric-value.json, vendor-relationship.json (added), package-request.json, get-adcp-capabilities-response.json.
  • Breaking-class protocol change (measurement_source→vendor_relationship field rename with new enum replacing the deleted one; measurable_screen_seconds→measurable_play_seconds rename) — constitution hard gate: breaking-class changes are never auto-approved; ratification is a human act unless review_decision is APPROVED.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/committed-metric.json (modified) matches static/schemas/source/**; static/schemas/source/core/forecast-vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-capabilities.json (modified) matches static/schemas/source/**; static/schemas/source/core/vendor-metric-value.json (modified) matches static/schemas/source/**; static/schemas/source/enums/vendor-relationship.json (added) matches static/schemas/source/**; static/schemas/source/media-buy/package-request.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'unknown', 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.

@bokelley bokelley added this to the 3.2.0 milestone Sep 4, 2026
@bokelley
bokelley enabled auto-merge (squash) September 4, 2026 11:21
@bokelley
bokelley disabled auto-merge September 4, 2026 13:33
@bokelley
bokelley merged commit 6cf4e18 into main Sep 4, 2026
60 checks passed
@bokelley
bokelley deleted the feat/vendor-metric-measurement-source branch September 4, 2026 13:33

bokelley commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Human triage on the linked follow-ups:

No additional 3.2 schema change is requested here from those follow-ups.

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

Development

Successfully merging this pull request may close these issues.

1 participant