Skip to content

feat: structured measurement terms and cancellation policy#1962

Open
bokelley wants to merge 18 commits intomainfrom
bokelley/buy-terms-negotiation
Open

feat: structured measurement terms and cancellation policy#1962
bokelley wants to merge 18 commits intomainfrom
bokelley/buy-terms-negotiation

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Apr 6, 2026

Summary

  • Add measurement_terms schema as a negotiation surface for guaranteed media buys: billing measurement vendor, IVT threshold, and viewability floor
  • Add cancellation_policy schema for guaranteed products to declare notice periods and penalties
  • Extract viewability-standard.json enum from inline definition in delivery-metrics.json
  • Add TERMS_REJECTED error code for measurement terms negotiation
  • Vendors identified by brand-ref (domain-based, e.g. { "domain": "doubleverify.com" }) — no free-text ambiguity

Negotiation flow

  1. Seller publishes measurement_terms defaults on products
  2. Buyer proposes overrides on package request at create_media_buy
  3. Seller accepts (echoed on confirmed package), rejects (TERMS_REJECTED), or adjusts
  4. Agreed terms with verification vendors enforce creative tracker_script/tracker_pixel requirements

Key design decisions

  • cancellation_policy is not a negotiation surface — seller declares, buyer accepts by creating the buy
  • viewability.vendor is required (not optional) to enforce tracker tag obligations
  • Billing measurement vendor identifies who counts the billing metric (determined by pricing_model), not what the metric is

Test plan

  • node scripts/build-schemas.cjs builds successfully (81 bundled schemas)
  • All 567 unit tests pass
  • TypeScript typecheck passes
  • Pre-push hooks pass (version sync, Mintlify doc validation, no broken links, accessibility)
  • CI passes

🤖 Generated with Claude Code

bokelley and others added 8 commits April 6, 2026 17:08
…teed buys

Add measurement_terms schema as a negotiation surface for media buys:
billing measurement vendor, IVT threshold, and viewability floor. Sellers
declare defaults on products, buyers propose overrides at create_media_buy,
sellers accept/reject/adjust. Agreed terms on confirmed packages enforce
creative verification tag requirements.

Add cancellation_policy schema for guaranteed products to declare notice
periods and penalties. Extract viewability standard enum from inline
delivery-metrics into reusable viewability-standard.json. Add TERMS_REJECTED
error code for measurement terms negotiation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The insertion order is seller-generated, so cancellation_policy there
represents seller-set overrides for a specific deal (e.g., shorter
notice period for a key advertiser), not buyer-proposed terms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cancellation policy originates on the product. The IO is generated from
products via proposals — having a second place to set cancellation terms
is redundant and confusing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The IO is a legal signing wrapper around a committed proposal. Measurement
terms are negotiated per-package at create_media_buy, not at IO signing
time. Products and packages are the right surfaces.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace free-text penalty_description with structured penalty object.
Four types: percent_remaining (with rate), full_commitment, fixed_fee
(with amount), none. Eliminates interpretation disputes and makes
penalties machine-readable for buyer agents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace fixed viewability field with performance_guarantees array that
supports any rate-based metric: viewability, completion_rate,
brand_safety, attention_score. Each guarantee has a metric, min_rate,
optional standard, and vendor.

Add makegood_policy with closed menu of three remedies:
additional_delivery, credit, invoice_adjustment. Seller declares which
remedies they support; proposes from the menu when a breach occurs;
buyer accepts or disputes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Performance guarantees (viewability, IVT, completion rate, brand safety,
attention score) are the deal terms. Measurement terms (billing vendor,
makegood policy) are the counting and resolution mechanics. These are
separate concerns and should be separate fields.

IVT is now a guaranteed metric like viewability, not a special case.
Single threshold field with floor/ceiling direction determined by metric.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented Apr 7, 2026

linked to #1964

bokelley and others added 3 commits April 7, 2026 05:02
Rename to match IAB T&Cs v3.0 terminology:
- performance_guarantees → performance_standards (Section XI)
- penalty → cancellation_fee (Section XII)
- performance-guarantee.json → performance-standard.json
- guaranteed-metric.json → performance-standard-metric.json

The IAB deliberately avoids "guarantee" (implies legal warranty) and
"penalty" (implies punitive damages).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Buyers can now filter products at discovery time by performance standard
requirements: "only show me products where DoubleVerify can measure
viewability at 70% MRC." Products that cannot meet the threshold or
do not support the specified vendor are excluded.

Follows the existing required_features and required_geo_targeting
filter pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add accountability.mdx documenting the full lifecycle: discovery with
required_performance_standards filter, product defaults, refinement,
buy creation negotiation, confirmed package as contract, creative
enforcement, and breach/makegood resolution.

Clarify insertion-order.json: the IO is a signing wrapper, not a
negotiation surface. All deal terms live on products and packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley and others added 2 commits April 7, 2026 05:25
Add brief mentions and links to the accountability page from:
- media-buy overview (agency language table)
- media-products (after delivery measurement providers)
- media-buys creation (package model bullets)

No new content — just cross-references to avoid doc sprawl.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gotiation

# Conflicts:
#	static/schemas/source/enums/error-code.json
bokelley and others added 5 commits April 7, 2026 05:37
Position vendor field as discovery point for measurement agents via
brand.json. Clarify relationship between content standards (what was
delivered) and performance standards (how well). Reference issue #1972
for measurement agent interface follow-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The vendor's brand.json is where their measurement agent will be
advertised, consistent with brand_agent and rights_agent. This
positions the schema correctly for issue #1972 without requiring
changes when the agent interface lands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR #1973 added a generic agents array to brand.json. Update
accountability docs and performance-standard schema to reference
the agents array with type: 'measurement' instead of the deprecated
named brand_agent/rights_agent fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant