Repository navigation
feat(schema): add print_metrics for proof of insertion and circulation - #7936
Conversation
Add experimental print_metrics to delivery-metrics.json so by_installment rows carry page/position delivered, circulation and tearsheet evidence. Closes #5684, #5687 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated-path change requires human/CODEOWNERS approval.
This PR modifies three files under static/schemas/source/**, which is 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.
The change itself looks clean: it's an additive, non-breaking introduction of experimental print_metrics (sibling of ooh_metrics) to delivery-metrics.json, the available-metric enum, and the aggregate non-scalar exclusion, with schema↔docs coherence verified field-for-field and a correct minor changeset (3.2.1→3.3.0). Tests cover accept/reject vectors and are wired into test:schemas. The reviewer surfaced no Critical/High/Medium findings, and the pre-existing ooh_metrics aggregate-exclusion gap is correctly out of scope.
Because the diff touches the gated schema source and no human/CODEOWNERS approval is yet recorded, a human reviewer must sign off before merge.
Escalation reasons:
- Modifies gated schema source files (
delivery-metrics.json,available-metric.json,delivery-metric-aggregate.json) understatic/schemas/source/**;review_decisionisREVIEW_REQUIRED. Human/CODEOWNERS approval required.
Why human review
- Modifies gated schema source under static/schemas/source/** (delivery-metrics.json, available-metric.json, delivery-metric-aggregate.json) while review_decision is 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/delivery-metric-aggregate.json (modified) matches
static/schemas/source/**; static/schemas/source/core/delivery-metrics.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/available-metric.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.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema source modified; human/CODEOWNERS approval required.
This PR modifies protocol schema source under the hard approval gate (static/schemas/source/**) while the GitHub review decision is REVIEW_REQUIRED, not APPROVED. Decision rule row 2 forces escalation until a human/CODEOWNERS approval is recorded.
The diff itself is clean: the reviewer found no Critical/High/Medium findings. Schema↔docs coherence holds across delivery-metrics.json, print.mdx, optimization-reporting.mdx, and get_media_buy_delivery.mdx; the minor changeset fits the new optional experimental field plus enum value; tests were added. The one delta since the prior pass was a cosmetic $schema URL alignment (/schemas/latest/ → /schemas/v3/) in print.mdx. No blocking issues — the escalation is purely the deterministic gate, not a code concern.
Escalation reasons
- Modifies gated schema source
static/schemas/source/core/delivery-metrics.json,static/schemas/source/core/delivery-metric-aggregate.json,static/schemas/source/enums/available-metric.jsonwhilereview_decisionisREVIEW_REQUIRED— human/CODEOWNERS approval required before merge (rule row 2). - Note: adds a new enum value / field to a published schema (a Normative, potentially breaking-class protocol change) — ratification is a human act; cannot be auto-approved until approved.
Why human review
- Modifies gated schema source under static/schemas/source/** (delivery-metrics.json, delivery-metric-aggregate.json, available-metric.json) while review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge (decision rule row 2).
- Touches paths under a hard, non-overridable approval gate (static/schemas/source/**); Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of diff cleanliness.
- Adds a new enum value plus optional field to a published protocol schema — a Normative change to the AdCP wire surface that merits a human eye per the constitution's decision-class governance.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/delivery-metric-aggregate.json (modified) matches
static/schemas/source/**; static/schemas/source/core/delivery-metrics.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/available-metric.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.
Summary
print_metricsobject tocore/delivery-metrics.json(sibling toooh_metrics):page_delivered,position_delivered(free-form string, no enum until Print: shared placement/position taxonomy (cover positions, section, page) #5686),circulation_delivered,circulation_basis(audited|seller_modeled), andevidence($refplacement-evidence.json, the tearsheet). Norequiredfields;additionalProperties: true.by_installmentrows alreadyallOfdelivery-metrics.json, so one row per issue carries both the proof of insertion (Print: proof-of-insertion / tearsheet verification workflow #5684) and circulation (Print: delivery reporting semantics (insertions delivered, circulation) #5687). No change to the delivery-response schema.print_metricsto theavailable-metricenum (so sellers can declare/commit it and report a gap viaby_package[].missing_metrics) and to the non-scalar exclusion indelivery-metric-aggregate.json.print.mdxwith a schema-validatedby_installmentexample and SHOULD guidance for guaranteed print products; short pointers inget_media_buy_delivery.mdxandoptimization-reporting.mdx.minor.Judgment calls
missing_metrics.metric_idis enum-driven, so without it the documented accountability path would not validate.circulation_deliveredfallback is documented as prose:product.delivery_measurementhas no structured circulation field (onlyvendors/notes). Called out in the docs as a possible additive follow-up.print_metricshas noexperimental_featuresid, matching theooh_metricsprecedent (also unregistered).ooh_metricsto the aggregate exclusion list (same pre-existing gap, out of scope).Testing
build:schemas,test:schemas(incl. newtests/print-metrics.test.cjs),test:examples,test:json-schema,test:composed,build:compliance --check,json-schema-validation --file docs/creative/channels/print.mdx, changeset scope/status checks — all pass. Reviewed by ad-tech-protocol-expert and docs-expert; findings addressed.Open for reviewers
missing_metricsis package/object-level (cannot name an installment); one insertion/artifact per row; no typed booked-position to compare against.Closes #5684 (and #5687 — one PR closes both)
🤖 Generated with Claude Code
Open workspace in Conductor