Skip to content

bug(reporting): a Core seller cannot carry conditional metrics under full coverage #1239

Closed

Description

@bokelley

Summary

On 8.0.0b18, two rules combine so that a seller cannot report a metric that applies to some inventory and not other inventory -- the case #1170 was written for ("GAM may provide impressions, spend, and clicks while video-completion or viewability metrics are unsupported ... for the same media buy").

  1. Conformance admits only exact metrics. _validate_request_against_capabilities (adcp/reporting/conformance.py) raises CAPABILITY_MISMATCH: requested metric 'clicks' is not exact in the offering for any requested metric whose offering support is partial.
  2. An unsupported cell demotes the constituent. Per InlineFetchResult.cell_availability, "mixed availability promotes the constituent to partial". A configuration with coverage_requirement: full then fails the slice with PARTIAL_RESULT.

So a seller that requests a conditional metric either fails conformance (rule 1) or, if it requests it anyway, fails every slice for inventory where the metric does not apply (rule 2). A display buy has no completed views, so on a typical mixed book almost every slice fails.

Runtime and conformance disagree

The runtime producer does not enforce rule 1: ReliableReportingService built with ReportingAccountContext(requested_metrics=(... "clicks", "completed_views" ...)) happily requests partial metrics. Only the conformance harness rejects them. An adopter who tests with the service and not the harness ships something the source contract says is invalid.

Reproduction (ESA, adcp 8.0.0b18)

  • Offering declares impressions/spend exact, four counters partial.
  • Context requests all six; configuration coverage_requirement: full.
  • Fetch returns rows for a display buy with completed_views absent and cell_availability={buy: {"completed_views": MetricEvidence.unavailable(...)}}.
  • Worker turn: reporting slice failed ... code=PARTIAL_RESULT retry=retryable, no revision.

What we did

Request only the exact pair and carry the conditional counters as extra row columns when the ad server measured them -- no control total, no availability claim. That works, but it means per-metric evidence (#1170) is never used, and buyers get the counters without any statement of whether a missing one means "not applicable" or "missing".

Ask

Decide the intended model and make runtime and conformance agree. One coherent option: a metric whose cell is unsupported (inapplicable to that inventory) does not demote coverage -- only missing/delayed do -- and partial offering metrics are requestable, with their per-cell evidence mandatory. That is what makes #1170 usable under full coverage.

Refs #1170, #1173.

Activity

  1. added
    bugSomething isn't working
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 28, 2026
  2. bokelley commented on Sep 28, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Bug
    Bucket(s): reporting, validation (neither label exists in this repo — label gap flagged in run summary)
    Status: ready-for-human

    What the experts said:

    • ad-tech-protocol-expert: Non-breaking fix — partial offering support is unreachable under the exact-only conformance gate; unsupported cells are structural "inapplicable" signals, not missing-data signals, and should not demote coverage.
    • code-reviewer: Core two fixes are safe to automate; the "per-cell evidence mandatory" extension is underspecified. Edge case: a constituent whose all cells are unsupported has a zero-denominator in the corrected roll-up and needs explicit handling.

    My take: Both root-cause bugs are confirmed — the conformance.py:224 exact-only gate and the inline_source.py:1140–1147 constituent demotion logic are client-side policy mistakes. Before implementing, two design questions need resolution from @bokelley: (1) what does "per-cell evidence mandatory" mean concretely for partial metrics — which fields, which error code, enforced in conformance or runtime or both? (2) what coverage status should an all-unsupported constituent carry?

    Once the model is decided, the implementation scope is:

    • conformance.py:224–229: extend admission to partial metrics (and add evidence check when specified)
    • inline_source.py:1140–1147: treat a constituent as present when all cells are in _AVAILABLE ∪ {unsupported}; add zero-denominator guard for all-unsupported constituents
    • New test in tests/conformance/reporting/test_inline_cell_availability.py covering full-coverage slice with mixed exact/partial metrics and unsupported cells

    Triaged by Claude Code. Session: https://claude.ai/code/session_01Uknm2rn2T5eDk11oP73VZa


    Generated by Claude Code

  3. added and removed
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 28, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions