Skip to content

Reporting metric aggregation needs executable semantics #7240

Description

@bokelley

Problem

AdCP 3.2.0-rc.0 report-definition metrics declare aggregation as
sum | count | min | max | average | ratio | last | custom. Merged Reliable Reporting
PR #7228 adds immutable revision/receipt machinery but does not make metric aggregation
semantics executable.

Even for one bilateral seller feed, a generic buyer cannot safely determine:

  • a ratio's numerator, denominator, and zero-denominator behavior;
  • semantic compatibility across qualifier/population/time/attribution windows;
  • additive versus semi-additive axes;
  • non-additive unique versus modelled/deduplicated values;
  • when last is ordered by observation, data-through, or source sequence.

Separately, get_media_buy_delivery.aggregated_totals.reach permits either true
cross-buy deduplicated reach or a sum of per-buy reach under the same field. Those have
different population semantics, and summed constituent reach must not feed frequency as
if it were unique reach.

This is a bilateral interpretation gap, not a request to standardize a buyer's
cross-seller portfolio aggregation engine.

Proposed additive shape

Keep legacy string values for compatibility and add a discriminated semantic object to
report-definition metrics, for example:

{
  "name": "ctr",
  "source_expression": "clicks / impressions",
  "aggregation": {
    "kind": "recomputable_ratio",
    "numerator_metric": "clicks",
    "denominator_metric": "impressions",
    "zero_denominator": "null"
  },
  "unit": "ratio",
  "population": "served_ad_events:v1",
  "window_basis": "report_period",
  "compatibility_key": "sha256:..."
}

The union should distinguish at least additive, recomputable ratio, semi-additive,
non-additive unique, deduplicated/modelled, last-value/snapshot, and
opaque/custom-unsafe. For aggregate reach, add method/model/population evidence; absent
that evidence, omit aggregate reach or label a sum explicitly as a bound such as
sum_of_constituent_reach, which cannot feed frequency.

Executable acceptance examples

  1. Compatible outbound-click counts sum; outbound clicks and all-clicks do not.
  2. CTR is recomputed from compatible summed clicks/impressions and row CTR is never
    averaged.
  3. Cross-buy reach without dedup population evidence is omitted or bounded; a pinned
    compatible dedup/model identity permits the unique value.
  4. Source-local provisional and official values remain separate semantic partitions.
  5. Different attribution windows cannot occupy one aggregate.
  6. Existing legacy strings validate but are treated as unsafe for generic aggregation
    unless the missing semantics are supplied.

Out of scope: seller selection, multi-seller comparable-group selection, portfolio FX,
or any Interchange-specific report surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.media-buyIssue concerns the media-buy protocol domainneeds-wg-reviewBlocked on a working-group decision — surface in WG meeting agendasschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions