From 6cd343f739ac5ec40f69e1db9f468cca57806432 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Fri, 30 Oct 2026 18:26:47 +0000 Subject: [PATCH] test(reporting): run the spec's canonical coverage vectors and align the vocabularies The parity test now runs the spec repository's coverage vectors (adcontextprotocol/adcp#8616, 023bbd26e: 113 cases), vendored under tests/fixtures/reporting_subscriptions/spec/ and pinned by SHA-256, in place of the vendored TypeScript table. Rows are derived with IANA tzdata 2026f, so the dev extra pins tzdata==2026.6 and the test resolves zones from it, never the host's zoneinfo. All 113 cases pass. Two disagreements with the vectors are fixed: - excluded[].offering_id was ignored, so an offering-scoped capacity exclusion under match "all" removed every offering's periods (max-accounts-capacity-per-offering; core/reporting-subscription-coverage.json excluded[].offering_id). - A selector period_duration was never validated, so P1W resolved to no offering instead of failing (p1w-is-not-a-schedule-duration; core/reporting-schedule.json period_duration has no W designator). Coverage input errors are typed: CoverageInputError (an ADCPError and a ValueError) carries code COVERAGE_INPUT_INCOMPLETE or COVERAGE_INPUT_INVALID, the detail from error-codes.json (missing_account_timezone, invalid_period_duration, ...) and recovery "correctable". The vocabularies are pinned against the vendored files: REPORTING_SUBSCRIPTION_ERROR_CODES and COVERAGE_INPUT_DETAILS against error-codes.json, and the new COVERAGE_RULE_ORDER and COVERAGE_REASON_CODES against reason-codes.json. The buyer facade follows error-codes.json: SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED applies when an all-accounts subscription names a destination without operator_domains, and the errors carry their context (would_revoke, delivery_config_id and account_id, nearest with every failed attribute). Refs #1695 Co-Authored-By: Claude Opus 5.5 (1M context) --- pyproject.toml | 4 + src/adcp/reporting/subscriptions/__init__.py | 23 +- src/adcp/reporting/subscriptions/_clock.py | 87 +- src/adcp/reporting/subscriptions/consumer.py | 17 + src/adcp/reporting/subscriptions/coverage.py | 84 +- src/adcp/reporting/subscriptions/facade.py | 73 +- .../reporting/subscriptions/resolution.py | 27 +- .../reporting/subscriptions/vocabulary.py | 58 + .../coverage-cases.json | 13632 -------------- .../reporting_subscriptions/spec/README.md | 105 + .../spec/case.schema.json | 616 + .../spec/error-codes.json | 181 + .../spec/reason-codes.json | 255 + .../reporting_subscriptions/spec/vectors.json | 15513 ++++++++++++++++ tests/test_reporting_subscription_engine.py | 6 +- tests/test_reporting_subscription_facade.py | 26 +- tests/test_reporting_subscription_parity.py | 141 +- 17 files changed, 17111 insertions(+), 13737 deletions(-) create mode 100644 src/adcp/reporting/subscriptions/vocabulary.py delete mode 100644 tests/fixtures/reporting_subscriptions/coverage-cases.json create mode 100644 tests/fixtures/reporting_subscriptions/spec/README.md create mode 100644 tests/fixtures/reporting_subscriptions/spec/case.schema.json create mode 100644 tests/fixtures/reporting_subscriptions/spec/error-codes.json create mode 100644 tests/fixtures/reporting_subscriptions/spec/reason-codes.json create mode 100644 tests/fixtures/reporting_subscriptions/spec/vectors.json diff --git a/pyproject.toml b/pyproject.toml index 007f78b38..7f045d76f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,6 +168,9 @@ dev = [ "pytest-asyncio>=0.21.0", "pytest-cov>=4.0.0", "pytest-xdist>=3.8,<4", + # The spec's reporting-subscription coverage vectors are derived with IANA + # tzdata 2026f; the parity test pins zoneinfo to this release. + "tzdata==2026.6", "freezegun==1.5.5", # isolated deferred-schema compatibility regressions "mypy==1.20.2", "pyright==1.1.414", # real imported-base adopter regressions @@ -487,6 +490,7 @@ dev = [ # source — and a dead-weight hook that everyone bypasses with # ``SKIP=mypy``. "mypy==1.20.2", + "tzdata==2026.6", ] [[tool.mypy.overrides]] diff --git a/src/adcp/reporting/subscriptions/__init__.py b/src/adcp/reporting/subscriptions/__init__.py index b20b4fdbb..e5fa4e9aa 100644 --- a/src/adcp/reporting/subscriptions/__init__.py +++ b/src/adcp/reporting/subscriptions/__init__.py @@ -24,6 +24,7 @@ from __future__ import annotations +from adcp.reporting.subscriptions._clock import COVERAGE_INPUT_DETAILS, CoverageInputError from adcp.reporting.subscriptions.capabilities import ( REPORTING_SUBSCRIPTIONS_FEATURE, REPORTING_SUBSCRIPTIONS_SECTION, @@ -73,18 +74,18 @@ decode_principal_state, encode_principal_state, ) -from adcp.reporting.subscriptions.ledger import ( - FrozenOwedSet, - SubscriptionObligationPlanner, - SubscriptionPlanResult, - subscription_obligation_id, -) from adcp.reporting.subscriptions.facade import ( PreviewResult, ReportingClient, SubscribeResult, guard_sync_principal, ) +from adcp.reporting.subscriptions.ledger import ( + FrozenOwedSet, + SubscriptionObligationPlanner, + SubscriptionPlanResult, + subscription_obligation_id, +) from adcp.reporting.subscriptions.registry import ( ReportingSubscriptionValidationError, apply_reporting_subscriptions, @@ -100,6 +101,11 @@ SubscriptionSelector, resolve_subscription_offerings, ) +from adcp.reporting.subscriptions.vocabulary import ( + COVERAGE_REASON_CODES, + COVERAGE_RULE_ORDER, + COVERAGE_VOCABULARY_VERSION, +) from adcp.reporting.subscriptions.wire import ( project_offering, project_reporting_delivery, @@ -109,6 +115,11 @@ ) __all__ = [ + "COVERAGE_REASON_CODES", + "COVERAGE_RULE_ORDER", + "COVERAGE_VOCABULARY_VERSION", + "COVERAGE_INPUT_DETAILS", + "CoverageInputError", "PreviewResult", "ReportingClient", "SubscribeResult", diff --git a/src/adcp/reporting/subscriptions/_clock.py b/src/adcp/reporting/subscriptions/_clock.py index cc7ab7be6..b9e1b63bc 100644 --- a/src/adcp/reporting/subscriptions/_clock.py +++ b/src/adcp/reporting/subscriptions/_clock.py @@ -41,7 +41,53 @@ from functools import lru_cache from zoneinfo import ZoneInfo, ZoneInfoNotFoundError, available_timezones +from adcp.exceptions import ADCPError, RecoveryLiteral + UTC = timezone.utc + +#: COVERAGE_INPUT_INCOMPLETE and COVERAGE_INPUT_INVALID details, from the +#: spec's frozen error-codes.json (vocabulary_version 1). +COVERAGE_INPUT_DETAILS = frozenset( + { + "missing_account_timezone", + "missing_source_timezone", + "missing_previous_timezone", + "missing_standard_dimensions", + "missing_status_retention_days", + "missing_version_configuration", + "missing_destination_method", + "invalid_timezone", + "invalid_period_duration", + "invalid_instant", + "invalid_input", + } +) + + +class CoverageInputError(ADCPError, ValueError): + """Coverage cannot be computed from this input (spec ``error-codes.json``). + + ``code`` is ``COVERAGE_INPUT_INCOMPLETE`` when the input lacks a value the + rule needs and ``COVERAGE_INPUT_INVALID`` when a value is malformed; + ``detail`` names the cause. ``recovery`` is ``correctable``. It is a + local computation, so ``dispatched`` is not set. It stays a + ``ValueError`` for callers that already catch one. + """ + + recovery: RecoveryLiteral | None = "correctable" + + def __init__(self, detail: str, message: str) -> None: + if detail not in COVERAGE_INPUT_DETAILS: + raise AssertionError(f"unknown coverage input detail {detail!r}") + super().__init__(message) + self.detail = detail + self.code = ( + "COVERAGE_INPUT_INCOMPLETE" + if detail.startswith("missing_") + else "COVERAGE_INPUT_INVALID" + ) + + _DURATION = re.compile(r"P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?") _SLA = re.compile(r"P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?") @@ -49,7 +95,7 @@ def utc_instant(value: datetime, *, field: str = "timestamp") -> datetime: """Return ``value`` in UTC, refusing naive datetimes.""" if value.tzinfo is None or value.utcoffset() is None: - raise ValueError(f"{field} must be timezone-aware") + raise CoverageInputError("invalid_instant", f"{field} must be timezone-aware") return value.astimezone(UTC) @@ -61,23 +107,42 @@ def _iana_zones() -> frozenset[str]: def require_zone(name: str | None, *, field: str = "timezone") -> ZoneInfo: """A recognized IANA zone; numeric offsets, unknown names and keys that are not IANA zone names (``posixrules``, ``right/UTC``, ``posix/...``) are refused.""" - if not name or name[0] in "+-" or name[0].isdigit() or name not in _iana_zones(): - raise ValueError(f"{field} {name!r} is not a recognized IANA timezone") + if not name: + detail = ( + "missing_source_timezone" + if "source" in field + else "missing_previous_timezone" + if "previous" in field + else "missing_account_timezone" + ) + raise CoverageInputError(detail, f"{field} is required. Supply the IANA zone name.") + if name[0] in "+-" or name[0].isdigit() or name not in _iana_zones(): + raise CoverageInputError( + "invalid_timezone", + f"{field} {name!r} is not a recognized IANA timezone. Use an IANA zone name; " + "a numeric offset is not one.", + ) try: return ZoneInfo(name) except (ZoneInfoNotFoundError, ValueError) as error: - raise ValueError(f"{field} {name!r} is not a recognized IANA timezone") from error + raise CoverageInputError( + "invalid_timezone", f"{field} {name!r} is not a recognized IANA timezone" + ) from error def parse_period_duration(value: str) -> tuple[int, int, int, int]: """``(years, months, days, seconds)`` of a strictly positive duration.""" match = _DURATION.fullmatch(value) if match is None or value in {"P", "PT"} or value.endswith("T"): - raise ValueError(f"{value!r} is not an ISO 8601 period duration") + raise CoverageInputError( + "invalid_period_duration", + f"{value!r} is not a schedule period_duration. Use Y, M and D date and H, M " + "and S time components; there is no W designator (a week is P7D).", + ) years, months, days, hours, minutes, seconds = (int(item or 0) for item in match.groups()) exact = hours * 3600 + minutes * 60 + seconds if not (years or months or days or exact): - raise ValueError("period_duration must be positive") + raise CoverageInputError("invalid_period_duration", "period_duration must be positive") return years, months, days, exact @@ -133,14 +198,16 @@ def __post_init__(self) -> None: raise ValueError("origin is local civil time and must be naive") years, months, days, exact = parts if self.local and exact and (years or months or days): - raise ValueError( + raise CoverageInputError( + "invalid_period_duration", f"period_duration {self.period_duration!r} mixes date and time components, " - "which a local alignment does not allow" + "which a local alignment does not allow", ) if self.local and exact and not (years or months or days) and 86400 % exact: - raise ValueError( + raise CoverageInputError( + "invalid_period_duration", f"period_duration {self.period_duration!r} must divide 24 hours " - "under a local alignment" + "under a local alignment", ) approx = years * 365.2425 * 86400 + months * 30.436875 * 86400 + days * 86400 + exact object.__setattr__(self, "_approx", approx) diff --git a/src/adcp/reporting/subscriptions/consumer.py b/src/adcp/reporting/subscriptions/consumer.py index fab5df750..84912ada7 100644 --- a/src/adcp/reporting/subscriptions/consumer.py +++ b/src/adcp/reporting/subscriptions/consumer.py @@ -84,8 +84,17 @@ class ReportingSubscriptionError(ADCPError): it. See :func:`adcp.exceptions.is_pre_dispatch_error`. would_deactivate: The subscription ids a refused write would have deactivated (``SUBSCRIPTION_WOULD_DEACTIVATE``). + would_revoke: The destination ids it would have revoked + (``DESTINATION_WOULD_REVOKE``). + delivery_config_id, account_id: The clashing delivery config and its + account (``SUBSCRIPTION_ID_CLASH``). + nearest: The offerings failing on the fewest attributes, each with + the attributes it fails (``SUBSCRIPTION_SELECTOR_UNMATCHED``). readback: The seller's readback (``SUBSCRIPTION_READBACK_MISMATCH``). + Codes, recovery classes and context names follow the spec's frozen + ``error-codes.json`` (vocabulary_version 1). + The message ends with the fix. """ @@ -97,6 +106,10 @@ def __init__( recovery: RecoveryLiteral | None = None, dispatched: Literal[False] | None = None, would_deactivate: Sequence[str] = (), + would_revoke: Sequence[str] = (), + delivery_config_id: str | None = None, + account_id: str | None = None, + nearest: Sequence[tuple[str, tuple[str, ...]]] = (), readback: ReportingSubscriptionReadback | None = None, ) -> None: super().__init__(message) @@ -111,6 +124,10 @@ def __init__( if dispatched is False: self.dispatched = False self.would_deactivate = tuple(would_deactivate) + self.would_revoke = tuple(would_revoke) + self.delivery_config_id = delivery_config_id + self.account_id = account_id + self.nearest = tuple(nearest) self.readback = readback diff --git a/src/adcp/reporting/subscriptions/coverage.py b/src/adcp/reporting/subscriptions/coverage.py index 8d376204a..0d64300df 100644 --- a/src/adcp/reporting/subscriptions/coverage.py +++ b/src/adcp/reporting/subscriptions/coverage.py @@ -52,7 +52,13 @@ from typing import Any from adcp.reporting._reconcile import ExpectedReportingPeriod -from adcp.reporting.subscriptions._clock import PeriodCalendar, iso_z, require_zone, utc_instant +from adcp.reporting.subscriptions._clock import ( + CoverageInputError, + PeriodCalendar, + iso_z, + require_zone, + utc_instant, +) from adcp.reporting.subscriptions.resolution import ( SubscriptionOffering, SubscriptionSelector, @@ -80,7 +86,7 @@ def _instant(value: Any, *, field: str) -> datetime | None: def _require_instant(value: Any, *, field: str) -> datetime: instant = _instant(value, field=field) if instant is None: - raise ValueError(f"{field} is required") + raise CoverageInputError("invalid_input", f"{field} is required") return instant @@ -156,7 +162,7 @@ class SubscriptionBuy: def __post_init__(self) -> None: if not self.media_buy_id: - raise ValueError("media_buy_id is required") + raise CoverageInputError("invalid_input", "media_buy_id is required") for name in ("confirmed_at", "start_time", "end_time", "canceled_at", "completed_at"): value = getattr(self, name) if value is not None: @@ -224,7 +230,9 @@ def __post_init__(self) -> None: utc_instant(self.unauthorized_at, field="unauthorized_at"), ) if self.unauthorized_at <= self.authorized_at: - raise ValueError("unauthorized_at must be after authorized_at") + raise CoverageInputError( + "invalid_input", "unauthorized_at must be after authorized_at" + ) @dataclass(frozen=True) @@ -257,7 +265,8 @@ class SubscriptionException: from_: datetime until: datetime | None = None media_buy_id: str | None = None - #: A ``gaps[]`` entry for one offering's boundaries; ``None`` is every offering. + #: An entry for one offering's boundaries (``excluded[]`` or ``gaps[]`` + #: ``offering_id``); ``None`` is every offering. offering_id: str | None = None def __post_init__(self) -> None: @@ -293,14 +302,21 @@ def subscription_exceptions( continue reason = _text(_value(entry, "reason")) if reason not in _REASONS: - raise ValueError(f"unknown subscription exclusion reason {reason!r}") + raise CoverageInputError( + "invalid_input", f"unknown subscription exclusion reason {reason!r}" + ) media_buy_id = _value(entry, "media_buy_id") + offering_id = _value(entry, "offering_id") result.append( SubscriptionException( reason=reason, from_=_require_instant(_value(entry, "from", _value(entry, "from_")), field="from"), until=_instant(_value(entry, "until"), field="until"), media_buy_id=None if media_buy_id is None else _text(media_buy_id), + # An offering-scoped entry (for example capacity under match + # "all" across offerings with different boundaries) removes + # only that offering's periods. + offering_id=None if offering_id is None else _text(offering_id), ) ) for gap in gaps: @@ -342,14 +358,18 @@ def __post_init__(self) -> None: if self.ends_at is not None: object.__setattr__(self, "ends_at", utc_instant(self.ends_at, field="ends_at")) if self.ends_at < self.accepted_at: - raise ValueError("a version cannot end before it was accepted") + raise CoverageInputError( + "invalid_input", "a version cannot end before it was accepted" + ) intervals = [] for start, until in self.inactive_intervals: start = utc_instant(start, field="inactive_intervals.from") if until is not None: until = utc_instant(until, field="inactive_intervals.until") if until <= start: - raise ValueError("an inactive interval must end after it starts") + raise CoverageInputError( + "invalid_input", "an inactive interval must end after it starts" + ) intervals.append((start, until)) object.__setattr__(self, "inactive_intervals", tuple(intervals)) @@ -386,11 +406,15 @@ def subscription_version_windows( current_version = int(_value(subscription, "subscription_version")) current_configuration = _value(subscription, "configuration") if current_configuration is None: - raise ValueError("subscription state has no configuration") + raise CoverageInputError( + "missing_version_configuration", "subscription state has no configuration" + ) state = _text(_value(subscription, "state", "active")) deactivated_at = _instant(_value(subscription, "deactivated_at"), field="deactivated_at") if state == "inactive" and deactivated_at is None: - raise ValueError("an inactive subscription must carry deactivated_at") + raise CoverageInputError( + "invalid_input", "an inactive subscription must carry deactivated_at" + ) accepted_at = _require_instant(_value(subscription, "accepted_at"), field="accepted_at") windows = [ SubscriptionVersionWindow( @@ -409,8 +433,9 @@ def subscription_version_windows( configuration = configurations.get(version, _value(prior, "configuration")) if configuration is None: if require_prior_configurations: - raise ValueError( - f"no configuration is known for prior subscription_version {version}" + raise CoverageInputError( + "missing_version_configuration", + f"no configuration is known for prior subscription_version {version}", ) configuration = current_configuration windows.append( @@ -435,9 +460,13 @@ def subscription_version_windows( windows.sort(key=lambda item: (item.accepted_at, item.subscription_version)) for earlier, later in zip(windows, windows[1:]): if earlier.subscription_version >= later.subscription_version: - raise ValueError("subscription versions must increase with accepted_at") + raise CoverageInputError( + "invalid_input", "subscription versions must increase with accepted_at" + ) if earlier.ends_at != later.accepted_at: - raise ValueError("superseded_at must equal the next version's accepted_at") + raise CoverageInputError( + "invalid_input", "superseded_at must equal the next version's accepted_at" + ) return tuple(windows) @@ -553,7 +582,7 @@ def _chains( previous_end: datetime | None = None for index, grant in enumerate(authorizations): if index > 0 and previous_end is None: - raise ValueError("only the last grant may be unrevoked") + raise CoverageInputError("invalid_input", "only the last grant may be unrevoked") if chains and previous_end is not None and grant.authorized_at <= previous_end: # adcp#8585 keeps authorized_at at the chain start after a re-grant # inside retention, so a grant listed with it continues the chain @@ -562,7 +591,10 @@ def _chains( chains[-1].end = None elif chains and previous_end is not None: if retention is None: - raise ValueError("status_retention_days is required to evaluate a re-grant") + raise CoverageInputError( + "missing_status_retention_days", + "status_retention_days is required to evaluate a re-grant", + ) if grant.authorized_at < previous_end + retention: chains[-1].interruptions.append((previous_end, grant.authorized_at)) chains[-1].end = None @@ -650,7 +682,9 @@ def _windows( if later.subscription_version <= earlier.subscription_version or ( earlier.ends_at != later.accepted_at ): - raise ValueError("versions must be ordered and each superseded at the next") + raise CoverageInputError( + "invalid_input", "versions must be ordered and each superseded at the next" + ) return windows return subscription_version_windows(subscription, version_configurations=version_configurations) @@ -736,19 +770,20 @@ def expected_subscription_periods( require_zone(change.timezone, field="timezone_cutovers.timezone") for change in changes: if change.previous_timezone is None: - raise ValueError( + raise CoverageInputError( + "missing_previous_timezone", "a timezone change needs previous_timezone: the account's current timezone " - "already shows the new zone" + "already shows the new zone", ) require_zone(change.previous_timezone, field="timezone_cutovers.previous_timezone") changes.sort(key=lambda item: item.changed_at) removals = subscription_exceptions(excluded, gap_entries) ids = [item.offering_id for item in offerings] if len(set(ids)) != len(ids): - raise ValueError("offering_id values must be unique") + raise CoverageInputError("invalid_input", "offering_id values must be unique") buy_ids = [item.media_buy_id for item in buys] if len(set(buy_ids)) != len(buy_ids): - raise ValueError("media_buy_id values must be unique") + raise CoverageInputError("invalid_input", "media_buy_id values must be unique") points: set[datetime] = set() for window in windows: @@ -896,9 +931,10 @@ def _regimes( destination = window.destination if destination is None and selector.destination_id is not None: if destinations is None or selector.destination_id not in destinations: - raise ValueError( + raise CoverageInputError( + "missing_destination_method", f"version {window.subscription_version} names destination " - f"{selector.destination_id!r}; pass its pattern and transport" + f"{selector.destination_id!r}; pass its pattern and transport", ) destination = destinations[selector.destination_id] found: dict[str, SubscriptionOffering] = {} @@ -988,7 +1024,7 @@ def _subscription_id(subscription: Any, windows: Sequence[SubscriptionVersionWin configuration = configuration.model_dump(mode="json", exclude_none=True) value = _value(configuration, "subscription_id") if value is None: - raise ValueError("subscription_id is required") + raise CoverageInputError("invalid_input", "subscription_id is required") return _text(value) diff --git a/src/adcp/reporting/subscriptions/facade.py b/src/adcp/reporting/subscriptions/facade.py index a019f48a5..1fc63950d 100644 --- a/src/adcp/reporting/subscriptions/facade.py +++ b/src/adcp/reporting/subscriptions/facade.py @@ -189,6 +189,7 @@ def check_complete_set( "Omitting a destination revokes it for every account. Pass " "allow_revocation=True.", "DESTINATION_WOULD_REVOKE", + would_revoke=revoked, ) @@ -536,28 +537,28 @@ async def _check_seller( ): raise _refused( f"subscription_id {subscription_id!r} is already a delivery_config_id " - f"on account {_value(account, 'account_id')!r}. Choose another " - "subscription_id.", + f"on account {_value(account, 'account_id')!r}. Choose a " + "subscription_id that no account-level delivery config uses.", "SUBSCRIPTION_ID_CLASH", + delivery_config_id=subscription_id, + account_id=_text(_value(account, "account_id")), ) scope = wanted.get("scope") or {} + # error-codes.json: an all_authorized_accounts subscription that names + # a destination and no operator_domains follows every account the + # principal is granted, including another operator's, into it. if ( scope.get("all_authorized_accounts") is True + and destination is not None and not wanted.get("operator_domains") and not acknowledge_cross_operator ): - operators = { - _text(_value(_value(account, "operator"), "domain", _value(account, "operator"))) - for account in accounts or () - if _value(account, "operator") is not None - } - if len(operators) > 1 or (destination or {}).get("operator_id"): - raise _refused( - "An all-accounts subscription follows every grant, including accounts " - "another operator grants later, into one destination. Add " - "operator_domains, or pass acknowledge_cross_operator=True.", - "SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED", - ) + raise _refused( + "An all-accounts subscription follows every grant, including accounts " + "another operator grants later, into one destination. Add " + "operator_domains, or pass acknowledge_cross_operator=True.", + "SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED", + ) return await self._resolve_selector(wanted, destination) async def _roster(self) -> list[Any] | None: @@ -623,13 +624,18 @@ async def _resolve_selector( if resolution.offering_ids: return resolution.offering_ids selector = wanted.get("selector") or {} - nearest = ", ".join( - f"{o.offering_id} ({_mismatch(o, selector, wanted)})" for o in offerings[:5] + failing = sorted( + ((o.offering_id, _mismatches(o, selector, wanted, destination)) for o in offerings), + key=lambda item: (len(item[1]), item[0].encode()), ) + fewest = len(failing[0][1]) if failing else 0 + nearest = tuple(item for item in failing if len(item[1]) == fewest)[:5] + listed = ", ".join(f"{offering_id} ({', '.join(fails)})" for offering_id, fails in nearest) raise _refused( - f"No advertised offering matches this selector. Nearest: {nearest}. Adjust the " - "selector to an offering the seller advertises.", + f"No advertised offering matches this selector. Nearest: {listed}. Change the " + "selector; the nearest offerings and the attributes each one failed are listed.", "SUBSCRIPTION_SELECTOR_UNMATCHED", + nearest=nearest, ) # -- the guarded write --------------------------------------------------------------- @@ -794,20 +800,33 @@ def result( return SubscribeResult(self.action, state, self.version, destination, readback) -def _mismatch(offering: Any, selector: Mapping[str, Any], wanted: Mapping[str, Any]) -> str: - """The first selector attribute an offering fails, for SUBSCRIPTION_SELECTOR_UNMATCHED.""" +def _mismatches( + offering: Any, + selector: Mapping[str, Any], + wanted: Mapping[str, Any], + destination: Mapping[str, Any] | None, +) -> tuple[str, ...]: + """Every selector attribute an offering fails, for SUBSCRIPTION_SELECTOR_UNMATCHED.""" + failed: list[str] = [] if offering.feed_purpose != selector.get("feed_purpose"): - return f"feed_purpose {offering.feed_purpose}" + failed.append("feed_purpose") if offering.period_duration != selector.get("period_duration"): - return f"period_duration {offering.period_duration}" - if selector.get("required_finality") not in offering.supported_finality: - return f"finality {'/'.join(sorted(offering.supported_finality))}" + failed.append("period_duration") if offering.reconciliation_mode != wanted.get("reconciliation_mode", "delivery_only"): - return f"reconciliation_mode {offering.reconciliation_mode}" + failed.append("reconciliation_mode") + if selector.get("required_finality") not in offering.supported_finality: + failed.append("required_finality") + if selector.get("alignment") is not None and offering.alignment != selector.get("alignment"): + failed.append("alignment") + pattern = None if destination is None else destination.get("pattern") + if offering.method_pattern != pattern or ( + destination is not None and offering.method_transport != destination.get("transport") + ): + failed.append("destination method") wanted_dimensions = set(selector.get("dimensions") or ()) if not wanted_dimensions <= set(offering.dimensions): - return f"dimensions {'/'.join(sorted(offering.dimensions))}" - return "destination method" + failed.append("dimensions") + return tuple(failed) __all__ = [ diff --git a/src/adcp/reporting/subscriptions/resolution.py b/src/adcp/reporting/subscriptions/resolution.py index c02513c51..8552cce4c 100644 --- a/src/adcp/reporting/subscriptions/resolution.py +++ b/src/adcp/reporting/subscriptions/resolution.py @@ -31,6 +31,7 @@ from typing import Any, Literal from adcp.reporting.subscriptions._clock import ( + CoverageInputError, PeriodCalendar, parse_delivery_sla, parse_period_duration, @@ -111,7 +112,9 @@ def __post_init__(self) -> None: if not self.offering_id: raise ValueError("offering_id is required") if self.alignment not in _ALIGNMENTS: - raise ValueError(f"unknown schedule alignment {self.alignment!r}") + raise CoverageInputError( + "invalid_input", f"unknown schedule alignment {self.alignment!r}" + ) # Refuse what the shared calendar cannot derive, up front rather than # mid-evaluation: a delivery_sla with years or months, or an invalid # duration. @@ -168,8 +171,10 @@ def from_offering( if "standard_dimensions" not in offering: # adcp#8585: sellers advertising subscriptions MUST publish it, # and matching never guesses a breakdown. - raise ValueError( - f"offering {offering.get('offering_id')!r} has no standard_dimensions" + raise CoverageInputError( + "missing_standard_dimensions", + f"offering {offering.get('offering_id')!r} has no standard_dimensions. " + "The seller must publish standard_dimensions on every offering.", ) dimensions = tuple(offering["standard_dimensions"] or ()) schedule = offering["schedule"] @@ -260,21 +265,25 @@ def zone(self, account_timezone: str | None, period_timezone: str | None = None) if self.alignment == "account_timezone": zone = period_timezone or account_timezone if zone is None: - raise ValueError( + raise CoverageInputError( + "missing_account_timezone", f"offering {self.offering_id!r} is account_timezone aligned; " - "the account timezone is required" + "supply the account timezone (list_accounts timezone).", ) return zone if self.alignment == "source_timezone": zone = self.period_timezone if zone is None: - raise ValueError( + raise CoverageInputError( + "missing_source_timezone", f"offering {self.offering_id!r} resolves its source timezone per account; " - "pass the resolved zone as period_timezone" + "pass the resolved zone as period_timezone.", ) return zone if self.period_timezone is None: - raise ValueError(f"offering {self.offering_id!r} has no period_timezone") + raise CoverageInputError( + "missing_source_timezone", f"offering {self.offering_id!r} has no period_timezone" + ) return self.period_timezone def calendar( @@ -343,6 +352,8 @@ def from_subscription(cls, subscription: Any) -> SubscriptionSelector: dimensions = ( None if raw_dimensions is None else frozenset(_text(item) for item in raw_dimensions) ) + # core/reporting-schedule.json period_duration: no W designator (P7D). + parse_period_duration(_text(_value(selector, "period_duration"))) raw_match = _value(selector, "match") match: str = ( _text(raw_match) diff --git a/src/adcp/reporting/subscriptions/vocabulary.py b/src/adcp/reporting/subscriptions/vocabulary.py new file mode 100644 index 000000000..749c56bc1 --- /dev/null +++ b/src/adcp/reporting/subscriptions/vocabulary.py @@ -0,0 +1,58 @@ +"""Frozen reporting-subscription vocabularies from the spec (adcp#8616). + +``reason-codes.json`` and ``error-codes.json`` in +``static/compliance/source/test-vectors/reporting-subscriptions/`` freeze why a +period is or is not owed and the error codes SDKs raise. Both SDKs use them +verbatim, so a buyer's and a seller's explanation of the same period, and +their errors, compare by code. Renaming or removing a code needs a new +``vocabulary_version``. +""" + +from __future__ import annotations + +from collections.abc import Mapping + +#: The spec vocabulary these constants mirror. +COVERAGE_VOCABULARY_VERSION = 1 + +#: Rules in evaluation order: a period takes the reason of the first rule that rejects it. +COVERAGE_RULE_ORDER: tuple[str, ...] = ( + "scope", + "authorization", + "version", + "activity", + "offering", + "flight", + "confirmation", + "exception", + "gap", + "cutover", + "timezone", +) + +#: Every coverage reason code and the rule that assigns it; ``None`` for the +#: outcome codes a period takes when no rule rejects it. +COVERAGE_REASON_CODES: Mapping[str, str | None] = { + "not_in_scope": "scope", + "excluded:excluded_by_buyer": "scope", + "not_authorized": "authorization", + "before_coverage_start": "version", + "subscription_inactive": "activity", + "excluded:offering_unsupported": "offering", + "outside_flight": "flight", + "after_stop": "flight", + "before_confirmation": "confirmation", + "excluded:capacity": "exception", + "excluded:overridden": "exception", + "excluded:action_required": "exception", + "gap:unauthorized": "gap", + "cutover_stretch": "cutover", + "owed_under_other_version": "cutover", + "period_not_ended": None, + "owed": None, + "owed:regrant_backfill": None, + "owed:withheld": None, + "buy_not_visible": "scope", +} + +__all__ = ["COVERAGE_REASON_CODES", "COVERAGE_RULE_ORDER", "COVERAGE_VOCABULARY_VERSION"] diff --git a/tests/fixtures/reporting_subscriptions/coverage-cases.json b/tests/fixtures/reporting_subscriptions/coverage-cases.json deleted file mode 100644 index 34e0a2eab..000000000 --- a/tests/fixtures/reporting_subscriptions/coverage-cases.json +++ /dev/null @@ -1,13632 +0,0 @@ -{ - "$source": "adcontextprotocol/adcp-client@f8b48c0c8594944dd367b774585f685a47380d57:test/fixtures/reporting-subscriptions/coverage-cases.json (PR #3505)", - "$comment": "Cross-SDK parity table for expectedSubscriptionPeriods (AdCP 3.3 media_buy.reporting_subscriptions), conforming to adcontextprotocol/adcp#8585, #8588 (sub-daily local periods) and #8593 (the start bound is the later of accepted_at and authorized_at; a buy is owed every period ending after its confirmed_at). Each case gives expected_obligations (the rows grouped by version, offering and period, with byte-sorted media_buy_ids) and, where the input needs data no AdCP response carries, non_wire_inputs. Each case gives the input and the exact owed periods (or expected_error). Compare instants, not strings: the TypeScript SDK emits toISOString() form. Expected rows are hand-derived from the spec rule. subscription_id, account_id and report_definition_id are omitted from expected rows; they are input.subscription_id, input.account.account_id and the offering's report_definition_id. Rows are ordered by period_start, subscription_version, offering_id and media_buy_id (byte order).", - "cases": [ - { - "name": "baseline", - "rule": "adcp#8593: the start bound is the first boundary at or after max(accepted_at 11-01T12, authorized_at 10-01) = 11-02; owed are the periods from it that end after confirmed_at 11-02T15 and overlap the flight (11-03 on), through the period containing the stop time.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "mid-period confirmed_at", - "rule": "adcp#8593: confirmed_at 11-03T10 falls inside the first flight day. That period ends after confirmed_at, so it is owed in full; confirmed_at no longer moves the start to the next boundary.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-03T10:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "confirmed long before the flight", - "rule": "A buy confirmed before accepted_at with a later start owes nothing before start_time.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-10-20T00:00:00Z", - "start_time": "2026-11-10T00:00:00Z", - "end_time": "2026-11-12T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-10T00:00:00Z", - "period_end": "2026-11-11T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-11T00:00:00Z", - "period_end": "2026-11-12T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-10T00:00:00Z", - "period_end": "2026-11-11T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-11T00:00:00Z", - "period_end": "2026-11-12T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "stop time mid-period is owed in full", - "rule": "end_time 11-05T12 is inside the 11-05 period, which is owed in full: periods are never clipped.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-05T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "cancellation mid-flight", - "rule": "canceled_at 11-05T06 is the stop time (earlier than end_time 11-10); its period is owed and none after.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-10T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ], - "canceled_at": "2026-11-05T06:00:00Z" - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "early completion on a boundary", - "rule": "completed_at 11-04T00 stops the flight on a boundary: the 11-04 period does not overlap [start, stop).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-10T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ], - "completed_at": "2026-11-04T00:00:00Z" - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "flight extension adds only unresolved periods", - "rule": "end_time moved 11-06 -> 11-08 at 11-07T12. The 11-06 period resolved at 11-07T00 under the old end_time and is never owed retroactively; 11-07 resolves after the extension.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ], - "prior_flights": [ - { - "replaced_at": "2026-11-07T12:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z" - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ], - "non_wire_inputs": [ - "buys[].prior_flights" - ] - }, - { - "name": "reinstatement after cancellation", - "rule": "Canceled at 11-04T12, reinstated at 11-06T12. 11-05 resolved while canceled and stays unowed; 11-06 onward resolve after reinstatement.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ], - "prior_flights": [ - { - "replaced_at": "2026-11-06T12:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "canceled_at": "2026-11-04T12:00:00Z" - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ], - "non_wire_inputs": [ - "buys[].prior_flights" - ] - }, - { - "name": "only resolved periods are returned", - "rule": "With now at 11-05T12, the 11-05 period has not ended.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-11-05T12:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "unconfirmed buy", - "rule": "A buy with confirmed_at null is not covered.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": null, - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "late authorization (authorized_at refinement)", - "rule": "authorized_at 11-04T10 is the latest of the three start terms: coverage starts at 11-05.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-11-04T10:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "new subscription version, aligned schedules", - "rule": "v2 accepted 11-04T12. v1 owes periods starting before T in full (11-03, 11-04); E = 11-05 and v2 owes from there. Contiguous, nothing twice.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-04T12:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-04T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "exclude_account_ids": [ - "acct_other" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "new subscription version, misaligned boundaries", - "rule": "v1 resolves a UTC day offering, v2 (alignment account_timezone) a New York day offering. v1 owes UTC days starting before 11-04T12 (E = 11-05T00Z); v2 owes New York days starting at or after E, the first being 11-05T05Z. 11-05T00Z-05Z is owed under neither.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-04T12:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-04T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T05:00:00Z", - "period_end": "2026-11-07T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T05:00:00Z", - "period_end": "2026-11-07T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "deactivation", - "rule": "deactivated_at 11-04T12: the 11-04 period started before it and stays owed in full; nothing later.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": false, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "deactivated_at": "2026-11-04T12:00:00Z" - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "deactivation then reactivation in place", - "rule": "Readback inactive_intervals [11-04T12, 11-06T12): a cutover out at 11-04T12 and a fresh start at the first boundary at or after 11-06T12 (11-07).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-09T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "inactive_intervals": [ - { - "deactivated_at": "2026-11-04T12:00:00Z", - "reactivated_at": "2026-11-06T12:00:00Z" - } - ] - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "account new in a later version", - "rule": "v1 names another account; v2 (all accounts, accepted 11-04T12) brings acct_1 in under the ordinary start rule: 11-05.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_other" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-04T12:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-04T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "excluded_by_buyer scope", - "rule": "An all-accounts subscription that lists the account in exclude_account_ids covers nothing for it.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "exclude_account_ids": [ - "acct_1" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "operator_domains scope", - "rule": "operator_domains keeps only accounts whose operator is listed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "operator_domains": [ - "agency.example" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ], - "operator": "other-agency.example" - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "revocation", - "rule": "unauthorized_at 11-05T06: periods starting at or after the last boundary at or before it (11-05) are not owed. 11-03 and 11-04 ended before it and stay owed (withheld until re-grant if undelivered).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-05T06:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant without backfill", - "rule": "Re-granted 11-06T18 within status_retention_days: the gap [11-05, 11-07) is not owed; coverage resumes at 11-07 and the earlier periods stay owed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-05T06:00:00Z" - }, - { - "authorized_at": "2026-11-06T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 30 - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant with backfill_on_regrant", - "rule": "With backfill_on_regrant no gap is recorded and every period in the revoked interval stays owed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-05T06:00:00Z" - }, - { - "authorized_at": "2026-11-06T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 30, - "backfill_on_regrant": true - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant after the unauthorized entry expired", - "rule": "status_retention_days 1: the entry expired at 11-06T06, so the 11-06T18 re-grant is a fresh start from authorized_at (11-07) and backfill does not apply.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-05T06:00:00Z" - }, - { - "authorized_at": "2026-11-06T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 1, - "backfill_on_regrant": true - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "seller gaps also remove periods", - "rule": "A gaps[] entry the seller published removes the periods starting in [from, until), like an exception.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "gaps": [ - { - "from": "2026-11-04T00:00:00Z", - "until": "2026-11-05T00:00:00Z", - "reason": "unauthorized" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "exceptions only remove periods", - "rule": "Account-level capacity [11-04, 11-06) removes 11-04 and 11-05 for every buy; a buy-level offering_unsupported removes mb_2 from 11-03; a package_ids entry removes packages, not periods; an exception before coverage adds nothing.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - }, - { - "media_buy_id": "mb_2", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "excluded": [ - { - "reason": "capacity", - "from": "2026-11-04T00:00:00Z", - "until": "2026-11-06T00:00:00Z" - }, - { - "reason": "offering_unsupported", - "media_buy_id": "mb_2", - "from": "2026-11-03T00:00:00Z" - }, - { - "reason": "offering_unsupported", - "media_buy_id": "mb_1", - "package_ids": [ - "pkg_9" - ], - "from": "2026-11-03T00:00:00Z" - }, - { - "reason": "excluded_by_buyer", - "from": "2026-10-01T00:00:00Z", - "until": "2026-10-05T00:00:00Z" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "max_accounts capacity exception", - "rule": "Beyond subscriptions.max_accounts the seller records an open account-level capacity exception; nothing is owed from its from.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "excluded": [ - { - "reason": "capacity", - "from": "2026-11-04T00:00:00Z" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "precedence over an account-level configuration", - "rule": "The caller's own sync_accounts configuration takes the account from 11-04 to 11-05 (overridden), after which replace_account_configs hands it back.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "excluded": [ - { - "reason": "overridden", - "from": "2026-11-04T00:00:00Z", - "until": "2026-11-05T00:00:00Z", - "overridden_by": { - "delivery_config_id": "acme-analytics" - } - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match exact (default with dimensions)", - "rule": "exact [package] picks the offering whose dimension set equals it; package x device (unmapped device) is distinct.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match exact with no equal offering", - "rule": "exact [package] against package x creative, package x country and package x device (unmapped) resolves nothing: offering_unsupported, no periods.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "match exact on two dimensions", - "rule": "exact [package, country] picks package x country.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package", - "country" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match finest", - "rule": "finest [package] picks the most mapped dimensions among offerings including package; package x creative and package x country tie at two, so the lowest offering_id in byte order wins.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "finest" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match defaults to finest without dimensions", - "rule": "No dimensions: match defaults to finest over every candidate.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match all", - "rule": "all [package] picks every offering including package, each owed its own periods (package x device included: it includes package).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "all" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_c_pkg_country", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_d_pkg_device", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "product eligibility gates candidates", - "rule": "Only offerings in the product's reporting_delivery_offering_ids are candidates; a package with none leaves the buy covered by its other packages.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - }, - { - "package_id": "pkg_2", - "reporting_delivery_offering_ids": [] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "finality, purpose and duration must match", - "rule": "An offering advertising only snapshot finality, another feed_purpose, or another period_duration is never a candidate.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg", - "off_c_pkg", - "off_d_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "snapshot" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg", - "feed_purpose": "pacing", - "report_definition_id": "rd_off_b_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_c_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT1H", - "alignment": "utc", - "delivery_sla": "PT1H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_d_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_d_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_d_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_d_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_d_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "resolution change is a cutover", - "rule": "finest [package]: package x creative becomes available at 11-04T12, changing the resolution. The old offering owes periods starting before it (11-03, 11-04); the new one owes from E = 11-05.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "finest" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ], - "available_from": "2026-11-04T12:00:00Z" - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ], - "non_wire_inputs": [ - "offerings[].available_from/withdrawn_at" - ] - }, - { - "name": "account timezone", - "rule": "An account_timezone offering uses New York midnights (05:00Z in November). accepted_at 11-01T12Z: first boundary 11-02T05Z. The 11-02T05Z day contains confirmed_at 11-02T15Z and overlaps the flight from 11-03T00Z, so it is owed (adcp#8593).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "account timezone across a DST change", - "rule": "New York falls back on 2026-11-01: the 11-01 local day is 25 hours, 04:00Z to 05:00Z the next day.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-10-30T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-10-30T00:00:00Z", - "start_time": "2026-10-31T12:00:00Z", - "end_time": "2026-11-02T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-10-31T04:00:00Z", - "period_end": "2026-11-01T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-11-02T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-10-31T04:00:00Z", - "period_end": "2026-11-01T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-11-02T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "account timezone change is a cutover", - "rule": "The account moves to Los Angeles (account.timezone is the current zone); timezone_cutovers.effective_at 11-05T05Z is E and previous_timezone New York governs before it. New York days starting before E are owed, then Los Angeles days from the first boundary at or after it (11-05T08Z). 05Z-08Z is owed under neither.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/Los_Angeles", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T05:00:00Z", - "end_time": "2026-11-08T08:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "timezone_cutovers": [ - { - "effective_at": "2026-11-05T05:00:00Z", - "timezone": "America/Los_Angeles", - "previous_timezone": "America/New_York" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T08:00:00Z", - "period_end": "2026-11-07T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T08:00:00Z", - "period_end": "2026-11-08T08:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T08:00:00Z", - "period_end": "2026-11-07T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T08:00:00Z", - "period_end": "2026-11-08T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "period_timezone override", - "rule": "A single-account subscription with period_timezone Asia/Tokyo uses Tokyo midnights (15:00Z). confirmed_at 11-02T15Z is itself a boundary, so the period ending at it is not owed and the one starting at it is.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone", - "period_timezone": "Asia/Tokyo" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-05T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T15:00:00Z", - "period_end": "2026-11-03T15:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T15:00:00Z", - "period_end": "2026-11-04T15:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T15:00:00Z", - "period_end": "2026-11-05T15:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T15:00:00Z", - "period_end": "2026-11-03T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T15:00:00Z", - "period_end": "2026-11-04T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T15:00:00Z", - "period_end": "2026-11-05T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "hourly periods are never clipped", - "rule": "Flight 10:30-13:15, confirmed 10:20: the 10:00 period ends after confirmed_at and overlaps the flight, so it is owed in full (adcp#8593), and the 13:00 period containing the stop is owed in full.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "pacing", - "period_duration": "PT1H", - "required_finality": "snapshot", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-03T10:20:00Z", - "start_time": "2026-11-03T10:30:00Z", - "end_time": "2026-11-03T13:15:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_h_pkg_hourly" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_h_pkg_hourly", - "feed_purpose": "pacing", - "report_definition_id": "rd_off_h_pkg_hourly", - "report_definition_uri": "https://seller.example/report-definitions/off_h_pkg_hourly.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT1H", - "alignment": "utc", - "delivery_sla": "PT1H" - }, - "supported_finality": [ - "snapshot" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T10:00:00Z", - "period_end": "2026-11-03T11:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T11:00:00Z", - "period_end": "2026-11-03T12:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T12:00:00Z", - "period_end": "2026-11-03T13:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T13:00:00Z", - "period_end": "2026-11-03T14:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T10:00:00Z", - "period_end": "2026-11-03T11:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T11:00:00Z", - "period_end": "2026-11-03T12:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T12:00:00Z", - "period_end": "2026-11-03T13:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_h_pkg_hourly", - "period_start": "2026-11-03T13:00:00Z", - "period_end": "2026-11-03T14:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "monthly billing cycle", - "rule": "A fixed billing_cycle anchored at New York midnight: month boundaries move between 04:00Z (EDT) and 05:00Z (EST). The month containing the stop is owed in full.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-10-15T00:00:00Z", - "destination_method": { - "pattern": "file_transfer", - "transport": "s3" - }, - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "billing", - "period_duration": "P1M", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "consumer_receipt", - "destination": { - "destination_id": "billing-archive" - } - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-10-20T00:00:00Z", - "start_time": "2026-11-10T00:00:00Z", - "end_time": "2027-01-15T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_m_billing_monthly" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_m_billing_monthly", - "feed_purpose": "billing", - "report_definition_id": "rd_off_m_billing_monthly", - "report_definition_uri": "https://seller.example/report-definitions/off_m_billing_monthly.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1M", - "alignment": "billing_cycle", - "delivery_sla": "P5D", - "period_anchor_policy": "fixed", - "period_anchor": "2026-01-01T05:00:00Z", - "period_timezone": "America/New_York" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "consumer_receipt", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "s3", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - } - ], - "now": "2027-03-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-12-01T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2026-12-01T05:00:00Z", - "period_end": "2027-01-01T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2027-01-01T05:00:00Z", - "period_end": "2027-02-01T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-12-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2026-12-01T05:00:00Z", - "period_end": "2027-01-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2027-01-01T05:00:00Z", - "period_end": "2027-02-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "ASAP buy confirmed mid-day owes the confirmation day", - "rule": "adcp#8593: an ASAP buy starts when it is confirmed, 11-03T14:30Z. The 11-03 period ends after confirmed_at and overlaps the flight, so it is owed in full.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-03T14:30:00Z", - "start_time": "2026-11-03T14:30:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "monthly billing buy confirmed on the 12th owes that month", - "rule": "adcp#8593: the version was accepted 10-15, so the start bound is the November boundary (11-01T04Z). The buy is confirmed and starts on 11-12; the November month ends after confirmed_at and overlaps the flight, so it is owed in full rather than starting in December.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-10-15T00:00:00Z", - "destination_method": { - "pattern": "file_transfer", - "transport": "s3" - }, - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "billing", - "period_duration": "P1M", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "consumer_receipt", - "destination": { - "destination_id": "billing-archive" - } - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-12T15:00:00Z", - "start_time": "2026-11-12T15:00:00Z", - "end_time": "2027-01-15T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_m_billing_monthly" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_m_billing_monthly", - "feed_purpose": "billing", - "report_definition_id": "rd_off_m_billing_monthly", - "report_definition_uri": "https://seller.example/report-definitions/off_m_billing_monthly.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1M", - "alignment": "billing_cycle", - "delivery_sla": "P5D", - "period_anchor_policy": "fixed", - "period_anchor": "2026-01-01T05:00:00Z", - "period_timezone": "America/New_York" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "consumer_receipt", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "s3", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - } - ], - "now": "2027-03-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-12-01T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2026-12-01T05:00:00Z", - "period_end": "2027-01-01T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m_billing_monthly", - "period_start": "2027-01-01T05:00:00Z", - "period_end": "2027-02-01T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-12-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2026-12-01T05:00:00Z", - "period_end": "2027-01-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m_billing_monthly", - "period_start": "2027-01-01T05:00:00Z", - "period_end": "2027-02-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "destination selects managed offerings only", - "rule": "With a destination only offerings whose method matches its pattern and transport are candidates; without one only Core (method-less) offerings are.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "destination": { - "destination_id": "archive", - "path_template": "a/{account_id}" - } - }, - "destination_method": { - "pattern": "file_transfer", - "transport": "gcs" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_s3_pkg", - "off_t_gcs_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_s3_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_s3_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_s3_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "s3", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - }, - { - "offering_id": "off_t_gcs_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_t_gcs_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_t_gcs_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "gcs", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_t_gcs_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "multiple buys group into obligations", - "rule": "Each (buy, offering) pair is owed its own periods; obligations group them by period with frozen media_buy_ids. mb_0, confirmed 11-03T12, is owed the 11-03 period it was confirmed in (adcp#8593).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - }, - { - "media_buy_id": "mb_0", - "confirmed_at": "2026-11-03T12:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-05T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_0", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_0", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_0", - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_0", - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "timezone cutover scoped to one offering", - "rule": "A timezone_cutovers entry with offering_id applies to that offering only; an offering with no applicable entry uses account.timezone (Los Angeles) throughout.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "all" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/Los_Angeles", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T08:00:00Z", - "end_time": "2026-11-06T08:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz", - "off_f_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_f_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_f_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_f_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "timezone_cutovers": [ - { - "offering_id": "off_e_pkg_acct_tz", - "effective_at": "2026-11-05T05:00:00Z", - "timezone": "America/Los_Angeles", - "previous_timezone": "America/New_York" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-03T08:00:00Z", - "period_end": "2026-11-04T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-04T08:00:00Z", - "period_end": "2026-11-05T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-03T08:00:00Z", - "period_end": "2026-11-04T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-04T08:00:00Z", - "period_end": "2026-11-05T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_f_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "gap scoped to one offering", - "rule": "A gaps[] entry with offering_id removes only that offering's periods; an entry without offering_id applies to every offering.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "all" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "gaps": [ - { - "offering_id": "off_a_pkg", - "from": "2026-11-04T00:00:00Z", - "until": "2026-11-05T00:00:00Z", - "reason": "unauthorized" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_b_pkg_creative", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match exact without dimensions", - "rule": "exact with no dimensions: every candidate qualifies and the lowest offering_id in byte order wins.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "match": "exact" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "period_timezone never matches an account-resolved source_timezone offering", - "rule": "A source_timezone offering matches a period_timezone override only when its published period_timezone equals it; an account_resolved offering publishes none.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "period_timezone": "America/New_York" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ], - "source_timezone": "America/New_York" - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_s_resolved" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_s_resolved", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_s_resolved", - "report_definition_uri": "https://seller.example/report-definitions/off_s_resolved.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "source_timezone", - "delivery_sla": "PT6H", - "period_timezone_policy": "account_resolved" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "period_timezone matches a fixed source_timezone offering in the same zone", - "rule": "A fixed source_timezone offering publishing America/New_York matches a New York override and keeps its own boundaries (05:00Z in November).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "period_timezone": "America/New_York" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-05T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_s_fixed" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_s_fixed", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_s_fixed", - "report_definition_uri": "https://seller.example/report-definitions/off_s_fixed.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "source_timezone", - "delivery_sla": "PT6H", - "period_timezone_policy": "fixed", - "period_timezone": "America/New_York" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_fixed", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_fixed", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_fixed", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_s_fixed", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_fixed", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_fixed", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "a utc offering matches only UTC or Etc/UTC", - "rule": "period_timezone GMT is not one of the UTC aliases core/reporting-subscription.json names, so the utc offering does not match.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "period_timezone": "GMT" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "empty flight: canceled before start_time", - "rule": "canceled_at 11-05T02 is before start_time 11-05T06: the flight [start, stop) is empty and overlaps nothing, though the 11-05 period contains both instants.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-05T06:00:00Z", - "end_time": "2026-11-10T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ], - "canceled_at": "2026-11-05T02:00:00Z" - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "empty flight: stop equal to start", - "rule": "A zero-length flight (end_time equal to start_time at 11-03T12) is empty and overlaps nothing.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T12:00:00Z", - "end_time": "2026-11-03T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "two cutovers inside one period", - "rule": "v2 (11-04T12Z) switches to a Tokyo period_timezone and v3 (11-04T13Z) changes nothing else. v1 owes its New York day starting 11-04T05Z, through 11-05T05Z. v2 owes from that E and starts nothing before 13Z. v3 must carry v2's own start forward: it owes Tokyo days from the first boundary at or after 11-05T05Z (11-05T15Z), never the overlapping 11-04T15Z.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "superseded_at": "2026-11-04T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-04T12:00:00Z", - "superseded_at": "2026-11-04T13:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone", - "period_timezone": "Asia/Tokyo" - }, - "reconciliation_mode": "delivery_only" - } - }, - { - "subscription_version": 3, - "accepted_at": "2026-11-04T13:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 3, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone", - "period_timezone": "Asia/Tokyo", - "match": "exact" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 3, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T15:00:00Z", - "period_end": "2026-11-06T15:00:00Z" - }, - { - "subscription_version": 3, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T15:00:00Z", - "period_end": "2026-11-07T15:00:00Z" - }, - { - "subscription_version": 3, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T15:00:00Z", - "period_end": "2026-11-08T15:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 3, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T15:00:00Z", - "period_end": "2026-11-06T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 3, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T15:00:00Z", - "period_end": "2026-11-07T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 3, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T15:00:00Z", - "period_end": "2026-11-08T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "simultaneous version and timezone change at the same T", - "rule": "v2 is accepted at 11-05T05Z, exactly the timezone cutover effective_at (a New York boundary). v1 owes New York days starting before it; v2 owes Los Angeles days from the first boundary at or after it (11-05T08Z).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-05T05:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only", - "exclude_account_ids": [ - "acct_other" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/Los_Angeles", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T08:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "timezone_cutovers": [ - { - "effective_at": "2026-11-05T05:00:00Z", - "timezone": "America/Los_Angeles", - "previous_timezone": "America/New_York" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T08:00:00Z", - "period_end": "2026-11-07T08:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T08:00:00Z", - "period_end": "2026-11-08T08:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-02T05:00:00Z", - "period_end": "2026-11-03T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-03T05:00:00Z", - "period_end": "2026-11-04T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-04T05:00:00Z", - "period_end": "2026-11-05T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T08:00:00Z", - "period_end": "2026-11-06T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T08:00:00Z", - "period_end": "2026-11-07T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-07T08:00:00Z", - "period_end": "2026-11-08T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "billing cycle anchored on the 31st clamps to month end", - "rule": "P1M from 2026-01-31 New York midnight: the 31st clamps to Feb 28 and returns to the 31st in March (a clamped February boundary does not shift the anchor day).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-01-15T00:00:00Z", - "destination_method": { - "pattern": "file_transfer", - "transport": "s3" - }, - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "billing", - "period_duration": "P1M", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "consumer_receipt", - "destination": { - "destination_id": "billing-archive" - } - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2025-12-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-01-20T00:00:00Z", - "start_time": "2026-02-10T00:00:00Z", - "end_time": "2026-04-15T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_m31" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_m31", - "feed_purpose": "billing", - "report_definition_id": "rd_off_m31", - "report_definition_uri": "https://seller.example/report-definitions/off_m31.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1M", - "alignment": "billing_cycle", - "delivery_sla": "P5D", - "period_anchor_policy": "fixed", - "period_anchor": "2026-01-31T05:00:00Z", - "period_timezone": "America/New_York" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "consumer_receipt", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "s3", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - } - ], - "now": "2026-06-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m31", - "period_start": "2026-01-31T05:00:00Z", - "period_end": "2026-02-28T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m31", - "period_start": "2026-02-28T05:00:00Z", - "period_end": "2026-03-31T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_m31", - "period_start": "2026-03-31T04:00:00Z", - "period_end": "2026-04-30T04:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_m31", - "period_start": "2026-01-31T05:00:00Z", - "period_end": "2026-02-28T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m31", - "period_start": "2026-02-28T05:00:00Z", - "period_end": "2026-03-31T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_m31", - "period_start": "2026-03-31T04:00:00Z", - "period_end": "2026-04-30T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "billing cycle anchored on February 29", - "rule": "P1Y from 2024-02-29T00:00Z: non-leap years clamp to Feb 28 and 2028 returns to Feb 29.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2025-12-01T00:00:00Z", - "destination_method": { - "pattern": "file_transfer", - "transport": "s3" - }, - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "account_ids": [ - "acct_1" - ] - }, - "selector": { - "feed_purpose": "billing", - "period_duration": "P1Y", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "consumer_receipt", - "destination": { - "destination_id": "billing-archive" - } - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2025-11-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2025-12-15T00:00:00Z", - "start_time": "2026-01-01T00:00:00Z", - "end_time": "2027-06-01T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_y29" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_y29", - "feed_purpose": "billing", - "report_definition_id": "rd_off_y29", - "report_definition_uri": "https://seller.example/report-definitions/off_y29.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1Y", - "alignment": "billing_cycle", - "delivery_sla": "P5D", - "period_anchor_policy": "fixed", - "period_anchor": "2024-02-29T00:00:00Z", - "period_timezone": "UTC" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "consumer_receipt", - "standard_dimensions": [ - "package" - ], - "method": { - "pattern": "file_transfer", - "transport": "s3", - "orchestration": "producer_managed", - "destination_modes": [ - "existing" - ], - "formats": [ - "jsonl" - ] - } - } - ], - "now": "2028-06-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_y29", - "period_start": "2026-02-28T00:00:00Z", - "period_end": "2027-02-28T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_y29", - "period_start": "2027-02-28T00:00:00Z", - "period_end": "2028-02-29T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_y29", - "period_start": "2026-02-28T00:00:00Z", - "period_end": "2027-02-28T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_y29", - "period_start": "2027-02-28T00:00:00Z", - "period_end": "2028-02-29T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "DST fold at midnight (America/Santiago)", - "rule": "Chile falls back at 24:00 on 2026-04-04 to 23:00, so April 4 is a 25-hour local day; local midnight April 5 occurs once, at 04:00Z.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-03-01T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/Santiago", - "grants": [ - { - "authorized_at": "2026-02-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-03-15T00:00:00Z", - "start_time": "2026-04-03T00:00:00Z", - "end_time": "2026-04-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_s_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_s_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_s_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_s_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-10-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-02T03:00:00Z", - "period_end": "2026-04-03T03:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-03T03:00:00Z", - "period_end": "2026-04-04T03:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-04T03:00:00Z", - "period_end": "2026-04-05T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-05T04:00:00Z", - "period_end": "2026-04-06T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-06T04:00:00Z", - "period_end": "2026-04-07T04:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-02T03:00:00Z", - "period_end": "2026-04-03T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-03T03:00:00Z", - "period_end": "2026-04-04T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-04T03:00:00Z", - "period_end": "2026-04-05T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-05T04:00:00Z", - "period_end": "2026-04-06T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-04-06T04:00:00Z", - "period_end": "2026-04-07T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "DST gap at midnight (America/Santiago)", - "rule": "Chile springs forward at 24:00 on 2026-09-05 to 01:00: local midnight September 6 does not exist and the boundary advances by the gap to 04:00Z, so September 6 is a 23-hour local day.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-03-01T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/Santiago", - "grants": [ - { - "authorized_at": "2026-02-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-03-15T00:00:00Z", - "start_time": "2026-09-05T12:00:00Z", - "end_time": "2026-09-07T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_s_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_s_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_s_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_s_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-10-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-05T04:00:00Z", - "period_end": "2026-09-06T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-06T04:00:00Z", - "period_end": "2026-09-07T03:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-07T03:00:00Z", - "period_end": "2026-09-08T03:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-05T04:00:00Z", - "period_end": "2026-09-06T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-06T04:00:00Z", - "period_end": "2026-09-07T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_s_pkg_acct_tz", - "period_start": "2026-09-07T03:00:00Z", - "period_end": "2026-09-08T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "zero-length period on a skipped civil date (Pacific/Apia)", - "rule": "Samoa skipped 2011-12-30: that local day has zero length (its midnight and the next coincide at 10:00Z) and is never owed; the surrounding days are.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2011-12-01T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "Pacific/Apia", - "grants": [ - { - "authorized_at": "2011-11-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2011-12-01T00:00:00Z", - "start_time": "2011-12-28T12:00:00Z", - "end_time": "2011-12-31T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2012-02-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-28T10:00:00Z", - "period_end": "2011-12-29T10:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-29T10:00:00Z", - "period_end": "2011-12-30T10:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-30T10:00:00Z", - "period_end": "2011-12-31T10:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-31T10:00:00Z", - "period_end": "2012-01-01T10:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-28T10:00:00Z", - "period_end": "2011-12-29T10:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-29T10:00:00Z", - "period_end": "2011-12-30T10:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-30T10:00:00Z", - "period_end": "2011-12-31T10:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2011-12-31T10:00:00Z", - "period_end": "2012-01-01T10:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "PT24H under a local alignment restarts at local midnight (#8588)", - "rule": "Under account_timezone a duration of only hours restarts at each local midnight (adcp#8588), so PT24H in New York across the 2026-03-08 spring-forward has a 23-hour period, exactly like P1D.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-03-01T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "PT24H", - "required_finality": "official", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-02-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-03-01T00:00:00Z", - "start_time": "2026-03-07T12:00:00Z", - "end_time": "2026-03-09T12:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_h24_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_h24_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_h24_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_h24_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT24H", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-04-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-07T05:00:00Z", - "period_end": "2026-03-08T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-08T05:00:00Z", - "period_end": "2026-03-09T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-09T04:00:00Z", - "period_end": "2026-03-10T04:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-07T05:00:00Z", - "period_end": "2026-03-08T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-08T05:00:00Z", - "period_end": "2026-03-09T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_h24_acct_tz", - "period_start": "2026-03-09T04:00:00Z", - "period_end": "2026-03-10T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "PT24H and P1D under utc are the same days", - "rule": "UTC has no DST, so PT24H and P1D yield identical boundaries under utc alignment.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "PT24H", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_u24" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_u24", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_u24", - "report_definition_uri": "https://seller.example/report-definitions/off_u24.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT24H", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_u24", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_u24", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_u24", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_u24", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_u24", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_u24", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "sub-daily local periods start on the local hour (Asia/Singapore)", - "rule": "adcp#8588: hourly periods under account_timezone are local wall-clock hours counted from each local midnight, not 1970 offsets (Singapore was +07:30 in 1970). confirmed_at 00:05Z falls in the 00:00Z (08:00 local) hour, which ends after it and overlaps the flight, so it is owed (adcp#8593).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "pacing", - "period_duration": "PT1H", - "required_finality": "snapshot", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "Asia/Singapore", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-03T00:05:00Z", - "start_time": "2026-11-03T00:10:00Z", - "end_time": "2026-11-03T02:30:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_p_hourly_local" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_p_hourly_local", - "feed_purpose": "pacing", - "report_definition_id": "rd_off_p_hourly_local", - "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT1H", - "alignment": "account_timezone", - "delivery_sla": "PT1H" - }, - "supported_finality": [ - "snapshot" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-03T01:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T01:00:00Z", - "period_end": "2026-11-03T02:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T02:00:00Z", - "period_end": "2026-11-03T03:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-03T01:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T01:00:00Z", - "period_end": "2026-11-03T02:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-03T02:00:00Z", - "period_end": "2026-11-03T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "sub-daily local periods on a 25-hour day (America/New_York fall-back)", - "rule": "adcp#8588: the repeated 01:00 yields one boundary per offset, so 2026-11-01 in New York has 25 hourly periods.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-10-30T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "pacing", - "period_duration": "PT1H", - "required_finality": "snapshot", - "dimensions": [ - "package" - ], - "alignment": "account_timezone" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-10-30T00:00:00Z", - "start_time": "2026-11-01T04:00:00Z", - "end_time": "2026-11-02T05:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_p_hourly_local" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_p_hourly_local", - "feed_purpose": "pacing", - "report_definition_id": "rd_off_p_hourly_local", - "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "PT1H", - "alignment": "account_timezone", - "delivery_sla": "PT1H" - }, - "supported_finality": [ - "snapshot" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-11-01T05:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T05:00:00Z", - "period_end": "2026-11-01T06:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T06:00:00Z", - "period_end": "2026-11-01T07:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T07:00:00Z", - "period_end": "2026-11-01T08:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T08:00:00Z", - "period_end": "2026-11-01T09:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T09:00:00Z", - "period_end": "2026-11-01T10:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T10:00:00Z", - "period_end": "2026-11-01T11:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T11:00:00Z", - "period_end": "2026-11-01T12:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T12:00:00Z", - "period_end": "2026-11-01T13:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T13:00:00Z", - "period_end": "2026-11-01T14:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T14:00:00Z", - "period_end": "2026-11-01T15:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T15:00:00Z", - "period_end": "2026-11-01T16:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T16:00:00Z", - "period_end": "2026-11-01T17:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T17:00:00Z", - "period_end": "2026-11-01T18:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T18:00:00Z", - "period_end": "2026-11-01T19:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T19:00:00Z", - "period_end": "2026-11-01T20:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T20:00:00Z", - "period_end": "2026-11-01T21:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T21:00:00Z", - "period_end": "2026-11-01T22:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T22:00:00Z", - "period_end": "2026-11-01T23:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T23:00:00Z", - "period_end": "2026-11-02T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T00:00:00Z", - "period_end": "2026-11-02T01:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T01:00:00Z", - "period_end": "2026-11-02T02:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T02:00:00Z", - "period_end": "2026-11-02T03:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T03:00:00Z", - "period_end": "2026-11-02T04:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T04:00:00Z", - "period_end": "2026-11-02T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T04:00:00Z", - "period_end": "2026-11-01T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T05:00:00Z", - "period_end": "2026-11-01T06:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T06:00:00Z", - "period_end": "2026-11-01T07:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T07:00:00Z", - "period_end": "2026-11-01T08:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T08:00:00Z", - "period_end": "2026-11-01T09:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T09:00:00Z", - "period_end": "2026-11-01T10:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T10:00:00Z", - "period_end": "2026-11-01T11:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T11:00:00Z", - "period_end": "2026-11-01T12:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T12:00:00Z", - "period_end": "2026-11-01T13:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T13:00:00Z", - "period_end": "2026-11-01T14:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T14:00:00Z", - "period_end": "2026-11-01T15:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T15:00:00Z", - "period_end": "2026-11-01T16:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T16:00:00Z", - "period_end": "2026-11-01T17:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T17:00:00Z", - "period_end": "2026-11-01T18:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T18:00:00Z", - "period_end": "2026-11-01T19:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T19:00:00Z", - "period_end": "2026-11-01T20:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T20:00:00Z", - "period_end": "2026-11-01T21:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T21:00:00Z", - "period_end": "2026-11-01T22:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T22:00:00Z", - "period_end": "2026-11-01T23:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-01T23:00:00Z", - "period_end": "2026-11-02T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T00:00:00Z", - "period_end": "2026-11-02T01:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T01:00:00Z", - "period_end": "2026-11-02T02:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T02:00:00Z", - "period_end": "2026-11-02T03:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T03:00:00Z", - "period_end": "2026-11-02T04:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_p_hourly_local", - "period_start": "2026-11-02T04:00:00Z", - "period_end": "2026-11-02T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant chain of three grants without backfill", - "rule": "Revoked 11-04T06 and re-granted 11-05T18, revoked 11-07T06 and re-granted 11-08T18, all inside retention: one chain with gaps [11-04, 11-06) and [11-07, 11-09).", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-04T06:00:00Z" - }, - { - "authorized_at": "2026-11-05T18:00:00Z", - "unauthorized_at": "2026-11-07T06:00:00Z" - }, - { - "authorized_at": "2026-11-08T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-10T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 30 - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-09T00:00:00Z", - "period_end": "2026-11-10T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-09T00:00:00Z", - "period_end": "2026-11-10T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant chain of three grants with backfill_on_regrant", - "rule": "The same chain with backfill_on_regrant: no gap, every period owed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-04T06:00:00Z" - }, - { - "authorized_at": "2026-11-05T18:00:00Z", - "unauthorized_at": "2026-11-07T06:00:00Z" - }, - { - "authorized_at": "2026-11-08T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-10T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 30, - "backfill_on_regrant": true - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-09T00:00:00Z", - "period_end": "2026-11-10T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-09T00:00:00Z", - "period_end": "2026-11-10T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "re-grant seen only through the chain-start authorized_at", - "rule": "The wire keeps authorized_at at the chain start after a re-grant inside retention (adcp#8585), so the buyer lists the continuation with that value; the seller's gaps[] says which periods the interruption removed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-04T06:00:00Z" - }, - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 30, - "coverage": { - "gaps": [ - { - "from": "2026-11-04T00:00:00Z", - "until": "2026-11-06T00:00:00Z", - "reason": "unauthorized" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "two authorization chains", - "rule": "Revoked 11-04T06; re-granted 11-10 after retention (1 day) expired, a new chain from 11-10; revoked again 11-12T06.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-04T06:00:00Z" - }, - { - "authorized_at": "2026-11-10T00:00:00Z", - "unauthorized_at": "2026-11-12T06:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-15T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "status_retention_days": 1 - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-10T00:00:00Z", - "period_end": "2026-11-11T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-11T00:00:00Z", - "period_end": "2026-11-12T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-10T00:00:00Z", - "period_end": "2026-11-11T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-11T00:00:00Z", - "period_end": "2026-11-12T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "match all adds an offering on a different alignment", - "rule": "v2 (11-04T12Z) moves from exact to all and adds a New York offering. The UTC offering continues (E = 11-05T00Z); the New York offering is new and starts at the latest outgoing end, so its first period is 11-05T05Z and 00Z-05Z is owed by neither.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-04T12:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-04T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "all" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T05:00:00Z", - "period_end": "2026-11-07T05:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-05T05:00:00Z", - "period_end": "2026-11-06T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_e_pkg_acct_tz", - "period_start": "2026-11-06T05:00:00Z", - "period_end": "2026-11-07T05:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "version change exactly on a boundary", - "rule": "v2 accepted at 11-05T00Z, itself a boundary: E is T, v1 owes 11-03 and 11-04, v2 from 11-05.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-05T00:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "exclude_account_ids": [ - "acct_other" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-07T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "reactivation exactly on a boundary", - "rule": "Inactive [11-04T12, 11-06T00): 11-04 started before deactivation and stays owed; coverage resumes at 11-06 itself.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "inactive_intervals": [ - { - "deactivated_at": "2026-11-04T12:00:00Z", - "reactivated_at": "2026-11-06T00:00:00Z" - } - ] - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-06T00:00:00Z", - "period_end": "2026-11-07T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "inactive interval spanning a version change", - "rule": "Deactivated under v1 at 11-04T12, v2 accepted while inactive at 11-05T12, reactivated 11-06T12: v1 owes 11-03 and 11-04, v2 starts fresh at 11-07.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - }, - "superseded_at": "2026-11-05T12:00:00Z" - }, - { - "subscription_version": 2, - "accepted_at": "2026-11-05T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 2, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only", - "exclude_account_ids": [ - "acct_other" - ] - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-09T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "inactive_intervals": [ - { - "deactivated_at": "2026-11-04T12:00:00Z", - "reactivated_at": "2026-11-06T12:00:00Z" - } - ] - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - }, - { - "subscription_version": 2, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 2, - "offering_id": "off_a_pkg", - "period_start": "2026-11-08T00:00:00Z", - "period_end": "2026-11-09T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "exception bounds between boundaries", - "rule": "capacity [11-04T12, 11-06T12) removes the periods whose start is in it, 11-05 and 11-06; 11-04 started before from and stays owed.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-08T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "excluded": [ - { - "reason": "capacity", - "from": "2026-11-04T12:00:00Z", - "until": "2026-11-06T12:00:00Z" - } - ] - } - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_a_pkg", - "period_start": "2026-11-07T00:00:00Z", - "period_end": "2026-11-08T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "finest tie in byte order (B before a)", - "rule": "Two offerings tie at two mapped dimensions; byte order puts uppercase B (0x42) before lowercase a (0x61), unlike locale order.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ], - "match": "finest" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "a", - "B" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "a", - "feed_purpose": "analytics", - "report_definition_id": "rd_a", - "report_definition_uri": "https://seller.example/report-definitions/a.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "B", - "feed_purpose": "analytics", - "report_definition_id": "rd_B", - "report_definition_uri": "https://seller.example/report-definitions/B.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "B", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "B", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "B", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "B", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "B", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "B", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "unknown dimension values parse and match only where published", - "rule": "The dimension vocabulary is extensible: an offering may publish placement, and a selector naming it matches that offering. A value no offering publishes (audience_segment) matches nothing.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package", - "placement" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_q_pkg_placement", - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_q_pkg_placement", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_q_pkg_placement", - "report_definition_uri": "https://seller.example/report-definitions/off_q_pkg_placement.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "placement" - ] - }, - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [ - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z" - }, - { - "subscription_version": 1, - "media_buy_id": "mb_1", - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z" - } - ], - "expected_obligations": [ - { - "subscription_version": 1, - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-03T00:00:00Z", - "period_end": "2026-11-04T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-04T00:00:00Z", - "period_end": "2026-11-05T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - }, - { - "subscription_version": 1, - "offering_id": "off_q_pkg_placement", - "period_start": "2026-11-05T00:00:00Z", - "period_end": "2026-11-06T00:00:00Z", - "media_buy_ids": [ - "mb_1" - ] - } - ] - }, - { - "name": "an unknown selector dimension no offering publishes matches nothing", - "rule": "A selector naming a value the seller does not map matches no offering.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package", - "audience_segment" - ], - "match": "all" - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg", - "off_b_pkg_creative", - "off_c_pkg_country", - "off_d_pkg_device" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - }, - { - "offering_id": "off_b_pkg_creative", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_b_pkg_creative", - "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "creative" - ] - }, - { - "offering_id": "off_c_pkg_country", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_c_pkg_country", - "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package", - "country" - ] - }, - { - "offering_id": "off_d_pkg_device", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_d_pkg_device", - "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ], - "unmapped_dimensions": [ - "device" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected": [], - "expected_obligations": [] - }, - { - "name": "numeric offset timezone is refused", - "rule": "iana_timezone: a numeric offset defines no DST rules.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "+05:00", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected_error": "TypeError" - }, - { - "name": "account_timezone offering requires the account timezone", - "rule": "Boundaries cannot be derived without the account timezone.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected_error": "TypeError" - }, - { - "name": "a timezone cutover without previous_timezone is refused", - "rule": "Sellers MUST include previous_timezone: account.timezone already shows the new zone, so the old schedule cannot be recovered without it.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_e_pkg_acct_tz" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_e_pkg_acct_tz", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_e_pkg_acct_tz", - "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "account_timezone", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z", - "coverage": { - "timezone_cutovers": [ - { - "effective_at": "2026-11-05T05:00:00Z", - "timezone": "America/Los_Angeles" - } - ] - } - }, - "expected_error": "TypeError" - }, - { - "name": "an offering without standard_dimensions cannot be resolved", - "rule": "Sellers advertising subscriptions MUST publish standard_dimensions on every offering; matching never guesses.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only" - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected_error": "TypeError" - }, - { - "name": "re-grant requires status_retention_days", - "rule": "Whether a re-grant continues coverage depends on the retention window.", - "input": { - "subscription_id": "analytics-daily", - "versions": [ - { - "subscription_version": 1, - "accepted_at": "2026-11-01T12:00:00Z", - "configuration": { - "subscription_id": "analytics-daily", - "subscription_version": 1, - "active": true, - "scope": { - "all_authorized_accounts": true - }, - "selector": { - "feed_purpose": "analytics", - "period_duration": "P1D", - "required_finality": "official", - "dimensions": [ - "package" - ] - }, - "reconciliation_mode": "delivery_only" - } - } - ], - "account": { - "account_id": "acct_1", - "timezone": "America/New_York", - "grants": [ - { - "authorized_at": "2026-10-01T00:00:00Z", - "unauthorized_at": "2026-11-05T06:00:00Z" - }, - { - "authorized_at": "2026-11-06T18:00:00Z" - } - ] - }, - "buys": [ - { - "media_buy_id": "mb_1", - "confirmed_at": "2026-11-02T15:00:00Z", - "start_time": "2026-11-03T00:00:00Z", - "end_time": "2026-11-06T00:00:00Z", - "packages": [ - { - "package_id": "pkg_1", - "reporting_delivery_offering_ids": [ - "off_a_pkg" - ] - } - ] - } - ], - "offerings": [ - { - "offering_id": "off_a_pkg", - "feed_purpose": "analytics", - "report_definition_id": "rd_off_a_pkg", - "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", - "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "reporting_profile": { - "id": "adcp.delivery.v1", - "version": "1.0.0", - "schema_uri": "https://seller.example/schemas/delivery.json", - "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "schema_dialect": "https://json-schema.org/draft/2020-12/schema", - "schema_ref_policy": "local_fragment_only", - "grain": "daily", - "primary_keys": [ - "account_id", - "package_id" - ] - }, - "schedule": { - "period_duration": "P1D", - "alignment": "utc", - "delivery_sla": "PT6H" - }, - "supported_finality": [ - "official" - ], - "reconciliation_mode": "delivery_only", - "standard_dimensions": [ - "package" - ] - } - ], - "now": "2026-12-01T00:00:00Z" - }, - "expected_error": "TypeError" - } - ] -} \ No newline at end of file diff --git a/tests/fixtures/reporting_subscriptions/spec/README.md b/tests/fixtures/reporting_subscriptions/spec/README.md new file mode 100644 index 000000000..834382301 --- /dev/null +++ b/tests/fixtures/reporting_subscriptions/spec/README.md @@ -0,0 +1,105 @@ +# Reporting subscription coverage vectors + +Canonical coverage vectors for experimental principal-level reporting +subscriptions (`media_buy.reporting_subscriptions`, +[get_reporting_status](/docs/media-buy/task-reference/get_reporting_status#subscription-coverage), +[sync_principal](/docs/protocol/sync_principal#reporting-subscriptions)). Like +the feature, these vectors are experimental and change with it. + +A buyer computes which periods a subscription owes without asking the seller. +These vectors give the input a buyer holds and the exact owed periods, so SDKs +and seller test suites can check the same rule against frozen inputs, and +against something neither of them wrote. + +- `vectors.json` holds the cases, the pinned tzdata release, and the + conventions. +- `case.schema.json` describes one case and every input field. It also carries + the two frozen vocabularies below as definitions. +- `error-codes.json` freezes the error codes SDKs raise for subscriptions and + for coverage computation. Each code has a recovery class + (`transient`, `correctable`, or `terminal`) and says whether the task was + dispatched. It also gives the fix the message ends with, and the SDK classes. + `expected_error` in a case is one of its `COVERAGE_INPUT_*` codes with a + `detail`. +- `reason-codes.json` freezes why a period is or isn't owed: the fixed rule + order (`scope`, `authorization`, `version`, `activity`, `offering`, + `flight`, `confirmation`, `exception`, `gap`, `cutover`, `timezone`), each + rule, and each reason code with its precise definition. A period takes the + reason of the first rule that rejects it. + +Both SDKs use the two vocabularies verbatim, so a buyer's and a seller's +explanation of the same period, and their errors, compare by code. Renaming or +removing a code needs a new `vocabulary_version`. + +## How the expected rows were derived + +Each expected row is derived from the normative text named in the case's +`spec_refs`: + +- `core/reporting-subscription.json` `x-adcp-validation`: coverage, cutover, + selection, and precedence. +- `core/reporting-schedule.json` `period_generation`. +- `core/reporting-subscription-coverage.json`, + `core/reporting-subscription-state.json`, and + `core/account-authorization.json`. + +`rule` explains each derivation. + +Cases with `origin: "adcp-client#3505"` were ported from the TypeScript SDK's +parity table and re-derived independently. Cases with `origin: "adcp"` were +added here. A case whose input differs from its origin says how in +`changed_from_origin`. + +`scripts/reference/reporting-coverage/` is a brute-force reference model, +written from the same text. It enumerates every period of every schedule in +play and keeps a period only when each clause admits it. +`tests/reporting-subscription-coverage-vectors.test.cjs` runs it over every +case. `tests/reporting-subscription-coverage-properties.test.cjs` checks +properties of the rule over seeded random inputs: + +- Exceptions only remove periods. +- Nothing is owed twice. +- The cutover stretch is shorter than one incoming period. +- The owed set is prefix-stable as `now` advances. +- An extension never adds an elapsed period. +- Calendar invariants hold. + +## Time zones + +Expected rows use the IANA tzdata release named in `tzdata`. Each case lists in +`timezones` the zones its rows depend on. Dates were chosen where tzdata +releases 2026b through the pinned release agree, so an implementation on any +of them should reproduce every case. For example, Cuba's fall-back is tested +on 2025-11-02 because 2026f removed the 2026-11-01 one. If your time zone +database is a different release and a case disagrees, compare it against the +pinned release first. + +The reference model does not use ICU, `Intl`, Temporal, TZif files, or the +host's zoneinfo. It evaluates the zic source lines of the pinned release +itself, from `scripts/reference/reporting-coverage/tzdata.json`. The test +checks that evaluation against zic(8) output for the same release. + +## Wiring a vector into an SDK test + +For each case: + +1. Build your SDK's coverage input from `input`. `case.schema.json` says where + each field comes from on the wire. Fields listed in `non_wire_inputs` are + ones a buyer must retain itself. +2. When the case has `expected_error`, assert your SDK raises that `code` + with that `detail`. +3. Otherwise compare your rows with `expected`, and your grouped obligations + with `expected_obligations`, as instants rather than strings, in the order + `conventions.rows` gives. + +## Case groups + +| Group | What the cases check | +|---|---| +| Start bound and flights | The later of `accepted_at` and `authorized_at`, the confirmation period owed in full, the stop-time period owed in full, cancellation, completion, empty flights, late confirmation, and flight values as of each period end (extension and reinstatement never add an elapsed period). | +| Cutovers | New versions on aligned and misaligned schedules, a version change on a boundary, two cutovers inside one period, deactivation, reactivation, and resolution changes. Compound changes at one instant: a version change with a timezone change, a reactivation, a deactivation, or a revocation. | +| Authority | Revocation, re-grant with and without `backfill_on_regrant`, expired `accounts_unauthorized` entries, a re-grant exactly at the retention limit, and chains of three and four grants. | +| Exceptions | `excluded[]` and `gaps[]` remove periods by start, offering-scoped entries (including `max_accounts` capacity on offerings with different boundaries), `package_ids` entries, precedence. | +| Selection | `exact`, `finest`, and `all`, byte-order ties, unmapped and unknown dimensions, finality, purpose, duration, destination, product eligibility, per-product resolution, and `period_timezone` matching. | +| Period generation | DST gaps and folds at midnight (America/Santiago, America/Havana, Africa/Cairo), Australia/Lord_Howe's 30-minute DST, sub-daily local periods in Asia/Singapore and Asia/Kathmandu, a skipped civil date (Pacific/Apia), PT24H against P1D, utc sub-daily periods counted from 1970, month-end clamps from 31st and February 29 anchors, P3M, weeks (P7D, starting Thursday from the 1970 origin), and years. | +| Input errors | Numeric offsets, missing zones, a missing `previous_timezone`, missing `standard_dimensions`, a missing retention window, P1W (the duration pattern has no W), and invalid local durations. | diff --git a/tests/fixtures/reporting_subscriptions/spec/case.schema.json b/tests/fixtures/reporting_subscriptions/spec/case.schema.json new file mode 100644 index 000000000..cbf0750ad --- /dev/null +++ b/tests/fixtures/reporting_subscriptions/spec/case.schema.json @@ -0,0 +1,616 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "case.schema.json", + "title": "Reporting subscription coverage vector case", + "description": "One case in vectors.json: the input a buyer holds for one subscription and one account, and either every period the seller owes (expected and expected_obligations) or the input error (expected_error). Wire objects inside the input (versions[].configuration, offerings[], coverage entries, inactive_intervals) are AdCP objects and validate against the AdCP schemas, except in cases whose expected_error.wire_valid is false.", + "type": "object", + "required": [ + "id", + "name", + "origin", + "rule", + "spec_refs", + "input" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", + "description": "Stable identifier, unique in the file." + }, + "name": { + "type": "string", + "minLength": 1 + }, + "origin": { + "type": "string", + "enum": [ + "adcp", + "adcp-client#3505" + ], + "description": "adcp-client#3505: ported from the TypeScript SDK's parity table and re-derived from the spec text. adcp: authored here." + }, + "changed_from_origin": { + "type": "string", + "description": "How a ported case differs from its origin, and why." + }, + "rule": { + "type": "string", + "minLength": 1, + "description": "The derivation: which clause applies and why the expected rows follow." + }, + "spec_refs": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^(?:static/schemas/source/|docs/)[^#\\s]+(?:#\\S*)?$" + }, + "description": "Repository paths, with JSON Pointer or heading anchors, of the normative text the case derives from." + }, + "timezones": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "description": "IANA zones the expected rows depend on, as named in the input. Empty when every schedule is utc-aligned." + }, + "non_wire_inputs": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "buys[].prior_flights", + "offerings[].available_from/withdrawn_at" + ] + }, + "description": "Input fields no AdCP response carries; a buyer must retain them to agree with the seller." + }, + "input": { + "$ref": "#/definitions/input" + }, + "expected": { + "type": "array", + "items": { + "$ref": "#/definitions/row" + } + }, + "expected_obligations": { + "type": "array", + "items": { + "$ref": "#/definitions/obligation" + } + }, + "expected_error": { + "type": "object", + "required": [ + "code", + "detail", + "wire_valid" + ], + "description": "The error an SDK raises for this input: code and detail from error-codes.json.", + "properties": { + "code": { + "type": "string", + "enum": [ + "COVERAGE_INPUT_INCOMPLETE", + "COVERAGE_INPUT_INVALID" + ] + }, + "detail": { + "$ref": "#/definitions/coverage_input_error_detail" + }, + "wire_valid": { + "type": "boolean", + "description": "false when the input also fails AdCP schema validation." + } + }, + "allOf": [ + { + "if": { + "properties": { + "code": { + "const": "COVERAGE_INPUT_INCOMPLETE" + } + } + }, + "then": { + "properties": { + "detail": { + "enum": [ + "missing_account_timezone", + "missing_source_timezone", + "missing_previous_timezone", + "missing_standard_dimensions", + "missing_status_retention_days", + "missing_version_configuration", + "missing_destination_method" + ] + } + } + } + }, + { + "if": { + "properties": { + "code": { + "const": "COVERAGE_INPUT_INVALID" + } + } + }, + "then": { + "properties": { + "detail": { + "enum": [ + "invalid_timezone", + "invalid_period_duration", + "invalid_instant", + "invalid_input" + ] + } + } + } + } + ], + "additionalProperties": false + } + }, + "oneOf": [ + { + "required": [ + "expected", + "expected_obligations", + "timezones" + ], + "not": { + "required": [ + "expected_error" + ] + } + }, + { + "required": [ + "expected_error" + ], + "not": { + "anyOf": [ + { + "required": [ + "expected" + ] + }, + { + "required": [ + "expected_obligations" + ] + } + ] + } + } + ], + "additionalProperties": false, + "definitions": { + "instant": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$", + "description": "RFC 3339 date-time, at most millisecond precision. Compare instants, never strings." + }, + "z_instant": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$", + "description": "An expected instant, written in Z form with fractional seconds only when non-zero." + }, + "input": { + "type": "object", + "required": [ + "subscription_id", + "versions", + "account", + "buys", + "offerings", + "now" + ], + "properties": { + "subscription_id": { + "type": "string", + "minLength": 1 + }, + "versions": { + "type": "array", + "minItems": 1, + "description": "Every subscription_version whose obligations matter, oldest first: the current version and prior_versions from the get_principal readback (reporting-subscription-state.json).", + "items": { + "type": "object", + "required": [ + "subscription_version", + "accepted_at", + "configuration" + ], + "properties": { + "subscription_version": { + "type": "integer", + "minimum": 1 + }, + "accepted_at": { + "$ref": "#/definitions/instant" + }, + "superseded_at": { + "$ref": "#/definitions/instant", + "description": "prior_versions[].superseded_at: the next version's accepted_at." + }, + "deactivated_at": { + "$ref": "#/definitions/instant", + "description": "The readback's deactivated_at while the subscription is inactive: an open inactive interval." + }, + "configuration": { + "type": "object", + "description": "The version's reporting-subscription.json object." + }, + "destination_method": { + "type": "object", + "required": [ + "pattern", + "transport" + ], + "properties": { + "pattern": { + "type": "string" + }, + "transport": { + "type": "string" + } + }, + "additionalProperties": false, + "description": "pattern and transport of the destination configuration.destination names, from the caller's reporting_destinations. Present when the configuration names a destination." + } + }, + "additionalProperties": false + } + }, + "account": { + "type": "object", + "required": [ + "account_id", + "grants" + ], + "properties": { + "account_id": { + "type": "string", + "minLength": 1 + }, + "timezone": { + "type": "string", + "description": "The account's current timezone as list_accounts shows it." + }, + "operator": { + "type": "string", + "description": "The account's operator domain, read when a version names operator_domains." + }, + "source_timezone": { + "type": "string", + "description": "The seller-resolved upstream reporting timezone (the obligation's period.source_timezone), read by an account_resolved source_timezone offering." + }, + "grants": { + "type": "array", + "minItems": 1, + "description": "The caller's authority over the account, oldest first: intervals during which its authorization lists get_reporting_status. Each grant but the last has unauthorized_at (from accounts_unauthorized). A re-grant at or before the previous unauthorized_at carries the wire's chain-start authorized_at, so its re-grant instant is unknown and only the seller's gaps[] say what the interruption removed. A later re-grant before unauthorized_at plus status_retention_days continues the chain; otherwise it starts a new one.", + "items": { + "type": "object", + "required": [ + "authorized_at" + ], + "properties": { + "authorized_at": { + "$ref": "#/definitions/instant" + }, + "unauthorized_at": { + "$ref": "#/definitions/instant" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "buys": { + "type": "array", + "description": "Media buys the caller can see through get_media_buys.", + "items": { + "type": "object", + "required": [ + "media_buy_id", + "start_time", + "end_time", + "packages" + ], + "properties": { + "media_buy_id": { + "type": "string", + "minLength": 1 + }, + "confirmed_at": { + "oneOf": [ + { + "$ref": "#/definitions/instant" + }, + { + "type": "null" + } + ], + "description": "Null or absent: not confirmed, so not covered." + }, + "start_time": { + "$ref": "#/definitions/instant" + }, + "end_time": { + "$ref": "#/definitions/instant" + }, + "canceled_at": { + "$ref": "#/definitions/instant", + "description": "cancellation.canceled_at." + }, + "completed_at": { + "$ref": "#/definitions/instant" + }, + "packages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "package_id", + "reporting_delivery_offering_ids" + ], + "properties": { + "package_id": { + "type": "string", + "minLength": 1 + }, + "reporting_delivery_offering_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The package's product reporting_capabilities.reporting_delivery_offering_ids." + } + }, + "additionalProperties": false + } + }, + "prior_flights": { + "type": "array", + "description": "Not on the wire. Flight values before an update replaced them; a value applies to periods resolved before its replaced_at.", + "items": { + "type": "object", + "required": [ + "replaced_at", + "start_time", + "end_time" + ], + "properties": { + "replaced_at": { + "$ref": "#/definitions/instant" + }, + "start_time": { + "$ref": "#/definitions/instant" + }, + "end_time": { + "$ref": "#/definitions/instant" + }, + "canceled_at": { + "$ref": "#/definitions/instant" + }, + "completed_at": { + "$ref": "#/definitions/instant" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "offerings": { + "type": "array", + "description": "Seller offerings as published (reporting-delivery-offering.json, with standard_dimensions and unmapped_dimensions). available_from and withdrawn_at are not on the wire: when the offering became or stopped being available, which changes a resolution.", + "items": { + "type": "object", + "required": [ + "offering_id", + "schedule" + ], + "properties": { + "available_from": { + "$ref": "#/definitions/instant" + }, + "withdrawn_at": { + "$ref": "#/definitions/instant" + } + } + } + }, + "inactive_intervals": { + "type": "array", + "description": "The readback's inactive_intervals (reporting-subscription-state.json)." + }, + "coverage": { + "type": "object", + "description": "This subscription's get_reporting_status subscription_coverage entry for the account: its exceptions only.", + "properties": { + "excluded": { + "type": "array" + }, + "gaps": { + "type": "array" + }, + "timezone_cutovers": { + "type": "array" + } + }, + "additionalProperties": false + }, + "status_retention_days": { + "type": "integer", + "minimum": 1, + "description": "The seller's reporting_delivery status_retention_days." + }, + "backfill_on_regrant": { + "type": "boolean", + "description": "The seller's subscriptions.backfill_on_regrant. Absent means false." + }, + "now": { + "$ref": "#/definitions/instant", + "description": "Only periods that end at or before now are expected." + } + }, + "additionalProperties": false + }, + "row": { + "type": "object", + "required": [ + "subscription_version", + "media_buy_id", + "offering_id", + "period_start", + "period_end" + ], + "properties": { + "subscription_version": { + "type": "integer", + "minimum": 1 + }, + "media_buy_id": { + "type": "string" + }, + "offering_id": { + "type": "string" + }, + "period_start": { + "$ref": "#/definitions/z_instant" + }, + "period_end": { + "$ref": "#/definitions/z_instant" + } + }, + "additionalProperties": false + }, + "obligation": { + "type": "object", + "required": [ + "subscription_version", + "offering_id", + "period_start", + "period_end", + "media_buy_ids" + ], + "properties": { + "subscription_version": { + "type": "integer", + "minimum": 1 + }, + "offering_id": { + "type": "string" + }, + "period_start": { + "$ref": "#/definitions/z_instant" + }, + "period_end": { + "$ref": "#/definitions/z_instant" + }, + "media_buy_ids": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "error_code": { + "type": "string", + "enum": [ + "SUBSCRIPTION_WOULD_DEACTIVATE", + "DESTINATION_WOULD_REVOKE", + "SUBSCRIPTION_ID_CLASH", + "SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED", + "SUBSCRIPTION_SELECTOR_UNMATCHED", + "SUBSCRIPTION_CONFLICT_EXHAUSTED", + "SUBSCRIPTION_READBACK_MISMATCH", + "COVERAGE_INPUT_INCOMPLETE", + "COVERAGE_INPUT_INVALID", + "COVERAGE_BUDGET_EXCEEDED", + "REPORTING_STORAGE_NOT_DURABLE", + "REPORTING_SCHEMA_BEHIND", + "SUBSCRIPTIONS_REQUIRE_STANDARD_DIMENSIONS", + "SUBSCRIPTION_ROSTER_UNAVAILABLE" + ], + "description": "The frozen SDK error codes in error-codes.json." + }, + "coverage_input_error_detail": { + "type": "string", + "enum": [ + "missing_account_timezone", + "missing_source_timezone", + "missing_previous_timezone", + "missing_standard_dimensions", + "missing_status_retention_days", + "missing_version_configuration", + "missing_destination_method", + "invalid_timezone", + "invalid_period_duration", + "invalid_instant", + "invalid_input" + ], + "description": "The details of COVERAGE_INPUT_INCOMPLETE and COVERAGE_INPUT_INVALID in error-codes.json." + }, + "coverage_reason": { + "type": "string", + "enum": [ + "not_in_scope", + "excluded:excluded_by_buyer", + "not_authorized", + "before_coverage_start", + "subscription_inactive", + "excluded:offering_unsupported", + "outside_flight", + "after_stop", + "before_confirmation", + "excluded:capacity", + "excluded:overridden", + "excluded:action_required", + "gap:unauthorized", + "cutover_stretch", + "owed_under_other_version", + "period_not_ended", + "owed", + "owed:regrant_backfill", + "owed:withheld", + "buy_not_visible" + ], + "description": "The frozen coverage reason codes in reason-codes.json: why a period is or is not owed. For expected traces (CoverageTrace reason) and reconciliation lines." + }, + "coverage_rule": { + "type": "string", + "enum": [ + "scope", + "authorization", + "version", + "activity", + "offering", + "flight", + "confirmation", + "exception", + "gap", + "cutover", + "timezone" + ], + "description": "The coverage rules in reason-codes.json rule_order, in evaluation order." + } + } +} diff --git a/tests/fixtures/reporting_subscriptions/spec/error-codes.json b/tests/fixtures/reporting_subscriptions/spec/error-codes.json new file mode 100644 index 000000000..81023d078 --- /dev/null +++ b/tests/fixtures/reporting_subscriptions/spec/error-codes.json @@ -0,0 +1,181 @@ +{ + "vocabulary_version": 1, + "contract_version": "3.3", + "feature": "media_buy.reporting_subscriptions", + "status": "experimental", + "description": "Frozen error codes for reporting subscriptions that SDKs raise themselves, before or instead of a wire error. TypeScript (@adcp/sdk) and Python (adcp) use these codes and recovery classes verbatim, so callers can branch on them across languages. Wire error codes returned by a seller (for example INVALID_REQUEST, UNSUPPORTED_FEATURE, or CONFLICT from sync_principal) are not redefined here; SDKs surface them unchanged. Adding a code is additive; renaming or removing one, or changing its recovery, needs a new vocabulary_version.", + "error_shape": { + "code": "One of the codes below, or the wire error code for a seller-returned error.", + "recovery": "transient: retry the same call later. correctable: the caller must change its input or configuration first. terminal: retrying cannot help; a person must act. This is the TypeScript adcpError.recovery vocabulary.", + "message": "Human-readable text whose last sentence says how to fix it (message_fix below). Untrusted display data; never parse it.", + "dispatched": "false when no bytes of the task left the process, so the operation certainly had no effect on the seller. Otherwise the property is absent. Local computations that never dispatch anything (coverage, configuration checks) omit it as well; see dispatched below.", + "detail": "For codes that list details, the detail code naming the specific cause." + }, + "dispatched_values": { + "false": "The property is present and false: the SDK refused before sending.", + "absent": "The property is omitted: the request may have reached the seller.", + "not_applicable": "The property is omitted: the error comes from a local computation or configuration check with no task to dispatch." + }, + "codes": [ + { + "code": "SUBSCRIPTION_WOULD_DEACTIVATE", + "raised_by": "buyer", + "dispatched": "false", + "recovery": "correctable", + "raised_when": "A sync_principal reporting_subscriptions write would omit a subscription that is currently active, or set it active false, without the caller asking to deactivate it. The section is complete desired state, so omitting an entry deactivates that subscription.", + "message_fix": "Use unsubscribe(), or pass allowDeactivation: true.", + "context": { "would_deactivate": "subscription_id values the write would deactivate." }, + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["docs/protocol/sync_principal.mdx#reporting-subscriptions", "docs/protocol/sync_principal.mdx#synchronization-semantics"] + }, + { + "code": "DESTINATION_WOULD_REVOKE", + "raised_by": "buyer", + "dispatched": "false", + "recovery": "correctable", + "raised_when": "A sync_principal reporting_destinations write would omit a current destination without the caller asking to revoke it. Omission is revocation and cuts delivery for every account bound to the destination.", + "message_fix": "Omitting a destination revokes it for every account. Pass allowRevocation: true.", + "context": { "would_revoke": "destination_id values the write would revoke." }, + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["docs/protocol/sync_principal.mdx#suspension-and-revocation", "docs/protocol/sync_principal.mdx#synchronization-semantics"] + }, + { + "code": "SUBSCRIPTION_ID_CLASH", + "raised_by": "buyer", + "dispatched": "false", + "recovery": "correctable", + "raised_when": "A subscription_id equals a delivery_config_id the caller uses on an account with this seller. Subscription IDs and delivery_config_id values share one caller-scoped namespace, and the seller rejects a collision.", + "message_fix": "Choose a subscription_id that no account-level delivery config uses; the message names the clashing delivery_config_id and account.", + "context": { "delivery_config_id": "The clashing delivery_config_id.", "account_id": "The account that uses it." }, + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/properties/subscription_id", "docs/protocol/sync_principal.mdx#reporting-subscriptions"] + }, + { + "code": "SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED", + "raised_by": "buyer", + "dispatched": "false", + "recovery": "correctable", + "raised_when": "An all_authorized_accounts subscription names a destination and no operator_domains. Such a subscription follows every account the principal is granted, including accounts another operator grants later, and would send their data to that destination.", + "message_fix": "Add operator_domains, or pass acknowledgeCrossOperator: true.", + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/properties/operator_domains", "docs/protocol/sync_principal.mdx#reporting-subscriptions"] + }, + { + "code": "SUBSCRIPTION_SELECTOR_UNMATCHED", + "raised_by": "buyer", + "dispatched": "false", + "recovery": "correctable", + "raised_when": "No offering in the seller's advertised reporting_delivery offerings is a candidate for the selector (feed_purpose, period_duration, reconciliation_mode, required_finality, alignment, destination method, period_timezone) with a matching dimension set, so the subscription could only ever record offering_unsupported.", + "message_fix": "Change the selector; the message lists the nearest offerings and the attribute each one failed.", + "context": { "nearest": "Offerings that fail on the fewest attributes, each with the attributes it fails." }, + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection"] + }, + { + "code": "SUBSCRIPTION_CONFLICT_EXHAUSTED", + "raised_by": "buyer", + "dispatched": "absent", + "recovery": "transient", + "raised_when": "A guarded sync_principal write kept returning CONFLICT (a stale expected_configuration_version) after the SDK re-read the principal and retried up to its limit.", + "message_fix": "Another writer is updating this principal; retry later.", + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["docs/protocol/sync_principal.mdx#synchronization-semantics"] + }, + { + "code": "SUBSCRIPTION_READBACK_MISMATCH", + "raised_by": "buyer", + "dispatched": "absent", + "recovery": "terminal", + "raised_when": "The applied readback of a subscription differs from the submitted configuration in a field the seller must not alter.", + "message_fix": "The seller altered a submitted field; contact the seller.", + "context": { "readback": "The readback configuration as returned." }, + "sdk_classes": { "typescript": "ReportingSubscriptionError", "python": "ReportingSubscriptionError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription-state.json#/properties/configuration"] + }, + { + "code": "COVERAGE_INPUT_INCOMPLETE", + "raised_by": "both", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "Coverage cannot be computed because the input lacks a value the rule needs. detail names it.", + "message_fix": "Supply the missing value; the message names the version configuration, zone, or field.", + "details": { + "missing_account_timezone": "An account_timezone offering resolves and the account has no timezone (list_accounts timezone).", + "missing_source_timezone": "An account_resolved source_timezone offering resolves and the seller-resolved zone (the obligation's period.source_timezone) is not known.", + "missing_previous_timezone": "A timezone_cutovers entry has no previous_timezone, which sellers MUST include.", + "missing_standard_dimensions": "A candidate offering does not publish standard_dimensions, which sellers advertising subscriptions MUST publish.", + "missing_status_retention_days": "A grant was revoked and re-granted later, and status_retention_days, which decides whether the re-grant continues the chain, is not known.", + "missing_version_configuration": "A version whose obligations matter has no configuration (prior_versions[].configuration, which sellers MUST include).", + "missing_destination_method": "A version names a destination whose pattern and transport are not known." + }, + "sdk_classes": { "typescript": "CoverageInputError", "python": "CoverageInputError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers", "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions"] + }, + { + "code": "COVERAGE_INPUT_INVALID", + "raised_by": "both", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "Coverage cannot be computed because a value the rule reads is malformed. detail names it.", + "message_fix": "Correct the value; the message names the field and the rule it breaks.", + "details": { + "invalid_timezone": "A zone a schedule reads is not an IANA zone or link name (reporting-schedule.json iana_timezone); a numeric offset is not one.", + "invalid_period_duration": "A period_duration does not match the schedule pattern (which has no W designator), mixes date and time components under a local alignment, or is sub-daily under a local alignment without dividing 24 hours.", + "invalid_instant": "A timestamp is not an RFC 3339 date-time.", + "invalid_input": "The input breaks a structural rule: duplicate offering_id or media_buy_id values, versions out of accepted_at or subscription_version order, a superseded_at that is not the next version's accepted_at, no grants, a grant followed by another without unauthorized_at, or an unknown alignment." + }, + "sdk_classes": { "typescript": "CoverageInputError", "python": "CoverageInputError" }, + "spec_refs": ["static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/iana_timezone", "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", "static/schemas/source/core/reporting-schedule.json#/properties/period_duration"] + }, + { + "code": "COVERAGE_BUDGET_EXCEEDED", + "raised_by": "both", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "Computing coverage would produce more periods, or examine more boundaries, than the caller's budget allows. SDKs fail closed rather than return a partial set.", + "message_fix": "Narrow the input or raise the budget; the message names maxPeriods (or the boundary budget) and the input that exceeded it.", + "sdk_classes": { "typescript": "CoverageInputError", "python": "CoverageInputError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage"] + }, + { + "code": "REPORTING_STORAGE_NOT_DURABLE", + "raised_by": "seller", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "Reliable reporting with subscriptions is enabled on storage that does not survive a restart, so obligations, grants, and frozen coverage would be lost.", + "message_fix": "Configure durable storage; the message names the configuration key.", + "sdk_classes": { "typescript": "PlatformConfigError", "python": "ReliableReportingConfigurationError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions"] + }, + { + "code": "REPORTING_SCHEMA_BEHIND", + "raised_by": "seller", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "The reporting storage schema is older than the SDK requires.", + "message_fix": "Run the migration; the message names the command.", + "sdk_classes": { "typescript": "PlatformConfigError", "python": "ReliableReportingConfigurationError" }, + "spec_refs": [] + }, + { + "code": "SUBSCRIPTIONS_REQUIRE_STANDARD_DIMENSIONS", + "raised_by": "seller", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "A seller enabling reporting subscriptions advertises an offering without standard_dimensions.", + "message_fix": "Publish standard_dimensions (empty for totals-only) on every offering; the message names the offering.", + "sdk_classes": { "typescript": "PlatformConfigError", "python": "ReliableReportingConfigurationError" }, + "spec_refs": ["static/schemas/source/core/reporting-delivery-offering.json#/properties/standard_dimensions"] + }, + { + "code": "SUBSCRIPTION_ROSTER_UNAVAILABLE", + "raised_by": "seller", + "dispatched": "not_applicable", + "recovery": "correctable", + "raised_when": "The seller host supplied no way to enumerate the accounts a principal is authorized for, which all_authorized_accounts subscriptions follow.", + "message_fix": "Provide the account roster hook; the message names the configuration key.", + "sdk_classes": { "typescript": "PlatformConfigError", "python": "ReliableReportingConfigurationError" }, + "spec_refs": ["static/schemas/source/core/reporting-subscription.json#/properties/scope"] + } + ] +} diff --git a/tests/fixtures/reporting_subscriptions/spec/reason-codes.json b/tests/fixtures/reporting_subscriptions/spec/reason-codes.json new file mode 100644 index 000000000..838d2816f --- /dev/null +++ b/tests/fixtures/reporting_subscriptions/spec/reason-codes.json @@ -0,0 +1,255 @@ +{ + "vocabulary_version": 1, + "contract_version": "3.3", + "feature": "media_buy.reporting_subscriptions", + "status": "experimental", + "description": "Frozen coverage reason codes: why one period of one (media buy, resolved offering) pair under one subscription version is or is not owed. Buyer and seller SDKs use these codes verbatim in coverage explanations (CoverageTrace reason), reconciliation lines (PeriodLine reason), and telemetry, so a buyer's and a seller's explanation of the same period compare by code. Adding a code is additive; renaming or removing one, or changing its rule, needs a new vocabulary_version.", + "classification": "Classify one period [start, end) of one schedule that a version's resolved offering uses for one media buy (for an account_timezone offering, of either zone across a timezone change). Evaluate the rules in rule_order. A period that a rule rejects takes that rule's reason, so a period several rules reject takes the reason of the first. A period no rule rejects is owed if it has ended at or before now (owed, owed:regrant_backfill, or owed:withheld), and otherwise takes period_not_ended. Each period has exactly one reason. Instants compare as instants; a period starts at a boundary of its schedule, so starting on or after the first boundary at or after an instant X is the same as starting at or after X.", + "rule_order": [ + "scope", + "authorization", + "version", + "activity", + "offering", + "flight", + "confirmation", + "exception", + "gap", + "cutover", + "timezone" + ], + "rules": { + "scope": "The version's scope selects the account: account_ids names it, or all_authorized_accounts with exclude_account_ids not naming it; and operator_domains, when present, lists the account's operator.", + "authorization": "The caller is authorized for the account over the period, by the authorization chains (account-authorization.json authorized_at, reporting-subscription-state.json accounts_unauthorized).", + "version": "The period starts at or after the coverage start: the later of the accepted_at of the first version whose scope selects the account and the first authorization chain's authorized_at. (Later chains are the authorization rule's.)", + "activity": "The subscription is active: the period does not start inside an inactive interval, or after a reactivation but before reactivated_at.", + "offering": "The buy's packages resolve an offering under the version's selector, and this offering is one of them.", + "flight": "The period overlaps the buy's flight [start_time, stop) with flight values as of the period end (scope_resolved_at), where stop is the earliest of end_time, canceled_at, and completed_at.", + "confirmation": "The buy is confirmed and the period ends after confirmed_at.", + "exception": "No get_reporting_status excluded[] entry applying to the buy and offering covers the period start in [from, until).", + "gap": "No gaps[] entry applying to the offering covers the period start, and without backfill_on_regrant the period does not end after an unauthorized_at and start before the re-grant that continued the chain.", + "cutover": "The version's side owns the period: it starts at or after the side's handoff E (the side's start instant when it has no outgoing predecessor) and before the next change instant T, at which the next side or a deactivation takes over.", + "timezone": "For an account_timezone offering whose account changed timezone, the period is one of the zone in effect at its start: the previous zone's periods start before effective_at, the new zone's at or after it." + }, + "reasons": [ + { + "code": "not_in_scope", + "verdict": "not_owed", + "rule": "scope", + "side": "both", + "definition": "No version in effect at the period's start selects the account: account_ids does not name it, the account is not one the caller's all_authorized_accounts covers, or operator_domains does not list its operator. An account listed in exclude_account_ids takes excluded:excluded_by_buyer instead.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/properties/scope" + ] + }, + { + "code": "excluded:excluded_by_buyer", + "verdict": "not_owed", + "rule": "scope", + "side": "both", + "definition": "The version is all_authorized_accounts and its exclude_account_ids names the account; the seller records it as an excluded[] entry with reason excluded_by_buyer.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/properties/exclude_account_ids", + "static/schemas/source/core/reporting-subscription-coverage.json#/definitions/ReportingSubscriptionExclusionReason" + ] + }, + { + "code": "not_authorized", + "verdict": "not_owed", + "rule": "authorization", + "side": "both", + "definition": "The period starts at or after the first chain's authorized_at, but no chain authorizes it: it ends after the unauthorized_at that ended a chain (none is delivered for periods ending after unauthorized_at), and it starts before the authorized_at of any later chain. Periods inside a chain that continued after a re-grant take gap:unauthorized or owed:regrant_backfill instead.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at" + ] + }, + { + "code": "before_coverage_start", + "verdict": "not_owed", + "rule": "version", + "side": "both", + "definition": "The period starts before the coverage start: before the accepted_at of the first version whose scope selects the account, or before the first authorization chain's authorized_at. A version accepted or an authorization begun mid-period starts at the next boundary. Periods before a later chain's authorized_at take not_authorized.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accepted_at", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at" + ] + }, + { + "code": "subscription_inactive", + "verdict": "not_owed", + "rule": "activity", + "side": "both", + "definition": "The period starts at or after a deactivated_at and before the matching reactivated_at (or deactivated_at is current). Periods that started before deactivated_at stay owed in full; after reactivation, coverage resumes at the first boundary at or after reactivated_at.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-state.json#/properties/inactive_intervals" + ] + }, + { + "code": "excluded:offering_unsupported", + "verdict": "not_owed", + "rule": "offering", + "side": "both", + "definition": "No offering matching the selector is available on the account's or the buy's products, so the buy (or the account) resolves nothing, whether computed from the wire or read from an excluded[] entry with reason offering_unsupported. An entry with package_ids removes those packages, not periods; the buy stays covered for its other packages.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded" + ] + }, + { + "code": "outside_flight", + "verdict": "not_owed", + "rule": "flight", + "side": "both", + "definition": "The period ends at or before the buy's start_time, or the flight is empty (its stop is at or before start_time), with flight values as of the period end. An extension or reinstatement made after the period ended does not change this.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ] + }, + { + "code": "after_stop", + "verdict": "not_owed", + "rule": "flight", + "side": "both", + "definition": "The period starts at or after the buy's stop time (the earliest of end_time, canceled_at, and completed_at as of the period end). The period containing the stop is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ] + }, + { + "code": "before_confirmation", + "verdict": "not_owed", + "rule": "confirmation", + "side": "both", + "definition": "The buy is not confirmed (confirmed_at null or absent), or the period ends at or before confirmed_at. The period in which the buy is confirmed ends after it and is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ] + }, + { + "code": "excluded:capacity", + "verdict": "not_owed", + "rule": "exception", + "side": "both", + "definition": "An excluded[] entry with reason capacity (for example beyond subscriptions.max_accounts), applying to the buy and offering, covers the period start in [from, until).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions" + ] + }, + { + "code": "excluded:overridden", + "verdict": "not_owed", + "rule": "exception", + "side": "both", + "definition": "An excluded[] entry with reason overridden covers the period start: the caller's own sync_accounts delivery config, or its own account_ids subscription replacing an all-accounts one, takes the account and feed_purpose.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/precedence" + ] + }, + { + "code": "excluded:action_required", + "verdict": "not_owed", + "rule": "exception", + "side": "both", + "definition": "An account-level excluded[] entry with reason action_required covers the period start: the seller serves the account only after pending_action completes.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded" + ] + }, + { + "code": "gap:unauthorized", + "verdict": "not_owed", + "rule": "gap", + "side": "both", + "definition": "A gaps[] entry applying to the offering covers the period start in [from, until), or, without backfill_on_regrant, the period ends after an unauthorized_at and starts before the re-grant that continued the chain (from is the last boundary at or before unauthorized_at, until the first at or after the re-grant).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends" + ] + }, + { + "code": "cutover_stretch", + "verdict": "not_owed", + "rule": "cutover", + "side": "both", + "definition": "The period straddles a handoff that leaves part of it owed under neither schedule. Under rule cutover: the period starts before the side's handoff E and ends after E, so the outgoing side, which owes up to E, covers only part of it; this is the incoming period containing the stretch from E to the incoming schedule's first boundary after E, which is shorter than one incoming period. Under rule timezone: every period of a zone outside that zone's span (a previous-zone period starting at or after effective_at, or a new-zone period starting before it).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers" + ] + }, + { + "code": "owed_under_other_version", + "verdict": "not_owed", + "rule": "cutover", + "side": "both", + "definition": "Another version's side owns the time: the period starts before the side's handoff E and ends at or before E (the outgoing version owes that time; for the same schedule, that very period), or it starts at or after the next change instant T, where the next version's side takes over. Periods after a deactivation take subscription_inactive.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions" + ] + }, + { + "code": "period_not_ended", + "verdict": "not_owed", + "rule": null, + "side": "both", + "definition": "No rule rejects the period, but it ends after now, so it has not resolved and is not yet owed. It becomes owed when it ends unless a later change removes it.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage" + ] + }, + { + "code": "owed", + "verdict": "owed", + "rule": null, + "side": "both", + "definition": "No rule rejects the period and it has ended at or before now. A missing report for it is the seller's to explain.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ] + }, + { + "code": "owed:regrant_backfill", + "verdict": "owed", + "rule": null, + "side": "both", + "definition": "Owed because backfill_on_regrant is true: without it the period would take gap:unauthorized (it ends after an unauthorized_at and starts before the re-grant that continued the chain). Due at the re-grant time plus the offering's delivery_sla.", + "spec_refs": [ + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends" + ] + }, + { + "code": "owed:withheld", + "verdict": "owed", + "rule": null, + "side": "both", + "definition": "Owed, and the caller's authority is currently lost: the period ended at or before the latest unauthorized_at and no re-grant has followed yet. The seller withholds it (counted in withheld_period_count when not yet delivered); it is never missing or delayed, and is owed again on re-grant.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends" + ] + }, + { + "code": "buy_not_visible", + "verdict": "not_owed", + "rule": "scope", + "side": "seller", + "definition": "Seller-only. The buy exists in the account, but the caller cannot see it through get_media_buys (for example it was created in the seller's UI or by another agent), so it is not covered. Never sent to the buyer.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage" + ] + } + ] +} diff --git a/tests/fixtures/reporting_subscriptions/spec/vectors.json b/tests/fixtures/reporting_subscriptions/spec/vectors.json new file mode 100644 index 000000000..d71be543a --- /dev/null +++ b/tests/fixtures/reporting_subscriptions/spec/vectors.json @@ -0,0 +1,15513 @@ +{ + "contract_version": "3.3", + "feature": "media_buy.reporting_subscriptions", + "status": "experimental", + "description": "Canonical, SDK-independent coverage vectors for experimental principal-level reporting subscriptions: for each input, every period the seller owes. Each case gives the buyer-side input and either the exact owed periods (expected, one row per buy, resolved offering, and period, and expected_obligations, the same rows grouped the way obligations carry them) or the input error (expected_error). Every expected row is derived from the spec text cited in spec_refs. scripts/reference/reporting-coverage is a brute-force reference model, written from the same text, that reproduces every case; tests/reporting-subscription-coverage-vectors.test.cjs runs it. Each case validates against case.schema.json in this directory. Like the feature, the vectors are experimental and change with it.", + "tzdata": { + "version": "2026f", + "source": "https://data.iana.org/time-zones/releases/tzdata2026f.tar.gz", + "source_sha512": "26189803c8b3e903dcc467404e2feefb7d190cb1870249a23577ce31e9dcbf187e4704e0b45c8d1366d1c501bb5b53a2e80f8e2828b2163be15e532f6acab52d", + "stability": "Expected rows are derived with this IANA tzdata release. Each case lists the zones its rows depend on in timezones. Dates are chosen where releases 2026b through 2026f agree, so an implementation on any of them reproduces every case; compare against this release when they differ." + }, + "conventions": { + "instants": "Every timestamp is an RFC 3339 instant and may carry fractional seconds or a non-Z offset. Compare instants, never strings. Expected rows write instants in Z form, with fractional seconds only when they are non-zero. Inputs carry at most millisecond precision.", + "rows": "expected has one row per (media buy, resolved offering, owed period), ordered by period_start, then subscription_version, then offering_id and media_buy_id in byte order. subscription_id, account_id, and report_definition_id are omitted: they are input.subscription_id, input.account.account_id, and the offering's report_definition_id.", + "obligations": "expected_obligations groups expected by subscription_version, offering_id, period_start, and period_end, with media_buy_ids sorted in byte order, the obligation's frozen media_buy_ids. Ordered by period_start, then subscription_version, then offering_id in byte order.", + "now": "Only resolved periods are expected: those whose period_end is at or before input.now.", + "input": "The input is what the buyer holds: its subscription versions as the get_principal readback shows them, the account's grants and timezone, the buys it can see through get_media_buys, the seller's offerings, and this subscription's get_reporting_status subscription_coverage entry for the account. case.schema.json describes each field.", + "non_wire_inputs": "Lists input fields no AdCP response carries, which a buyer must retain itself to agree with the seller: buys[].prior_flights (flight values before an update) and offerings[].available_from or withdrawn_at (when an offering became or stopped being available, which changes a resolution).", + "expected_error": "When the input cannot determine coverage, expected_error gives the error code and detail an SDK raises, from error-codes.json in this directory (COVERAGE_INPUT_INCOMPLETE or COVERAGE_INPUT_INVALID). wire_valid is false when the input also fails AdCP schema validation.", + "vocabularies": "error-codes.json freezes the error codes SDKs raise for subscriptions and coverage; reason-codes.json freezes the reasons a period is or is not owed. Both SDKs use them verbatim." + }, + "cases": [ + { + "id": "baseline", + "name": "baseline", + "origin": "adcp-client#3505", + "rule": "adcp#8593: the start bound is the first boundary at or after max(accepted_at 11-01T12, authorized_at 10-01) = 11-02; owed are the periods from it that end after confirmed_at 11-02T15 and overlap the flight (11-03 on), through the period containing the stop time.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "mid-period-confirmed-at", + "name": "mid-period confirmed_at", + "origin": "adcp-client#3505", + "rule": "adcp#8593: confirmed_at 11-03T10 falls inside the first flight day. That period ends after confirmed_at, so it is owed in full; confirmed_at no longer moves the start to the next boundary.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T10:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "confirmed-long-before-the-flight", + "name": "confirmed long before the flight", + "origin": "adcp-client#3505", + "rule": "A buy confirmed before accepted_at with a later start owes nothing before start_time.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-20T00:00:00Z", + "start_time": "2026-11-10T00:00:00Z", + "end_time": "2026-11-12T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "stop-time-mid-period-is-owed-in-full", + "name": "stop time mid-period is owed in full", + "origin": "adcp-client#3505", + "rule": "end_time 11-05T12 is inside the 11-05 period, which is owed in full: periods are never clipped.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "cancellation-mid-flight", + "name": "cancellation mid-flight", + "origin": "adcp-client#3505", + "rule": "canceled_at 11-05T06 is the stop time (earlier than end_time 11-10); its period is owed and none after.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-10T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "canceled_at": "2026-11-05T06:00:00Z" + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "early-completion-on-a-boundary", + "name": "early completion on a boundary", + "origin": "adcp-client#3505", + "rule": "completed_at 11-04T00 stops the flight on a boundary: the 11-04 period does not overlap [start, stop).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-10T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "completed_at": "2026-11-04T00:00:00Z" + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "flight-extension-adds-only-unresolved-periods", + "name": "flight extension adds only unresolved periods", + "origin": "adcp-client#3505", + "rule": "end_time moved 11-06 -> 11-08 at 11-07T12. The 11-06 period resolved at 11-07T00 under the old end_time and is never owed retroactively; 11-07 resolves after the extension.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "non_wire_inputs": ["buys[].prior_flights"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "prior_flights": [{"replaced_at": "2026-11-07T12:00:00Z", "start_time": "2026-11-03T00:00:00Z", "end_time": "2026-11-06T00:00:00Z"}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "reinstatement-after-cancellation", + "name": "reinstatement after cancellation", + "origin": "adcp-client#3505", + "rule": "Canceled at 11-04T12, reinstated at 11-06T12. 11-05 resolved while canceled and stays unowed; 11-06 onward resolve after reinstatement.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "non_wire_inputs": ["buys[].prior_flights"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "prior_flights": [ + { + "replaced_at": "2026-11-06T12:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "canceled_at": "2026-11-04T12:00:00Z" + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "only-resolved-periods-are-returned", + "name": "only resolved periods are returned", + "origin": "adcp-client#3505", + "rule": "With now at 11-05T12, the 11-05 period has not ended.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-11-05T12:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "unconfirmed-buy", + "name": "unconfirmed buy", + "origin": "adcp-client#3505", + "rule": "A buy with confirmed_at null is not covered.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": null, + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "late-authorization-authorized-at-refinement", + "name": "late authorization (authorized_at refinement)", + "origin": "adcp-client#3505", + "rule": "authorized_at 11-04T10 is the latest of the three start terms: coverage starts at 11-05.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-11-04T10:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "new-subscription-version-aligned-schedules", + "name": "new subscription version, aligned schedules", + "origin": "adcp-client#3505", + "rule": "v2 accepted 11-04T12. v1 owes periods starting before T in full (11-03, 11-04); E = 11-05 and v2 owes from there. Contiguous, nothing twice.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "new-subscription-version-misaligned-boundaries", + "name": "new subscription version, misaligned boundaries", + "origin": "adcp-client#3505", + "rule": "v1 resolves a UTC day offering, v2 (alignment account_timezone) a New York day offering. v1 owes UTC days starting before 11-04T12 (E = 11-05T00Z); v2 owes New York days starting at or after E, the first being 11-05T05Z. 11-05T00Z-05Z is owed under neither.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T05:00:00Z", + "period_end": "2026-11-07T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T05:00:00Z", + "period_end": "2026-11-07T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "deactivation", + "name": "deactivation", + "origin": "adcp-client#3505", + "rule": "deactivated_at 11-04T12: the 11-04 period started before it and stays owed in full; nothing later.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": false, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "deactivated_at": "2026-11-04T12:00:00Z" + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "deactivation-then-reactivation-in-place", + "name": "deactivation then reactivation in place", + "origin": "adcp-client#3505", + "rule": "Readback inactive_intervals [11-04T12, 11-06T12): a cutover out at 11-04T12 and a fresh start at the first boundary at or after 11-06T12 (11-07).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/inactive_intervals", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-09T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "inactive_intervals": [{"deactivated_at": "2026-11-04T12:00:00Z", "reactivated_at": "2026-11-06T12:00:00Z"}] + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "account-new-in-a-later-version", + "name": "account new in a later version", + "origin": "adcp-client#3505", + "rule": "v1 names another account; v2 (all accounts, accepted 11-04T12) brings acct_1 in under the ordinary start rule: 11-05.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-subscription.json#/properties/scope", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_other"]}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "excluded-by-buyer-scope", + "name": "excluded_by_buyer scope", + "origin": "adcp-client#3505", + "rule": "An all-accounts subscription that lists the account in exclude_account_ids covers nothing for it.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/properties/scope", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_1"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "operator-domains-scope", + "name": "operator_domains scope", + "origin": "adcp-client#3505", + "rule": "operator_domains keeps only accounts whose operator is listed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/properties/scope", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "operator_domains": ["agency.example"] + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}], + "operator": "other-agency.example" + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "revocation", + "name": "revocation", + "origin": "adcp-client#3505", + "rule": "unauthorized_at 11-05T06: periods starting at or after the last boundary at or before it (11-05) are not owed. 11-03 and 11-04 ended before it and stay owed (withheld until re-grant if undelivered).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-05T06:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-without-backfill", + "name": "re-grant without backfill", + "origin": "adcp-client#3505", + "rule": "Re-granted 11-06T18 within status_retention_days: the gap [11-05, 11-07) is not owed; coverage resumes at 11-07 and the earlier periods stay owed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-05T06:00:00Z"}, {"authorized_at": "2026-11-06T18:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30 + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-with-backfill-on-regrant", + "name": "re-grant with backfill_on_regrant", + "origin": "adcp-client#3505", + "rule": "With backfill_on_regrant no gap is recorded and every period in the revoked interval stays owed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-05T06:00:00Z"}, {"authorized_at": "2026-11-06T18:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30, + "backfill_on_regrant": true + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-after-the-unauthorized-entry-expired", + "name": "re-grant after the unauthorized entry expired", + "origin": "adcp-client#3505", + "rule": "status_retention_days 1: the entry expired at 11-06T06, so the 11-06T18 re-grant is a fresh start from authorized_at (11-07) and backfill does not apply.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-05T06:00:00Z"}, {"authorized_at": "2026-11-06T18:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 1, + "backfill_on_regrant": true + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "seller-gaps-also-remove-periods", + "name": "seller gaps also remove periods", + "origin": "adcp-client#3505", + "rule": "A gaps[] entry the seller published removes the periods starting in [from, until), like an exception.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": {"gaps": [{"from": "2026-11-04T00:00:00Z", "until": "2026-11-05T00:00:00Z", "reason": "unauthorized"}]} + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "exceptions-only-remove-periods", + "name": "exceptions only remove periods", + "origin": "adcp-client#3505", + "rule": "Account-level capacity [11-04, 11-06) removes 11-04 and 11-05 for every buy; a buy-level offering_unsupported removes mb_2 from 11-03; a package_ids entry removes packages, not periods; an exception before coverage adds nothing.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + }, + { + "media_buy_id": "mb_2", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "excluded": [ + {"reason": "capacity", "from": "2026-11-04T00:00:00Z", "until": "2026-11-06T00:00:00Z"}, + {"reason": "offering_unsupported", "media_buy_id": "mb_2", "from": "2026-11-03T00:00:00Z"}, + {"reason": "offering_unsupported", "media_buy_id": "mb_1", "package_ids": ["pkg_9"], "from": "2026-11-03T00:00:00Z"}, + {"reason": "excluded_by_buyer", "from": "2026-10-01T00:00:00Z", "until": "2026-10-05T00:00:00Z"} + ] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "max-accounts-capacity-exception", + "name": "max_accounts capacity exception", + "origin": "adcp-client#3505", + "rule": "Beyond subscriptions.max_accounts the seller records an open account-level capacity exception; nothing is owed from its from.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": {"excluded": [{"reason": "capacity", "from": "2026-11-04T00:00:00Z"}]} + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "precedence-over-an-account-level-configuration", + "name": "precedence over an account-level configuration", + "origin": "adcp-client#3505", + "rule": "The caller's own sync_accounts configuration takes the account from 11-04 to 11-05 (overridden), after which replace_account_configs hands it back.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/precedence", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "excluded": [ + { + "reason": "overridden", + "from": "2026-11-04T00:00:00Z", + "until": "2026-11-05T00:00:00Z", + "overridden_by": {"delivery_config_id": "acme-analytics"} + } + ] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-exact-default-with-dimensions", + "name": "match exact (default with dimensions)", + "origin": "adcp-client#3505", + "rule": "exact [package] picks the offering whose dimension set equals it; package x device (unmapped device) is distinct.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-exact-with-no-equal-offering", + "name": "match exact with no equal offering", + "origin": "adcp-client#3505", + "rule": "exact [package] against package x creative, package x country and package x device (unmapped) resolves nothing: offering_unsupported, no periods.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "match-exact-on-two-dimensions", + "name": "match exact on two dimensions", + "origin": "adcp-client#3505", + "rule": "exact [package, country] picks package x country.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package", "country"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-finest", + "name": "match finest", + "origin": "adcp-client#3505", + "rule": "finest [package] picks the most mapped dimensions among offerings including package; package x creative and package x country tie at two, so the lowest offering_id in byte order wins.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "finest" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-defaults-to-finest-without-dimensions", + "name": "match defaults to finest without dimensions", + "origin": "adcp-client#3505", + "rule": "No dimensions: match defaults to finest over every candidate.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official"}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-all", + "name": "match all", + "origin": "adcp-client#3505", + "rule": "all [package] picks every offering including package, each owed its own periods (package x device included: it includes package).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_c_pkg_country", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_d_pkg_device", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "product-eligibility-gates-candidates", + "name": "product eligibility gates candidates", + "origin": "adcp-client#3505", + "rule": "Only offerings in the product's reporting_delivery_offering_ids are candidates; a package with none leaves the buy covered by its other packages.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + {"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}, + {"package_id": "pkg_2", "reporting_delivery_offering_ids": []} + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "finality-purpose-and-duration-must-match", + "name": "finality, purpose and duration must match", + "origin": "adcp-client#3505", + "rule": "An offering advertising only snapshot finality, another feed_purpose, or another period_duration is never a candidate.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg", "off_c_pkg", "off_d_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_b_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_c_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_d_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_d_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_d_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_d_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_d_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "resolution-change-is-a-cutover", + "name": "resolution change is a cutover", + "origin": "adcp-client#3505", + "rule": "finest [package]: package x creative becomes available at 11-04T12, changing the resolution. The old offering owes periods starting before it (11-03, 11-04); the new one owes from E = 11-05.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "non_wire_inputs": ["offerings[].available_from/withdrawn_at"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "finest" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"], + "available_from": "2026-11-04T12:00:00Z" + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "account-timezone", + "name": "account timezone", + "origin": "adcp-client#3505", + "rule": "An account_timezone offering uses New York midnights (05:00Z in November). accepted_at 11-01T12Z: first boundary 11-02T05Z. The 11-02T05Z day contains confirmed_at 11-02T15Z and overlaps the flight from 11-03T00Z, so it is owed (adcp#8593).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "account-timezone-across-a-dst-change", + "name": "account timezone across a DST change", + "origin": "adcp-client#3505", + "rule": "New York falls back on 2026-11-01: the 11-01 local day is 25 hours, 04:00Z to 05:00Z the next day.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-30T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-30T00:00:00Z", + "start_time": "2026-10-31T12:00:00Z", + "end_time": "2026-11-02T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-10-31T04:00:00Z", + "period_end": "2026-11-01T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-11-02T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-10-31T04:00:00Z", + "period_end": "2026-11-01T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-11-02T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "account-timezone-change-is-a-cutover", + "name": "account timezone change is a cutover", + "origin": "adcp-client#3505", + "rule": "The account moves to Los Angeles (account.timezone is the current zone); timezone_cutovers.effective_at 11-05T05Z is E and previous_timezone New York governs before it. New York days starting before E are owed, then Los Angeles days from the first boundary at or after it (11-05T08Z). 05Z-08Z is owed under neither.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Los_Angeles", "America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Los_Angeles", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T05:00:00Z", + "end_time": "2026-11-08T08:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "timezone_cutovers": [{"effective_at": "2026-11-05T05:00:00Z", "timezone": "America/Los_Angeles", "previous_timezone": "America/New_York"}] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T08:00:00Z", + "period_end": "2026-11-07T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T08:00:00Z", + "period_end": "2026-11-08T08:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T08:00:00Z", + "period_end": "2026-11-07T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T08:00:00Z", + "period_end": "2026-11-08T08:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "period-timezone-override", + "name": "period_timezone override", + "origin": "adcp-client#3505", + "rule": "A single-account subscription with period_timezone Asia/Tokyo uses Tokyo midnights (15:00Z). confirmed_at 11-02T15Z is itself a boundary, so the period ending at it is not owed and the one starting at it is.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Asia/Tokyo"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone", + "period_timezone": "Asia/Tokyo" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T15:00:00Z", + "period_end": "2026-11-03T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T15:00:00Z", + "period_end": "2026-11-04T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T15:00:00Z", + "period_end": "2026-11-05T15:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T15:00:00Z", + "period_end": "2026-11-03T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T15:00:00Z", + "period_end": "2026-11-04T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T15:00:00Z", + "period_end": "2026-11-05T15:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "hourly-periods-are-never-clipped", + "name": "hourly periods are never clipped", + "origin": "adcp-client#3505", + "rule": "Flight 10:30-13:15, confirmed 10:20: the 10:00 period ends after confirmed_at and overlaps the flight, so it is owed in full (adcp#8593), and the 13:00 period containing the stop is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "pacing", "period_duration": "PT1H", "required_finality": "snapshot", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T10:20:00Z", + "start_time": "2026-11-03T10:30:00Z", + "end_time": "2026-11-03T13:15:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_h_pkg_hourly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_h_pkg_hourly", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_h_pkg_hourly", + "report_definition_uri": "https://seller.example/report-definitions/off_h_pkg_hourly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T10:00:00Z", + "period_end": "2026-11-03T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T13:00:00Z", + "period_end": "2026-11-03T14:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T10:00:00Z", + "period_end": "2026-11-03T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T13:00:00Z", + "period_end": "2026-11-03T14:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "monthly-billing-cycle", + "name": "monthly billing cycle", + "origin": "adcp-client#3505", + "changed_from_origin": "managed offerings completed to validate against reporting-delivery-offering.json (method.provider and method.format; canonicalization fields for consumer_receipt); coverage is unchanged", + "rule": "A fixed billing_cycle anchored at New York midnight: month boundaries move between 04:00Z (EDT) and 05:00Z (EST). The month containing the stop is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-15T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P1M", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-20T00:00:00Z", + "start_time": "2026-11-10T00:00:00Z", + "end_time": "2027-01-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_m_billing_monthly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_m_billing_monthly", + "feed_purpose": "billing", + "report_definition_id": "rd_off_m_billing_monthly", + "report_definition_uri": "https://seller.example/report-definitions/off_m_billing_monthly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P1M", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2026-01-01T05:00:00Z", + "period_timezone": "America/New_York" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2027-03-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-12-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2026-12-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2027-02-01T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-12-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2026-12-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2027-02-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "asap-buy-confirmed-mid-day-owes-the-confirmation-day", + "name": "ASAP buy confirmed mid-day owes the confirmation day", + "origin": "adcp-client#3505", + "rule": "adcp#8593: an ASAP buy starts when it is confirmed, 11-03T14:30Z. The 11-03 period ends after confirmed_at and overlaps the flight, so it is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T14:30:00Z", + "start_time": "2026-11-03T14:30:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "monthly-billing-buy-confirmed-on-the-12th-owes-that-month", + "name": "monthly billing buy confirmed on the 12th owes that month", + "origin": "adcp-client#3505", + "changed_from_origin": "managed offerings completed to validate against reporting-delivery-offering.json (method.provider and method.format; canonicalization fields for consumer_receipt); coverage is unchanged", + "rule": "adcp#8593: the version was accepted 10-15, so the start bound is the November boundary (11-01T04Z). The buy is confirmed and starts on 11-12; the November month ends after confirmed_at and overlaps the flight, so it is owed in full rather than starting in December.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-15T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P1M", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-12T15:00:00Z", + "start_time": "2026-11-12T15:00:00Z", + "end_time": "2027-01-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_m_billing_monthly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_m_billing_monthly", + "feed_purpose": "billing", + "report_definition_id": "rd_off_m_billing_monthly", + "report_definition_uri": "https://seller.example/report-definitions/off_m_billing_monthly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P1M", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2026-01-01T05:00:00Z", + "period_timezone": "America/New_York" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2027-03-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-12-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2026-12-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m_billing_monthly", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2027-02-01T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-12-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2026-12-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m_billing_monthly", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2027-02-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "destination-selects-managed-offerings-only", + "name": "destination selects managed offerings only", + "origin": "adcp-client#3505", + "changed_from_origin": "managed offerings completed to validate against reporting-delivery-offering.json (method.provider and method.format; canonicalization fields for consumer_receipt); coverage is unchanged", + "rule": "With a destination only offerings whose method matches its pattern and transport are candidates; without one only Core (method-less) offerings are.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/destination", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "destination": {"destination_id": "archive", "path_template": "a/{account_id}"} + }, + "destination_method": {"pattern": "file_transfer", "transport": "gcs"} + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_s3_pkg", "off_t_gcs_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_s3_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s3_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_s3_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + }, + { + "offering_id": "off_t_gcs_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_t_gcs_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_t_gcs_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "gcs", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_t_gcs_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "multiple-buys-group-into-obligations", + "name": "multiple buys group into obligations", + "origin": "adcp-client#3505", + "rule": "Each (buy, offering) pair is owed its own periods; obligations group them by period with frozen media_buy_ids. mb_0, confirmed 11-03T12, is owed the 11-03 period it was confirmed in (adcp#8593).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + }, + { + "media_buy_id": "mb_0", + "confirmed_at": "2026-11-03T12:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_0", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_0", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_0", "mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_0", "mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "timezone-cutover-scoped-to-one-offering", + "name": "timezone cutover scoped to one offering", + "origin": "adcp-client#3505", + "rule": "A timezone_cutovers entry with offering_id applies to that offering only; an offering with no applicable entry uses account.timezone (Los Angeles) throughout.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/properties/scope", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Los_Angeles", "America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Los_Angeles", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T08:00:00Z", + "end_time": "2026-11-06T08:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz", "off_f_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_f_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_f_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_f_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "timezone_cutovers": [ + { + "offering_id": "off_e_pkg_acct_tz", + "effective_at": "2026-11-05T05:00:00Z", + "timezone": "America/Los_Angeles", + "previous_timezone": "America/New_York" + } + ] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-03T08:00:00Z", + "period_end": "2026-11-04T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-04T08:00:00Z", + "period_end": "2026-11-05T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-03T08:00:00Z", + "period_end": "2026-11-04T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-04T08:00:00Z", + "period_end": "2026-11-05T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_f_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "gap-scoped-to-one-offering", + "name": "gap scoped to one offering", + "origin": "adcp-client#3505", + "rule": "A gaps[] entry with offering_id removes only that offering's periods; an entry without offering_id applies to every offering.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/properties/scope", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": {"gaps": [{"offering_id": "off_a_pkg", "from": "2026-11-04T00:00:00Z", "until": "2026-11-05T00:00:00Z", "reason": "unauthorized"}]} + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-exact-without-dimensions", + "name": "match exact without dimensions", + "origin": "adcp-client#3505", + "rule": "exact with no dimensions: every candidate qualifies and the lowest offering_id in byte order wins.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "match": "exact"}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "period-timezone-never-matches-an-account-resolved-source-timezone-offering", + "name": "period_timezone never matches an account-resolved source_timezone offering", + "origin": "adcp-client#3505", + "rule": "A source_timezone offering matches a period_timezone override only when its published period_timezone equals it; an account_resolved offering publishes none.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "period_timezone": "America/New_York" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}], + "source_timezone": "America/New_York" + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_s_resolved"]}] + } + ], + "offerings": [ + { + "offering_id": "off_s_resolved", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s_resolved", + "report_definition_uri": "https://seller.example/report-definitions/off_s_resolved.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "source_timezone", "delivery_sla": "PT6H", "period_timezone_policy": "account_resolved"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "period-timezone-matches-a-fixed-source-timezone-offering-in-the-same-zone", + "name": "period_timezone matches a fixed source_timezone offering in the same zone", + "origin": "adcp-client#3505", + "rule": "A fixed source_timezone offering publishing America/New_York matches a New York override and keeps its own boundaries (05:00Z in November).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "period_timezone": "America/New_York" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_s_fixed"]}] + } + ], + "offerings": [ + { + "offering_id": "off_s_fixed", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s_fixed", + "report_definition_uri": "https://seller.example/report-definitions/off_s_fixed.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": { + "period_duration": "P1D", + "alignment": "source_timezone", + "delivery_sla": "PT6H", + "period_timezone_policy": "fixed", + "period_timezone": "America/New_York" + }, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_fixed", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_fixed", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_fixed", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_s_fixed", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_fixed", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_fixed", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "a-utc-offering-matches-only-utc-or-etc-utc", + "name": "a utc offering matches only UTC or Etc/UTC", + "origin": "adcp-client#3505", + "rule": "period_timezone GMT is not one of the UTC aliases core/reporting-subscription.json names, so the utc offering does not match.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "period_timezone": "GMT" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "empty-flight-canceled-before-start-time", + "name": "empty flight: canceled before start_time", + "origin": "adcp-client#3505", + "rule": "canceled_at 11-05T02 is before start_time 11-05T06: the flight [start, stop) is empty and overlaps nothing, though the 11-05 period contains both instants.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-05T06:00:00Z", + "end_time": "2026-11-10T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "canceled_at": "2026-11-05T02:00:00Z" + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "empty-flight-stop-equal-to-start", + "name": "empty flight: stop equal to start", + "origin": "adcp-client#3505", + "rule": "A zero-length flight (end_time equal to start_time at 11-03T12) is empty and overlaps nothing.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T12:00:00Z", + "end_time": "2026-11-03T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "two-cutovers-inside-one-period", + "name": "two cutovers inside one period", + "origin": "adcp-client#3505", + "rule": "v2 (11-04T12Z) switches to a Tokyo period_timezone and v3 (11-04T13Z) changes nothing else. v1 owes its New York day starting 11-04T05Z, through 11-05T05Z. v2 owes from that E and starts nothing before 13Z. v3 must carry v2's own start forward: it owes Tokyo days from the first boundary at or after 11-05T05Z (11-05T15Z), never the overlapping 11-04T15Z.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York", "Asia/Tokyo"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "superseded_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "superseded_at": "2026-11-04T13:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone", + "period_timezone": "Asia/Tokyo" + }, + "reconciliation_mode": "delivery_only" + } + }, + { + "subscription_version": 3, + "accepted_at": "2026-11-04T13:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 3, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone", + "period_timezone": "Asia/Tokyo", + "match": "exact" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 3, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T15:00:00Z", + "period_end": "2026-11-06T15:00:00Z" + }, + { + "subscription_version": 3, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T15:00:00Z", + "period_end": "2026-11-07T15:00:00Z" + }, + { + "subscription_version": 3, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T15:00:00Z", + "period_end": "2026-11-08T15:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 3, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T15:00:00Z", + "period_end": "2026-11-06T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 3, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T15:00:00Z", + "period_end": "2026-11-07T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 3, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T15:00:00Z", + "period_end": "2026-11-08T15:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "simultaneous-version-and-timezone-change-at-the-same-t", + "name": "simultaneous version and timezone change at the same T", + "origin": "adcp-client#3505", + "rule": "v2 is accepted at 11-05T05Z, exactly the timezone cutover effective_at (a New York boundary). v1 owes New York days starting before it; v2 owes Los Angeles days from the first boundary at or after it (11-05T08Z).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Los_Angeles", "America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-05T05:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Los_Angeles", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T08:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "timezone_cutovers": [{"effective_at": "2026-11-05T05:00:00Z", "timezone": "America/Los_Angeles", "previous_timezone": "America/New_York"}] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T08:00:00Z", + "period_end": "2026-11-07T08:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T08:00:00Z", + "period_end": "2026-11-08T08:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T08:00:00Z", + "period_end": "2026-11-06T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T08:00:00Z", + "period_end": "2026-11-07T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T08:00:00Z", + "period_end": "2026-11-08T08:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "billing-cycle-anchored-on-the-31st-clamps-to-month-end", + "name": "billing cycle anchored on the 31st clamps to month end", + "origin": "adcp-client#3505", + "changed_from_origin": "managed offerings completed to validate against reporting-delivery-offering.json (method.provider and method.format; canonicalization fields for consumer_receipt); coverage is unchanged", + "rule": "P1M from 2026-01-31 New York midnight: the 31st clamps to Feb 28 and returns to the 31st in March (a clamped February boundary does not shift the anchor day).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-01-15T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P1M", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2025-12-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-01-20T00:00:00Z", + "start_time": "2026-02-10T00:00:00Z", + "end_time": "2026-04-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_m31"]}] + } + ], + "offerings": [ + { + "offering_id": "off_m31", + "feed_purpose": "billing", + "report_definition_id": "rd_off_m31", + "report_definition_uri": "https://seller.example/report-definitions/off_m31.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P1M", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2026-01-31T05:00:00Z", + "period_timezone": "America/New_York" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2026-06-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31", + "period_start": "2026-01-31T05:00:00Z", + "period_end": "2026-02-28T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31", + "period_start": "2026-02-28T05:00:00Z", + "period_end": "2026-03-31T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31", + "period_start": "2026-03-31T04:00:00Z", + "period_end": "2026-04-30T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_m31", + "period_start": "2026-01-31T05:00:00Z", + "period_end": "2026-02-28T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m31", + "period_start": "2026-02-28T05:00:00Z", + "period_end": "2026-03-31T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m31", + "period_start": "2026-03-31T04:00:00Z", + "period_end": "2026-04-30T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "billing-cycle-anchored-on-february-29", + "name": "billing cycle anchored on February 29", + "origin": "adcp-client#3505", + "changed_from_origin": "managed offerings completed to validate against reporting-delivery-offering.json (method.provider and method.format; canonicalization fields for consumer_receipt); coverage is unchanged", + "rule": "P1Y from 2024-02-29T00:00Z: non-leap years clamp to Feb 28 and 2028 returns to Feb 29.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["UTC"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-12-01T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P1Y", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2025-11-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-12-15T00:00:00Z", + "start_time": "2026-01-01T00:00:00Z", + "end_time": "2027-06-01T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_y29"]}] + } + ], + "offerings": [ + { + "offering_id": "off_y29", + "feed_purpose": "billing", + "report_definition_id": "rd_off_y29", + "report_definition_uri": "https://seller.example/report-definitions/off_y29.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P1Y", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2024-02-29T00:00:00Z", + "period_timezone": "UTC" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2028-06-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_y29", + "period_start": "2026-02-28T00:00:00Z", + "period_end": "2027-02-28T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_y29", + "period_start": "2027-02-28T00:00:00Z", + "period_end": "2028-02-29T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_y29", + "period_start": "2026-02-28T00:00:00Z", + "period_end": "2027-02-28T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_y29", + "period_start": "2027-02-28T00:00:00Z", + "period_end": "2028-02-29T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "dst-fold-at-midnight-america-santiago", + "name": "DST fold at midnight (America/Santiago)", + "origin": "adcp-client#3505", + "rule": "Chile falls back at 24:00 on 2026-04-04 to 23:00, so April 4 is a 25-hour local day; local midnight April 5 occurs once, at 04:00Z.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Santiago"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Santiago", "grants": [{"authorized_at": "2026-02-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-15T00:00:00Z", + "start_time": "2026-04-03T00:00:00Z", + "end_time": "2026-04-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_s_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_s_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_s_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-10-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-02T03:00:00Z", + "period_end": "2026-04-03T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-03T03:00:00Z", + "period_end": "2026-04-04T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-04T03:00:00Z", + "period_end": "2026-04-05T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-05T04:00:00Z", + "period_end": "2026-04-06T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-06T04:00:00Z", + "period_end": "2026-04-07T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-02T03:00:00Z", + "period_end": "2026-04-03T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-03T03:00:00Z", + "period_end": "2026-04-04T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-04T03:00:00Z", + "period_end": "2026-04-05T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-05T04:00:00Z", + "period_end": "2026-04-06T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-04-06T04:00:00Z", + "period_end": "2026-04-07T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "dst-gap-at-midnight-america-santiago", + "name": "DST gap at midnight (America/Santiago)", + "origin": "adcp-client#3505", + "rule": "Chile springs forward at 24:00 on 2026-09-05 to 01:00: local midnight September 6 does not exist and the boundary advances by the gap to 04:00Z, so September 6 is a 23-hour local day.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Santiago"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Santiago", "grants": [{"authorized_at": "2026-02-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-15T00:00:00Z", + "start_time": "2026-09-05T12:00:00Z", + "end_time": "2026-09-07T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_s_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_s_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_s_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-10-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-05T04:00:00Z", + "period_end": "2026-09-06T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-06T04:00:00Z", + "period_end": "2026-09-07T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-07T03:00:00Z", + "period_end": "2026-09-08T03:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-05T04:00:00Z", + "period_end": "2026-09-06T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-06T04:00:00Z", + "period_end": "2026-09-07T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_s_pkg_acct_tz", + "period_start": "2026-09-07T03:00:00Z", + "period_end": "2026-09-08T03:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "zero-length-period-on-a-skipped-civil-date-pacific-apia", + "name": "zero-length period on a skipped civil date (Pacific/Apia)", + "origin": "adcp-client#3505", + "rule": "Samoa skipped 2011-12-30: that local day has zero length (its midnight and the next coincide at 10:00Z) and is never owed; the surrounding days are.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Pacific/Apia"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2011-12-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Pacific/Apia", "grants": [{"authorized_at": "2011-11-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2011-12-01T00:00:00Z", + "start_time": "2011-12-28T12:00:00Z", + "end_time": "2011-12-31T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2012-02-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-28T10:00:00Z", + "period_end": "2011-12-29T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-29T10:00:00Z", + "period_end": "2011-12-30T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-30T10:00:00Z", + "period_end": "2011-12-31T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-31T10:00:00Z", + "period_end": "2012-01-01T10:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-28T10:00:00Z", + "period_end": "2011-12-29T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-29T10:00:00Z", + "period_end": "2011-12-30T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-30T10:00:00Z", + "period_end": "2011-12-31T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2011-12-31T10:00:00Z", + "period_end": "2012-01-01T10:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "pt24h-under-a-local-alignment-restarts-at-local-midnight", + "name": "PT24H under a local alignment restarts at local midnight (#8588)", + "origin": "adcp-client#3505", + "rule": "Under account_timezone a duration of only hours restarts at each local midnight (adcp#8588), so PT24H in New York across the 2026-03-08 spring-forward has a 23-hour period, exactly like P1D.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "PT24H", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-02-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-01T00:00:00Z", + "start_time": "2026-03-07T12:00:00Z", + "end_time": "2026-03-09T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_h24_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_h24_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_h24_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_h24_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT24H", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-04-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-07T05:00:00Z", + "period_end": "2026-03-08T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-09T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-09T04:00:00Z", + "period_end": "2026-03-10T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-07T05:00:00Z", + "period_end": "2026-03-08T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-09T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h24_acct_tz", + "period_start": "2026-03-09T04:00:00Z", + "period_end": "2026-03-10T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "pt24h-and-p1d-under-utc-are-the-same-days", + "name": "PT24H and P1D under utc are the same days", + "origin": "adcp-client#3505", + "rule": "UTC has no DST, so PT24H and P1D yield identical boundaries under utc alignment.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "PT24H", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_u24"]}] + } + ], + "offerings": [ + { + "offering_id": "off_u24", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_u24", + "report_definition_uri": "https://seller.example/report-definitions/off_u24.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT24H", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u24", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u24", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u24", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_u24", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_u24", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_u24", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "sub-daily-local-periods-start-on-the-local-hour-asia-singapore", + "name": "sub-daily local periods start on the local hour (Asia/Singapore)", + "origin": "adcp-client#3505", + "rule": "adcp#8588: hourly periods under account_timezone are local wall-clock hours counted from each local midnight, not 1970 offsets (Singapore was +07:30 in 1970). confirmed_at 00:05Z falls in the 00:00Z (08:00 local) hour, which ends after it and overlaps the flight, so it is owed (adcp#8593).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Asia/Singapore"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Asia/Singapore", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T00:05:00Z", + "start_time": "2026-11-03T00:10:00Z", + "end_time": "2026-11-03T02:30:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-03T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T01:00:00Z", + "period_end": "2026-11-03T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T02:00:00Z", + "period_end": "2026-11-03T03:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-03T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T01:00:00Z", + "period_end": "2026-11-03T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T02:00:00Z", + "period_end": "2026-11-03T03:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "sub-daily-local-periods-on-a-25-hour-day-america-new-york-fall-back", + "name": "sub-daily local periods on a 25-hour day (America/New_York fall-back)", + "origin": "adcp-client#3505", + "rule": "adcp#8588: the repeated 01:00 yields one boundary per offset, so 2026-11-01 in New York has 25 hourly periods.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-30T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-30T00:00:00Z", + "start_time": "2026-11-01T04:00:00Z", + "end_time": "2026-11-02T05:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-11-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T05:00:00Z", + "period_end": "2026-11-01T06:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T06:00:00Z", + "period_end": "2026-11-01T07:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T07:00:00Z", + "period_end": "2026-11-01T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T08:00:00Z", + "period_end": "2026-11-01T09:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T09:00:00Z", + "period_end": "2026-11-01T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T10:00:00Z", + "period_end": "2026-11-01T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T11:00:00Z", + "period_end": "2026-11-01T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T12:00:00Z", + "period_end": "2026-11-01T13:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T13:00:00Z", + "period_end": "2026-11-01T14:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T14:00:00Z", + "period_end": "2026-11-01T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T15:00:00Z", + "period_end": "2026-11-01T16:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T16:00:00Z", + "period_end": "2026-11-01T17:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T17:00:00Z", + "period_end": "2026-11-01T18:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T18:00:00Z", + "period_end": "2026-11-01T19:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T19:00:00Z", + "period_end": "2026-11-01T20:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T20:00:00Z", + "period_end": "2026-11-01T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T21:00:00Z", + "period_end": "2026-11-01T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T22:00:00Z", + "period_end": "2026-11-01T23:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T23:00:00Z", + "period_end": "2026-11-02T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-02T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T01:00:00Z", + "period_end": "2026-11-02T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T02:00:00Z", + "period_end": "2026-11-02T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T03:00:00Z", + "period_end": "2026-11-02T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T04:00:00Z", + "period_end": "2026-11-02T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T04:00:00Z", + "period_end": "2026-11-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T05:00:00Z", + "period_end": "2026-11-01T06:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T06:00:00Z", + "period_end": "2026-11-01T07:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T07:00:00Z", + "period_end": "2026-11-01T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T08:00:00Z", + "period_end": "2026-11-01T09:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T09:00:00Z", + "period_end": "2026-11-01T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T10:00:00Z", + "period_end": "2026-11-01T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T11:00:00Z", + "period_end": "2026-11-01T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T12:00:00Z", + "period_end": "2026-11-01T13:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T13:00:00Z", + "period_end": "2026-11-01T14:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T14:00:00Z", + "period_end": "2026-11-01T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T15:00:00Z", + "period_end": "2026-11-01T16:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T16:00:00Z", + "period_end": "2026-11-01T17:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T17:00:00Z", + "period_end": "2026-11-01T18:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T18:00:00Z", + "period_end": "2026-11-01T19:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T19:00:00Z", + "period_end": "2026-11-01T20:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T20:00:00Z", + "period_end": "2026-11-01T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T21:00:00Z", + "period_end": "2026-11-01T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T22:00:00Z", + "period_end": "2026-11-01T23:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-01T23:00:00Z", + "period_end": "2026-11-02T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-02T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T01:00:00Z", + "period_end": "2026-11-02T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T02:00:00Z", + "period_end": "2026-11-02T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T03:00:00Z", + "period_end": "2026-11-02T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T04:00:00Z", + "period_end": "2026-11-02T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-chain-of-three-grants-without-backfill", + "name": "re-grant chain of three grants without backfill", + "origin": "adcp-client#3505", + "rule": "Revoked 11-04T06 and re-granted 11-05T18, revoked 11-07T06 and re-granted 11-08T18, all inside retention: one chain with gaps [11-04, 11-06) and [11-07, 11-09).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [ + {"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-04T06:00:00Z"}, + {"authorized_at": "2026-11-05T18:00:00Z", "unauthorized_at": "2026-11-07T06:00:00Z"}, + {"authorized_at": "2026-11-08T18:00:00Z"} + ] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-10T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30 + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-chain-of-three-grants-with-backfill-on-regrant", + "name": "re-grant chain of three grants with backfill_on_regrant", + "origin": "adcp-client#3505", + "rule": "The same chain with backfill_on_regrant: no gap, every period owed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [ + {"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-04T06:00:00Z"}, + {"authorized_at": "2026-11-05T18:00:00Z", "unauthorized_at": "2026-11-07T06:00:00Z"}, + {"authorized_at": "2026-11-08T18:00:00Z"} + ] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-10T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30, + "backfill_on_regrant": true + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "re-grant-seen-only-through-the-chain-start-authorized-at", + "name": "re-grant seen only through the chain-start authorized_at", + "origin": "adcp-client#3505", + "rule": "The wire keeps authorized_at at the chain start after a re-grant inside retention (adcp#8585), so the buyer lists the continuation with that value; the seller's gaps[] says which periods the interruption removed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-04T06:00:00Z"}, {"authorized_at": "2026-10-01T00:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30, + "coverage": {"gaps": [{"from": "2026-11-04T00:00:00Z", "until": "2026-11-06T00:00:00Z", "reason": "unauthorized"}]} + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "two-authorization-chains", + "name": "two authorization chains", + "origin": "adcp-client#3505", + "rule": "Revoked 11-04T06; re-granted 11-10 after retention (1 day) expired, a new chain from 11-10; revoked again 11-12T06.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [ + {"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-04T06:00:00Z"}, + {"authorized_at": "2026-11-10T00:00:00Z", "unauthorized_at": "2026-11-12T06:00:00Z"} + ] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 1 + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "match-all-adds-an-offering-on-a-different-alignment", + "name": "match all adds an offering on a different alignment", + "origin": "adcp-client#3505", + "rule": "v2 (11-04T12Z) moves from exact to all and adds a New York offering. The UTC offering continues (E = 11-05T00Z); the New York offering is new and starts at the latest outgoing end, so its first period is 11-05T05Z and 00Z-05Z is owed by neither.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/period_timezone", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T05:00:00Z", + "period_end": "2026-11-07T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-06T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-06T05:00:00Z", + "period_end": "2026-11-07T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "version-change-exactly-on-a-boundary", + "name": "version change exactly on a boundary", + "origin": "adcp-client#3505", + "rule": "v2 accepted at 11-05T00Z, itself a boundary: E is T, v1 owes 11-03 and 11-04, v2 from 11-05.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-05T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "reactivation-exactly-on-a-boundary", + "name": "reactivation exactly on a boundary", + "origin": "adcp-client#3505", + "rule": "Inactive [11-04T12, 11-06T00): 11-04 started before deactivation and stays owed; coverage resumes at 11-06 itself.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/inactive_intervals", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "inactive_intervals": [{"deactivated_at": "2026-11-04T12:00:00Z", "reactivated_at": "2026-11-06T00:00:00Z"}] + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "inactive-interval-spanning-a-version-change", + "name": "inactive interval spanning a version change", + "origin": "adcp-client#3505", + "rule": "Deactivated under v1 at 11-04T12, v2 accepted while inactive at 11-05T12, reactivated 11-06T12: v1 owes 11-03 and 11-04, v2 starts fresh at 11-07.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "static/schemas/source/core/reporting-subscription-state.json#/properties/inactive_intervals", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-05T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-05T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-09T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "inactive_intervals": [{"deactivated_at": "2026-11-04T12:00:00Z", "reactivated_at": "2026-11-06T12:00:00Z"}] + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "exception-bounds-between-boundaries", + "name": "exception bounds between boundaries", + "origin": "adcp-client#3505", + "rule": "capacity [11-04T12, 11-06T12) removes the periods whose start is in it, 11-05 and 11-06; 11-04 started before from and stays owed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": {"excluded": [{"reason": "capacity", "from": "2026-11-04T12:00:00Z", "until": "2026-11-06T12:00:00Z"}]} + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "finest-tie-in-byte-order-b-before-a", + "name": "finest tie in byte order (B before a)", + "origin": "adcp-client#3505", + "rule": "Two offerings tie at two mapped dimensions; byte order puts uppercase B (0x42) before lowercase a (0x61), unlike locale order.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "finest" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["a", "B"]}] + } + ], + "offerings": [ + { + "offering_id": "a", + "feed_purpose": "analytics", + "report_definition_id": "rd_a", + "report_definition_uri": "https://seller.example/report-definitions/a.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "B", + "feed_purpose": "analytics", + "report_definition_id": "rd_B", + "report_definition_uri": "https://seller.example/report-definitions/B.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "B", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "B", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "B", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "B", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "B", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "B", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "unknown-dimension-values-parse-and-match-only-where-published", + "name": "unknown dimension values parse and match only where published", + "origin": "adcp-client#3505", + "rule": "The dimension vocabulary is extensible: an offering may publish placement, and a selector naming it matches that offering. A value no offering publishes (audience_segment) matches nothing.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package", "placement"] + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_q_pkg_placement", "off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_q_pkg_placement", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_q_pkg_placement", + "report_definition_uri": "https://seller.example/report-definitions/off_q_pkg_placement.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "placement"] + }, + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_q_pkg_placement", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "an-unknown-selector-dimension-no-offering-publishes-matches-nothing", + "name": "an unknown selector dimension no offering publishes matches nothing", + "origin": "adcp-client#3505", + "rule": "A selector naming a value the seller does not map matches no offering.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package", "audience_segment"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [ + { + "package_id": "pkg_1", + "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative", "off_c_pkg_country", "off_d_pkg_device"] + } + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + }, + { + "offering_id": "off_c_pkg_country", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_c_pkg_country", + "report_definition_uri": "https://seller.example/report-definitions/off_c_pkg_country.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "country"] + }, + { + "offering_id": "off_d_pkg_device", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_d_pkg_device", + "report_definition_uri": "https://seller.example/report-definitions/off_d_pkg_device.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"], + "unmapped_dimensions": ["device"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [], + "expected_obligations": [] + }, + { + "id": "numeric-offset-timezone-is-refused", + "name": "numeric offset timezone is refused", + "origin": "adcp-client#3505", + "changed_from_origin": "offering is account_timezone-aligned instead of utc-aligned", + "rule": "iana_timezone: an account_timezone offering reads its boundaries in the account timezone, and +05:00 is a numeric offset, not an IANA zone, so it defines no DST rules. Changed from the adcp-client#3505 table, whose offering was utc-aligned: a utc schedule never reads the account timezone, so its periods are derivable and the refusal did not follow from the coverage rule.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/iana_timezone", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "+05:00", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INVALID", "detail": "invalid_timezone", "wire_valid": true} + }, + { + "id": "account-timezone-offering-requires-the-account-timezone", + "name": "account_timezone offering requires the account timezone", + "origin": "adcp-client#3505", + "rule": "Boundaries cannot be derived without the account timezone.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INCOMPLETE", "detail": "missing_account_timezone", "wire_valid": true} + }, + { + "id": "a-timezone-cutover-without-previous-timezone-is-refused", + "name": "a timezone cutover without previous_timezone is refused", + "origin": "adcp-client#3505", + "rule": "Sellers MUST include previous_timezone: account.timezone already shows the new zone, so the old schedule cannot be recovered without it.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/timezone_cutovers", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": {"timezone_cutovers": [{"effective_at": "2026-11-05T05:00:00Z", "timezone": "America/Los_Angeles"}]} + }, + "expected_error": {"code": "COVERAGE_INPUT_INCOMPLETE", "detail": "missing_previous_timezone", "wire_valid": true} + }, + { + "id": "an-offering-without-standard-dimensions-cannot-be-resolved", + "name": "an offering without standard_dimensions cannot be resolved", + "origin": "adcp-client#3505", + "rule": "Sellers advertising subscriptions MUST publish standard_dimensions on every offering; matching never guesses.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/dimensions", + "static/schemas/source/core/reporting-delivery-offering.json#/properties/standard_dimensions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only" + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INCOMPLETE", "detail": "missing_standard_dimensions", "wire_valid": true} + }, + { + "id": "re-grant-requires-status-retention-days", + "name": "re-grant requires status_retention_days", + "origin": "adcp-client#3505", + "rule": "Whether a re-grant continues coverage depends on the retention window.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-05T06:00:00Z"}, {"authorized_at": "2026-11-06T18:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INCOMPLETE", "detail": "missing_status_retention_days", "wire_valid": true} + }, + { + "id": "havana-spring-forward-at-midnight", + "name": "DST gap at midnight (America/Havana)", + "origin": "adcp", + "rule": "Cuba springs forward at 00:00 standard time on 2026-03-08 (Rule Cuba Mar Sun>=8 0:00s). Local midnight March 8 does not exist, so the boundary advances by the one-hour gap to 01:00 CDT, 05:00Z. March 7 is a 24-hour local day (05:00Z to 05:00Z) and March 8 a 23-hour one (05:00Z to 04:00Z).", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Havana"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Havana", "grants": [{"authorized_at": "2026-02-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-01T00:00:00Z", + "start_time": "2026-03-07T12:00:00Z", + "end_time": "2026-03-09T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-04-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-07T05:00:00Z", + "period_end": "2026-03-08T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-09T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-09T04:00:00Z", + "period_end": "2026-03-10T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-07T05:00:00Z", + "period_end": "2026-03-08T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-09T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-03-09T04:00:00Z", + "period_end": "2026-03-10T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "havana-spring-forward-hourly", + "name": "Sub-daily local periods on a day whose midnight does not exist (America/Havana)", + "origin": "adcp", + "rule": "adcp#8588: hourly boundaries are the instants whose local wall time is a whole hour, and a wall time that does not exist yields no boundary. 00:00 on 2026-03-08 does not exist in Havana; 01:00 CDT (05:00Z) is the first boundary of the day, so March 8 has 23 hourly periods, each one hour long.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Havana"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Havana", "grants": [{"authorized_at": "2026-02-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-01T00:00:00Z", + "start_time": "2026-03-08T05:00:00Z", + "end_time": "2026-03-09T04:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-04-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-08T06:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T06:00:00Z", + "period_end": "2026-03-08T07:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T07:00:00Z", + "period_end": "2026-03-08T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T08:00:00Z", + "period_end": "2026-03-08T09:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T09:00:00Z", + "period_end": "2026-03-08T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T10:00:00Z", + "period_end": "2026-03-08T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T11:00:00Z", + "period_end": "2026-03-08T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T12:00:00Z", + "period_end": "2026-03-08T13:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T13:00:00Z", + "period_end": "2026-03-08T14:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T14:00:00Z", + "period_end": "2026-03-08T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T15:00:00Z", + "period_end": "2026-03-08T16:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T16:00:00Z", + "period_end": "2026-03-08T17:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T17:00:00Z", + "period_end": "2026-03-08T18:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T18:00:00Z", + "period_end": "2026-03-08T19:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T19:00:00Z", + "period_end": "2026-03-08T20:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T20:00:00Z", + "period_end": "2026-03-08T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T21:00:00Z", + "period_end": "2026-03-08T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T22:00:00Z", + "period_end": "2026-03-08T23:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T23:00:00Z", + "period_end": "2026-03-09T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T00:00:00Z", + "period_end": "2026-03-09T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T01:00:00Z", + "period_end": "2026-03-09T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T02:00:00Z", + "period_end": "2026-03-09T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T03:00:00Z", + "period_end": "2026-03-09T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T05:00:00Z", + "period_end": "2026-03-08T06:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T06:00:00Z", + "period_end": "2026-03-08T07:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T07:00:00Z", + "period_end": "2026-03-08T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T08:00:00Z", + "period_end": "2026-03-08T09:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T09:00:00Z", + "period_end": "2026-03-08T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T10:00:00Z", + "period_end": "2026-03-08T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T11:00:00Z", + "period_end": "2026-03-08T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T12:00:00Z", + "period_end": "2026-03-08T13:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T13:00:00Z", + "period_end": "2026-03-08T14:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T14:00:00Z", + "period_end": "2026-03-08T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T15:00:00Z", + "period_end": "2026-03-08T16:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T16:00:00Z", + "period_end": "2026-03-08T17:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T17:00:00Z", + "period_end": "2026-03-08T18:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T18:00:00Z", + "period_end": "2026-03-08T19:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T19:00:00Z", + "period_end": "2026-03-08T20:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T20:00:00Z", + "period_end": "2026-03-08T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T21:00:00Z", + "period_end": "2026-03-08T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T22:00:00Z", + "period_end": "2026-03-08T23:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-08T23:00:00Z", + "period_end": "2026-03-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T00:00:00Z", + "period_end": "2026-03-09T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T01:00:00Z", + "period_end": "2026-03-09T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T02:00:00Z", + "period_end": "2026-03-09T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-03-09T03:00:00Z", + "period_end": "2026-03-09T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "havana-fall-back-at-midnight", + "name": "DST fold at midnight: the earlier offset (America/Havana)", + "origin": "adcp", + "rule": "Cuba fell back at 00:00 standard time on 2025-11-02 (01:00 CDT became 00:00 CST), so local midnight November 2 occurred twice, at 04:00Z and 05:00Z. An ambiguous local boundary uses the earlier offset: November 2 starts at 04:00Z and is a 25-hour local day, ending at 05:00Z on November 3. Chosen in 2025 because tzdata 2026f removed Cuba's 2026-11-01 fall-back; no release from 2026b through 2026f differs on these instants.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Havana"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-10-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Havana", "grants": [{"authorized_at": "2025-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-10-15T00:00:00Z", + "start_time": "2025-11-01T12:00:00Z", + "end_time": "2025-11-03T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2025-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-01T04:00:00Z", + "period_end": "2025-11-02T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-02T04:00:00Z", + "period_end": "2025-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-03T05:00:00Z", + "period_end": "2025-11-04T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-01T04:00:00Z", + "period_end": "2025-11-02T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-02T04:00:00Z", + "period_end": "2025-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-11-03T05:00:00Z", + "period_end": "2025-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "havana-fall-back-hourly", + "name": "Sub-daily local periods when midnight repeats (America/Havana)", + "origin": "adcp", + "rule": "adcp#8588: a repeated wall time yields one boundary per offset. On 2025-11-02 in Havana 00:00 occurs at 04:00Z (CDT) and again at 05:00Z (CST), so both are boundaries and the 25-hour local day has 25 hourly periods.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/Havana"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-10-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/Havana", "grants": [{"authorized_at": "2025-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-10-15T00:00:00Z", + "start_time": "2025-11-02T04:00:00Z", + "end_time": "2025-11-03T05:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2025-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T04:00:00Z", + "period_end": "2025-11-02T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T05:00:00Z", + "period_end": "2025-11-02T06:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T06:00:00Z", + "period_end": "2025-11-02T07:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T07:00:00Z", + "period_end": "2025-11-02T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T08:00:00Z", + "period_end": "2025-11-02T09:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T09:00:00Z", + "period_end": "2025-11-02T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T10:00:00Z", + "period_end": "2025-11-02T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T11:00:00Z", + "period_end": "2025-11-02T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T12:00:00Z", + "period_end": "2025-11-02T13:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T13:00:00Z", + "period_end": "2025-11-02T14:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T14:00:00Z", + "period_end": "2025-11-02T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T15:00:00Z", + "period_end": "2025-11-02T16:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T16:00:00Z", + "period_end": "2025-11-02T17:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T17:00:00Z", + "period_end": "2025-11-02T18:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T18:00:00Z", + "period_end": "2025-11-02T19:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T19:00:00Z", + "period_end": "2025-11-02T20:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T20:00:00Z", + "period_end": "2025-11-02T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T21:00:00Z", + "period_end": "2025-11-02T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T22:00:00Z", + "period_end": "2025-11-02T23:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T23:00:00Z", + "period_end": "2025-11-03T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T00:00:00Z", + "period_end": "2025-11-03T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T01:00:00Z", + "period_end": "2025-11-03T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T02:00:00Z", + "period_end": "2025-11-03T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T03:00:00Z", + "period_end": "2025-11-03T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T04:00:00Z", + "period_end": "2025-11-03T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T04:00:00Z", + "period_end": "2025-11-02T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T05:00:00Z", + "period_end": "2025-11-02T06:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T06:00:00Z", + "period_end": "2025-11-02T07:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T07:00:00Z", + "period_end": "2025-11-02T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T08:00:00Z", + "period_end": "2025-11-02T09:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T09:00:00Z", + "period_end": "2025-11-02T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T10:00:00Z", + "period_end": "2025-11-02T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T11:00:00Z", + "period_end": "2025-11-02T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T12:00:00Z", + "period_end": "2025-11-02T13:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T13:00:00Z", + "period_end": "2025-11-02T14:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T14:00:00Z", + "period_end": "2025-11-02T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T15:00:00Z", + "period_end": "2025-11-02T16:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T16:00:00Z", + "period_end": "2025-11-02T17:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T17:00:00Z", + "period_end": "2025-11-02T18:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T18:00:00Z", + "period_end": "2025-11-02T19:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T19:00:00Z", + "period_end": "2025-11-02T20:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T20:00:00Z", + "period_end": "2025-11-02T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T21:00:00Z", + "period_end": "2025-11-02T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T22:00:00Z", + "period_end": "2025-11-02T23:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-02T23:00:00Z", + "period_end": "2025-11-03T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T00:00:00Z", + "period_end": "2025-11-03T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T01:00:00Z", + "period_end": "2025-11-03T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T02:00:00Z", + "period_end": "2025-11-03T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T03:00:00Z", + "period_end": "2025-11-03T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-11-03T04:00:00Z", + "period_end": "2025-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "cairo-spring-forward-at-midnight", + "name": "DST gap at midnight (Africa/Cairo)", + "origin": "adcp", + "rule": "Egypt springs forward at 00:00 on the last Friday of April (Rule Egypt Apr lastFri 0:00): 2025-04-25 00:00 EET does not exist and advances by the gap to 01:00 EEST, 22:00Z on April 24. April 24 is 24 hours (22:00Z to 22:00Z) and April 25 is 23 (22:00Z to 21:00Z).", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Africa/Cairo"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-04-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Africa/Cairo", "grants": [{"authorized_at": "2025-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-04-10T00:00:00Z", + "start_time": "2025-04-24T12:00:00Z", + "end_time": "2025-04-26T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2025-06-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-23T22:00:00Z", + "period_end": "2025-04-24T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-24T22:00:00Z", + "period_end": "2025-04-25T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-25T21:00:00Z", + "period_end": "2025-04-26T21:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-23T22:00:00Z", + "period_end": "2025-04-24T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-24T22:00:00Z", + "period_end": "2025-04-25T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-04-25T21:00:00Z", + "period_end": "2025-04-26T21:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "cairo-fall-back-at-midnight", + "name": "DST fold at 24:00 (Africa/Cairo)", + "origin": "adcp", + "rule": "Egypt falls back at 24:00 on the last Thursday of October (Rule Egypt Oct lastThu 24:00): on 2025-10-30 at 21:00Z the clock reads 24:00 EEST and returns to 23:00 EET. The repeated hour is 23:00 on October 30, so October 31 00:00 occurs once (22:00Z) and October 30 is a 25-hour local day, 21:00Z on October 29 to 22:00Z on October 30.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Africa/Cairo"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-10-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Africa/Cairo", "grants": [{"authorized_at": "2025-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-10-10T00:00:00Z", + "start_time": "2025-10-29T12:00:00Z", + "end_time": "2025-10-31T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2025-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-28T21:00:00Z", + "period_end": "2025-10-29T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-29T21:00:00Z", + "period_end": "2025-10-30T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-30T22:00:00Z", + "period_end": "2025-10-31T22:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-28T21:00:00Z", + "period_end": "2025-10-29T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-29T21:00:00Z", + "period_end": "2025-10-30T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2025-10-30T22:00:00Z", + "period_end": "2025-10-31T22:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "lord-howe-spring-forward-hourly", + "name": "Sub-daily local periods across a 30-minute spring-forward (Australia/Lord_Howe)", + "origin": "adcp", + "rule": "adcp#8588: hourly periods start on the local hour. Lord Howe moves from +10:30 to +11 at 02:00 on 2025-10-05, skipping 02:00-02:30, so wall 02:00 does not exist and yields no boundary. The day has 23 boundaries and 23 periods; the one from 01:00 (14:30Z) to 03:00 (16:00Z) lasts 90 minutes. The local day is 23.5 hours.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Australia/Lord_Howe"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-09-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Australia/Lord_Howe", "grants": [{"authorized_at": "2025-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-09-15T00:00:00Z", + "start_time": "2025-10-04T13:30:00Z", + "end_time": "2025-10-05T13:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2025-11-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T13:30:00Z", + "period_end": "2025-10-04T14:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T14:30:00Z", + "period_end": "2025-10-04T16:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T16:00:00Z", + "period_end": "2025-10-04T17:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T17:00:00Z", + "period_end": "2025-10-04T18:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T18:00:00Z", + "period_end": "2025-10-04T19:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T19:00:00Z", + "period_end": "2025-10-04T20:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T20:00:00Z", + "period_end": "2025-10-04T21:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T21:00:00Z", + "period_end": "2025-10-04T22:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T22:00:00Z", + "period_end": "2025-10-04T23:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T23:00:00Z", + "period_end": "2025-10-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T00:00:00Z", + "period_end": "2025-10-05T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T01:00:00Z", + "period_end": "2025-10-05T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T02:00:00Z", + "period_end": "2025-10-05T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T03:00:00Z", + "period_end": "2025-10-05T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T04:00:00Z", + "period_end": "2025-10-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T05:00:00Z", + "period_end": "2025-10-05T06:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T06:00:00Z", + "period_end": "2025-10-05T07:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T07:00:00Z", + "period_end": "2025-10-05T08:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T08:00:00Z", + "period_end": "2025-10-05T09:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T09:00:00Z", + "period_end": "2025-10-05T10:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T10:00:00Z", + "period_end": "2025-10-05T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T11:00:00Z", + "period_end": "2025-10-05T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T12:00:00Z", + "period_end": "2025-10-05T13:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T13:30:00Z", + "period_end": "2025-10-04T14:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T14:30:00Z", + "period_end": "2025-10-04T16:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T16:00:00Z", + "period_end": "2025-10-04T17:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T17:00:00Z", + "period_end": "2025-10-04T18:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T18:00:00Z", + "period_end": "2025-10-04T19:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T19:00:00Z", + "period_end": "2025-10-04T20:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T20:00:00Z", + "period_end": "2025-10-04T21:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T21:00:00Z", + "period_end": "2025-10-04T22:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T22:00:00Z", + "period_end": "2025-10-04T23:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-04T23:00:00Z", + "period_end": "2025-10-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T00:00:00Z", + "period_end": "2025-10-05T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T01:00:00Z", + "period_end": "2025-10-05T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T02:00:00Z", + "period_end": "2025-10-05T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T03:00:00Z", + "period_end": "2025-10-05T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T04:00:00Z", + "period_end": "2025-10-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T05:00:00Z", + "period_end": "2025-10-05T06:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T06:00:00Z", + "period_end": "2025-10-05T07:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T07:00:00Z", + "period_end": "2025-10-05T08:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T08:00:00Z", + "period_end": "2025-10-05T09:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T09:00:00Z", + "period_end": "2025-10-05T10:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T10:00:00Z", + "period_end": "2025-10-05T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T11:00:00Z", + "period_end": "2025-10-05T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2025-10-05T12:00:00Z", + "period_end": "2025-10-05T13:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "lord-howe-fall-back-hourly", + "name": "Sub-daily local periods across a 30-minute fall-back (Australia/Lord_Howe)", + "origin": "adcp", + "rule": "Lord Howe returns from +11 to +10:30 at 02:00 on 2026-04-05: at 15:00Z the clock reads 02:00 and goes back to 01:30. Only 01:30-02:00 repeats, so every whole hour occurs once: 24 boundaries and 24 periods, the one from 01:00 (14:00Z) to 02:00 (15:30Z) lasting 90 minutes. The local day is 24.5 hours.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Australia/Lord_Howe"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Australia/Lord_Howe", "grants": [{"authorized_at": "2026-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-15T00:00:00Z", + "start_time": "2026-04-04T13:00:00Z", + "end_time": "2026-04-05T13:30:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-05-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T13:00:00Z", + "period_end": "2026-04-04T14:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T14:00:00Z", + "period_end": "2026-04-04T15:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T15:30:00Z", + "period_end": "2026-04-04T16:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T16:30:00Z", + "period_end": "2026-04-04T17:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T17:30:00Z", + "period_end": "2026-04-04T18:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T18:30:00Z", + "period_end": "2026-04-04T19:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T19:30:00Z", + "period_end": "2026-04-04T20:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T20:30:00Z", + "period_end": "2026-04-04T21:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T21:30:00Z", + "period_end": "2026-04-04T22:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T22:30:00Z", + "period_end": "2026-04-04T23:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T23:30:00Z", + "period_end": "2026-04-05T00:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T00:30:00Z", + "period_end": "2026-04-05T01:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T01:30:00Z", + "period_end": "2026-04-05T02:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T02:30:00Z", + "period_end": "2026-04-05T03:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T03:30:00Z", + "period_end": "2026-04-05T04:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T04:30:00Z", + "period_end": "2026-04-05T05:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T05:30:00Z", + "period_end": "2026-04-05T06:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T06:30:00Z", + "period_end": "2026-04-05T07:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T07:30:00Z", + "period_end": "2026-04-05T08:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T08:30:00Z", + "period_end": "2026-04-05T09:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T09:30:00Z", + "period_end": "2026-04-05T10:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T10:30:00Z", + "period_end": "2026-04-05T11:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T11:30:00Z", + "period_end": "2026-04-05T12:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T12:30:00Z", + "period_end": "2026-04-05T13:30:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T13:00:00Z", + "period_end": "2026-04-04T14:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T14:00:00Z", + "period_end": "2026-04-04T15:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T15:30:00Z", + "period_end": "2026-04-04T16:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T16:30:00Z", + "period_end": "2026-04-04T17:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T17:30:00Z", + "period_end": "2026-04-04T18:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T18:30:00Z", + "period_end": "2026-04-04T19:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T19:30:00Z", + "period_end": "2026-04-04T20:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T20:30:00Z", + "period_end": "2026-04-04T21:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T21:30:00Z", + "period_end": "2026-04-04T22:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T22:30:00Z", + "period_end": "2026-04-04T23:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-04T23:30:00Z", + "period_end": "2026-04-05T00:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T00:30:00Z", + "period_end": "2026-04-05T01:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T01:30:00Z", + "period_end": "2026-04-05T02:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T02:30:00Z", + "period_end": "2026-04-05T03:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T03:30:00Z", + "period_end": "2026-04-05T04:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T04:30:00Z", + "period_end": "2026-04-05T05:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T05:30:00Z", + "period_end": "2026-04-05T06:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T06:30:00Z", + "period_end": "2026-04-05T07:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T07:30:00Z", + "period_end": "2026-04-05T08:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T08:30:00Z", + "period_end": "2026-04-05T09:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T09:30:00Z", + "period_end": "2026-04-05T10:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T10:30:00Z", + "period_end": "2026-04-05T11:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T11:30:00Z", + "period_end": "2026-04-05T12:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-04-05T12:30:00Z", + "period_end": "2026-04-05T13:30:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "lord-howe-fall-back-half-hourly", + "name": "A repeated half hour yields one boundary per offset (Australia/Lord_Howe)", + "origin": "adcp", + "rule": "With PT30M, wall 01:30 on 2026-04-05 occurs at 14:30Z (+11) and again at 15:00Z (+10:30); both are boundaries. The four half-hour periods from 14:00Z to 16:00Z are each 30 minutes long.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Australia/Lord_Howe"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT30M", + "required_finality": "snapshot", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Australia/Lord_Howe", "grants": [{"authorized_at": "2026-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-15T00:00:00Z", + "start_time": "2026-04-04T14:00:00Z", + "end_time": "2026-04-04T16:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_half_hourly_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_half_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_half_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_half_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT30M", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-05-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T14:00:00Z", + "period_end": "2026-04-04T14:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T14:30:00Z", + "period_end": "2026-04-04T15:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T15:00:00Z", + "period_end": "2026-04-04T15:30:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T15:30:00Z", + "period_end": "2026-04-04T16:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T14:00:00Z", + "period_end": "2026-04-04T14:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T14:30:00Z", + "period_end": "2026-04-04T15:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T15:00:00Z", + "period_end": "2026-04-04T15:30:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_half_hourly_local", + "period_start": "2026-04-04T15:30:00Z", + "period_end": "2026-04-04T16:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "kathmandu-hourly-local-and-utc", + "name": "Sub-daily local periods at a +05:45 offset (Asia/Kathmandu)", + "origin": "adcp", + "rule": "adcp#8588: local hours in Kathmandu (+05:45) start at 15 minutes past each UTC hour, while a utc-aligned hourly offering starts on the UTC hour. match all resolves both offerings and each is owed its own periods: local hours from 23:15Z (the one containing the 00:00Z flight start) through the one containing the 03:00Z stop, and UTC hours 00:00Z to 03:00Z.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["Asia/Kathmandu"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "pacing", + "period_duration": "PT1H", + "required_finality": "snapshot", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "Asia/Kathmandu", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T00:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-03T03:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p_hourly_local", "off_h_pkg_hourly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p_hourly_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p_hourly_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p_hourly_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_h_pkg_hourly", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_h_pkg_hourly", + "report_definition_uri": "https://seller.example/report-definitions/off_h_pkg_hourly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T23:15:00Z", + "period_end": "2026-11-03T00:15:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-03T01:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T00:15:00Z", + "period_end": "2026-11-03T01:15:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T01:00:00Z", + "period_end": "2026-11-03T02:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T01:15:00Z", + "period_end": "2026-11-03T02:15:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T02:00:00Z", + "period_end": "2026-11-03T03:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T02:15:00Z", + "period_end": "2026-11-03T03:15:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-02T23:15:00Z", + "period_end": "2026-11-03T00:15:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-03T01:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T00:15:00Z", + "period_end": "2026-11-03T01:15:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T01:00:00Z", + "period_end": "2026-11-03T02:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T01:15:00Z", + "period_end": "2026-11-03T02:15:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T02:00:00Z", + "period_end": "2026-11-03T03:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_p_hourly_local", + "period_start": "2026-11-03T02:15:00Z", + "period_end": "2026-11-03T03:15:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "utc-sub-daily-counts-from-the-epoch", + "name": "utc sub-daily periods count from 1970-01-01T00:00:00Z", + "origin": "adcp", + "rule": "utc alignment uses 1970-01-01T00:00:00Z as interval zero and the sub-daily local rule does not apply to it, so PT7H boundaries are multiples of seven hours since the epoch, not since midnight: 2026-11-03T00:00Z is 498240 hours after the epoch, one past a multiple of seven, so boundaries fall at 23:00Z, 06:00Z, 13:00Z and 20:00Z.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "pacing", "period_duration": "PT7H", "required_finality": "snapshot", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-04T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_u7"]}] + } + ], + "offerings": [ + { + "offering_id": "off_u7", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_u7", + "report_definition_uri": "https://seller.example/report-definitions/off_u7.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT7H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u7", + "period_start": "2026-11-02T23:00:00Z", + "period_end": "2026-11-03T06:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u7", + "period_start": "2026-11-03T06:00:00Z", + "period_end": "2026-11-03T13:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u7", + "period_start": "2026-11-03T13:00:00Z", + "period_end": "2026-11-03T20:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_u7", + "period_start": "2026-11-03T20:00:00Z", + "period_end": "2026-11-04T03:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_u7", + "period_start": "2026-11-02T23:00:00Z", + "period_end": "2026-11-03T06:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_u7", + "period_start": "2026-11-03T06:00:00Z", + "period_end": "2026-11-03T13:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_u7", + "period_start": "2026-11-03T13:00:00Z", + "period_end": "2026-11-03T20:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_u7", + "period_start": "2026-11-03T20:00:00Z", + "period_end": "2026-11-04T03:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "billing-cycle-31st-anchor-across-30-day-months", + "name": "Billing cycle anchored on the 31st across 30-day months", + "origin": "adcp", + "rule": "Month addition preserves the anchor day and clamps to the target month's last day, computed from the anchor for each ordinal: March 31, April 30 (clamped), May 31 (back to the 31st, not April 30 plus one month), June 30, July 31.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["UTC"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-03-15T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P1M", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-01-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-03-20T00:00:00Z", + "start_time": "2026-04-15T00:00:00Z", + "end_time": "2026-07-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_m31_utc"]}] + } + ], + "offerings": [ + { + "offering_id": "off_m31_utc", + "feed_purpose": "billing", + "report_definition_id": "rd_off_m31_utc", + "report_definition_uri": "https://seller.example/report-definitions/off_m31_utc.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P1M", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2026-03-31T00:00:00Z", + "period_timezone": "UTC" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2026-09-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31_utc", + "period_start": "2026-03-31T00:00:00Z", + "period_end": "2026-04-30T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31_utc", + "period_start": "2026-04-30T00:00:00Z", + "period_end": "2026-05-31T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31_utc", + "period_start": "2026-05-31T00:00:00Z", + "period_end": "2026-06-30T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_m31_utc", + "period_start": "2026-06-30T00:00:00Z", + "period_end": "2026-07-31T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_m31_utc", + "period_start": "2026-03-31T00:00:00Z", + "period_end": "2026-04-30T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m31_utc", + "period_start": "2026-04-30T00:00:00Z", + "period_end": "2026-05-31T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m31_utc", + "period_start": "2026-05-31T00:00:00Z", + "period_end": "2026-06-30T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_m31_utc", + "period_start": "2026-06-30T00:00:00Z", + "period_end": "2026-07-31T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "billing-quarter-anchored-on-october-31", + "name": "Quarterly billing cycle anchored on October 31 in New York", + "origin": "adcp", + "rule": "P3M from 2025-10-31 00:00 New York: January 31, April 30 (clamped), July 31, October 31. Each is local midnight, so the UTC instant moves between 04:00Z (EDT) and 05:00Z (EST, January 31).", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-10-01T00:00:00Z", + "destination_method": {"pattern": "file_transfer", "transport": "s3"}, + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"account_ids": ["acct_1"]}, + "selector": {"feed_purpose": "billing", "period_duration": "P3M", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "consumer_receipt", + "destination": {"destination_id": "billing-archive"} + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2025-09-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-10-15T00:00:00Z", + "start_time": "2025-11-15T00:00:00Z", + "end_time": "2026-08-15T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_q31"]}] + } + ], + "offerings": [ + { + "offering_id": "off_q31", + "feed_purpose": "billing", + "report_definition_id": "rd_off_q31", + "report_definition_uri": "https://seller.example/report-definitions/off_q31.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"], + "canonicalization_id": "adcp_jcs_rows_v1", + "canonicalization_contract_version": "1.0", + "canonicalization_media_type": "application/vnd.adcp.reporting-canonicalization+json", + "canonicalization_uri": "https://seller.example/canonicalization/adcp_jcs_rows_v1.json", + "canonicalization_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + "schedule": { + "period_duration": "P3M", + "alignment": "billing_cycle", + "delivery_sla": "P5D", + "period_anchor_policy": "fixed", + "period_anchor": "2025-10-31T04:00:00Z", + "period_timezone": "America/New_York" + }, + "supported_finality": ["official"], + "reconciliation_mode": "consumer_receipt", + "standard_dimensions": ["package"], + "method": { + "pattern": "file_transfer", + "transport": "s3", + "orchestration": "producer_managed", + "destination_modes": ["existing"], + "provider": {"domain": "seller.example"}, + "format": "jsonl" + } + } + ], + "now": "2026-11-15T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q31", + "period_start": "2025-10-31T04:00:00Z", + "period_end": "2026-01-31T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q31", + "period_start": "2026-01-31T05:00:00Z", + "period_end": "2026-04-30T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q31", + "period_start": "2026-04-30T04:00:00Z", + "period_end": "2026-07-31T04:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_q31", + "period_start": "2026-07-31T04:00:00Z", + "period_end": "2026-10-31T04:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_q31", + "period_start": "2025-10-31T04:00:00Z", + "period_end": "2026-01-31T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_q31", + "period_start": "2026-01-31T05:00:00Z", + "period_end": "2026-04-30T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_q31", + "period_start": "2026-04-30T04:00:00Z", + "period_end": "2026-07-31T04:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_q31", + "period_start": "2026-07-31T04:00:00Z", + "period_end": "2026-10-31T04:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "p7d-utc-weeks-start-on-thursday", + "name": "Weekly utc periods (P7D) start on Thursdays", + "origin": "adcp", + "rule": "The schedule pattern has no W designator, so a week is P7D. utc alignment counts from 1970-01-01T00:00:00Z, a Thursday, so every utc week starts on a Thursday: 2026-11-05, 11-12 and 11-19 cover a Monday-to-Monday flight.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-schedule.json#/properties/period_duration", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P7D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-09T00:00:00Z", + "end_time": "2026-11-23T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_w_utc"]}] + } + ], + "offerings": [ + { + "offering_id": "off_w_utc", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_w_utc", + "report_definition_uri": "https://seller.example/report-definitions/off_w_utc.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P7D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-15T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_w_utc", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_w_utc", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-19T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_w_utc", + "period_start": "2026-11-19T00:00:00Z", + "period_end": "2026-11-26T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_w_utc", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_w_utc", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-19T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_w_utc", + "period_start": "2026-11-19T00:00:00Z", + "period_end": "2026-11-26T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "p7d-account-timezone-week-across-fall-back", + "name": "Weekly local periods (P7D) across a fall-back", + "origin": "adcp", + "rule": "Under account_timezone the origin is local midnight on 1970-01-01, a Thursday, and days are civil days: the week from Thursday 2026-10-29 00:00 EDT (04:00Z) to Thursday 2026-11-05 00:00 EST (05:00Z) is 7 days and 1 hour.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P7D", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-15T00:00:00Z", + "start_time": "2026-10-30T12:00:00Z", + "end_time": "2026-11-06T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_w_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_w_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_w_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_w_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P7D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-15T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_w_acct_tz", + "period_start": "2026-10-29T04:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_w_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-12T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_w_acct_tz", + "period_start": "2026-10-29T04:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_w_acct_tz", + "period_start": "2026-11-05T05:00:00Z", + "period_end": "2026-11-12T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "p1w-is-not-a-schedule-duration", + "name": "P1W is not a schedule period_duration", + "origin": "adcp", + "rule": "The period_duration pattern in core/reporting-schedule.json and the selector allows Y, M and D date components and no W designator; a week is P7D. A P1W selector fails schema validation and cannot be resolved.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/properties/period_duration", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1W", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-09T00:00:00Z", + "end_time": "2026-11-23T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_w_utc"]}] + } + ], + "offerings": [ + { + "offering_id": "off_w_utc", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_w_utc", + "report_definition_uri": "https://seller.example/report-definitions/off_w_utc.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P7D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INVALID", "detail": "invalid_period_duration", "wire_valid": false} + }, + { + "id": "p1y-account-timezone-calendar-years", + "name": "Yearly local periods (P1Y) are calendar years", + "origin": "adcp", + "rule": "Under account_timezone, P1Y from local midnight on 1970-01-01 gives January 1 local midnight each year (05:00Z in New York). Accepted 2025-12-01, the first owed year starts 2026-01-01; a flight into 2027 owes 2027 in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2025-12-01T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1Y", + "required_finality": "official", + "dimensions": ["package"], + "alignment": "account_timezone" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2025-11-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2025-12-15T00:00:00Z", + "start_time": "2026-06-01T00:00:00Z", + "end_time": "2027-03-01T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_y_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_y_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_y_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_y_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1Y", "alignment": "account_timezone", "delivery_sla": "P5D"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2028-02-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_y_acct_tz", + "period_start": "2026-01-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_y_acct_tz", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2028-01-01T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_y_acct_tz", + "period_start": "2026-01-01T05:00:00Z", + "period_end": "2027-01-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_y_acct_tz", + "period_start": "2027-01-01T05:00:00Z", + "period_end": "2028-01-01T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "local-sub-daily-must-divide-24-hours", + "name": "A local sub-daily duration that does not divide 24 hours is refused", + "origin": "adcp", + "rule": "period_generation: with account_timezone, source_timezone, or billing_cycle alignment, a period_duration made only of hours, minutes, and seconds MUST divide 24 hours. PT7H does not.", + "spec_refs": ["static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "pacing", "period_duration": "PT7H", "required_finality": "snapshot", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-04T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_p7_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_p7_local", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_p7_local", + "report_definition_uri": "https://seller.example/report-definitions/off_p7_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT7H", "alignment": "account_timezone", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INVALID", "detail": "invalid_period_duration", "wire_valid": true} + }, + { + "id": "local-duration-cannot-mix-date-and-time", + "name": "A local alignment cannot mix date and time components", + "origin": "adcp", + "rule": "period_generation: \"With those alignments a period_duration cannot mix date and time components.\" P1DT12H under account_timezone is refused.", + "spec_refs": ["static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1DT12H", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_mixed_local"]}] + } + ], + "offerings": [ + { + "offering_id": "off_mixed_local", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_mixed_local", + "report_definition_uri": "https://seller.example/report-definitions/off_mixed_local.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1DT12H", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INVALID", "detail": "invalid_period_duration", "wire_valid": true} + }, + { + "id": "fractional-seconds-and-offsets", + "name": "Fractional seconds and non-Z offsets are instants", + "origin": "adcp", + "rule": "Every timestamp is an RFC 3339 instant; compare instants, never strings. accepted_at 2026-11-01T19:00:00.001-05:00 is one millisecond after the 11-02T00:00Z boundary, so the first owed boundary is 11-03. authorized_at, confirmed_at, the flight and now use +05:30, +01:00, -05:00 and +09:00 offsets and fractional seconds; the flight is 11-02T00:00Z to 11-05T00:00Z and now is 11-06T00:00Z. Expected instants are written in Z form.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T19:00:00.001-05:00", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T05:30:00+05:30"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-01T10:00:00.5+01:00", + "start_time": "2026-11-01T19:00:00-05:00", + "end_time": "2026-11-05T01:00:00.000+01:00", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-11-06T09:00:00+09:00" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "confirmed-one-millisecond-before-a-boundary", + "name": "Confirmed one millisecond before a boundary owes the period containing it", + "origin": "adcp", + "rule": "adcp#8593: a period is owed when it ends after confirmed_at. confirmed_at 10:59:59.999Z is inside the 10:00Z hour, which ends after it and overlaps the 10:30Z flight start, so it is owed in full.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "pacing", "period_duration": "PT1H", "required_finality": "snapshot", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T10:59:59.999Z", + "start_time": "2026-11-03T10:30:00Z", + "end_time": "2026-11-03T13:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_h_pkg_hourly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_h_pkg_hourly", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_h_pkg_hourly", + "report_definition_uri": "https://seller.example/report-definitions/off_h_pkg_hourly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T10:00:00Z", + "period_end": "2026-11-03T11:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T10:00:00Z", + "period_end": "2026-11-03T11:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "confirmed-exactly-on-a-boundary", + "name": "Confirmed exactly on a boundary owes from that boundary", + "origin": "adcp", + "rule": "confirmed_at 11:00:00.000+00:00 is a boundary: the 10:00Z hour ends at it, not after it, so it is not owed even though it overlaps the flight; 11:00Z and 12:00Z are.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "pacing", "period_duration": "PT1H", "required_finality": "snapshot", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-03T11:00:00.000+00:00", + "start_time": "2026-11-03T10:30:00Z", + "end_time": "2026-11-03T13:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_h_pkg_hourly"]}] + } + ], + "offerings": [ + { + "offering_id": "off_h_pkg_hourly", + "feed_purpose": "pacing", + "report_definition_id": "rd_off_h_pkg_hourly", + "report_definition_uri": "https://seller.example/report-definitions/off_h_pkg_hourly.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "PT1H", "alignment": "utc", "delivery_sla": "PT1H"}, + "supported_finality": ["snapshot"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T11:00:00Z", + "period_end": "2026-11-03T12:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_h_pkg_hourly", + "period_start": "2026-11-03T12:00:00Z", + "period_end": "2026-11-03T13:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "confirmed-after-the-stop", + "name": "A buy confirmed after its stop owes only a period that ends after confirmation", + "origin": "adcp", + "rule": "mb_1 stops at 11-05T12 and is confirmed at 11-05T06: only the 11-05 period both ends after confirmed_at and overlaps the flight. mb_2 has the same flight and is confirmed at 11-06T01, after the period containing its stop ended, so it owes nothing.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-05T06:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + }, + { + "media_buy_id": "mb_2", + "confirmed_at": "2026-11-06T01:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T12:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "extension-of-an-empty-flight", + "name": "Extending an empty flight never owes the periods resolved while it was empty", + "origin": "adcp", + "rule": "Until 11-04T12 the flight was empty (start_time equal to end_time, 11-03T00), so the 11-03 period, resolved at 11-04T00, overlapped nothing. The update at 11-04T12 sets end_time 11-07; periods resolved after it (11-04, 11-05, 11-06) use the new flight and are owed, and 11-03 never becomes owed retroactively.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "non_wire_inputs": ["buys[].prior_flights"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-07T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}], + "prior_flights": [{"replaced_at": "2026-11-04T12:00:00Z", "start_time": "2026-11-03T00:00:00Z", "end_time": "2026-11-03T00:00:00Z"}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-05T00:00:00Z", + "period_end": "2026-11-06T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "packages-on-different-products-resolve-different-offerings", + "name": "Each package resolves the selector against its own product", + "origin": "adcp", + "rule": "The seller resolves the selector separately for each buy's products. Under finest [package], pkg_1's product lists package and package x creative and resolves package x creative; pkg_2's product lists only package and resolves it. The buy is covered by both, and each (buy, resolved offering) pair is owed its own periods.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/selection", + "static/schemas/source/core/reporting-subscription.json#/properties/selector/properties/match", + "docs/protocol/sync_principal.mdx#reporting-subscriptions", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "finest" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-05T00:00:00Z", + "packages": [ + {"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_b_pkg_creative"]}, + {"package_id": "pkg_2", "reporting_delivery_offering_ids": ["off_a_pkg"]} + ] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_b_pkg_creative", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_b_pkg_creative", + "report_definition_uri": "https://seller.example/report-definitions/off_b_pkg_creative.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package", "creative"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_b_pkg_creative", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "reactivation-and-new-version-at-one-instant", + "name": "Reactivation and a new version at the same instant", + "origin": "adcp", + "rule": "Deactivated at 11-04T12 under v1; v2 is accepted and the subscription reactivated at the same instant, 11-05T12. v1 owes the periods that started before the deactivation (11-03, 11-04). Reactivation is a fresh start, so v2 owes from the first boundary at or after 11-05T12 (11-06), and nothing that started while inactive.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-state.json#/properties/inactive_intervals", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-05T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-05T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "inactive_intervals": [{"deactivated_at": "2026-11-04T12:00:00Z", "reactivated_at": "2026-11-05T12:00:00Z"}] + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "new-version-deactivated-at-acceptance", + "name": "A new version deactivated at the instant it is accepted", + "origin": "adcp", + "rule": "v2 is accepted at 11-04T12 with active false, deactivated_at 11-04T12. v1 is outgoing at T and owes the periods that start before it (11-03, 11-04); deactivation has no incoming schedule, so v2 owes nothing.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/reporting-subscription-state.json#/properties/prior_versions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": false, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + }, + "deactivated_at": "2026-11-04T12:00:00Z" + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "revocation-and-new-version-at-one-instant", + "name": "A revocation and a new version at the same instant", + "origin": "adcp", + "rule": "Authority ends at 11-04T12, the instant v2 is accepted, and returns at 11-05T18 inside retention without backfill. v1 owes the periods starting before T, but the 11-04 period ends after unauthorized_at and falls in the gap [11-04, 11-06); 11-03 stays owed. v2 owes from E = 11-05 except the gap, so from 11-06.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/cutover", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + }, + "superseded_at": "2026-11-04T12:00:00Z" + }, + { + "subscription_version": 2, + "accepted_at": "2026-11-04T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 2, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only", + "exclude_account_ids": ["acct_other"] + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [{"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-04T12:00:00Z"}, {"authorized_at": "2026-11-05T18:00:00Z"}] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-08T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 30 + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z" + }, + { + "subscription_version": 2, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-06T00:00:00Z", + "period_end": "2026-11-07T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 2, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "grant-chain-of-four-without-backfill", + "name": "Four grants: two chains, each with an interruption, without backfill", + "origin": "adcp", + "rule": "status_retention_days 2. The 11-04T00 re-grant is before 11-03T06 + 2 days and continues the first chain: gap [11-03, 11-04). The 11-07T12 re-grant is exactly 11-05T12 + 2 days, not before it, so the entry has expired and a new chain starts at 11-07T12 (first owed boundary 11-08); 11-05 to 11-07 end after the first chain's final unauthorized_at and start before the new chain. The 11-10T00 re-grant continues the second chain: gap [11-09, 11-10).", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-20T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [ + {"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-03T06:00:00Z"}, + {"authorized_at": "2026-11-04T00:00:00Z", "unauthorized_at": "2026-11-05T12:00:00Z"}, + {"authorized_at": "2026-11-07T12:00:00Z", "unauthorized_at": "2026-11-09T06:00:00Z"}, + {"authorized_at": "2026-11-10T00:00:00Z"} + ] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-25T00:00:00Z", + "start_time": "2026-11-01T00:00:00Z", + "end_time": "2026-11-13T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 2 + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-01T00:00:00Z", + "period_end": "2026-11-02T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-03T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-13T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-01T00:00:00Z", + "period_end": "2026-11-02T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-03T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-13T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "grant-chain-of-four-with-backfill", + "name": "Four grants: two chains, each with an interruption, with backfill_on_regrant", + "origin": "adcp", + "rule": "The same grants with backfill_on_regrant: the interruptions inside each chain record no gap, so 11-03 and 11-09 are owed. Backfill never bridges two chains: 11-05 to 11-07 stay unowed.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "static/schemas/source/core/account-authorization.json#/properties/authorized_at", + "static/schemas/source/core/reporting-subscription-state.json#/properties/accounts_unauthorized", + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/gaps", + "docs/media-buy/task-reference/get_reporting_status.mdx#when-authorization-ends", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": [], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-10-20T00:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": { + "account_id": "acct_1", + "timezone": "America/New_York", + "grants": [ + {"authorized_at": "2026-10-01T00:00:00Z", "unauthorized_at": "2026-11-03T06:00:00Z"}, + {"authorized_at": "2026-11-04T00:00:00Z", "unauthorized_at": "2026-11-05T12:00:00Z"}, + {"authorized_at": "2026-11-07T12:00:00Z", "unauthorized_at": "2026-11-09T06:00:00Z"}, + {"authorized_at": "2026-11-10T00:00:00Z"} + ] + }, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-10-25T00:00:00Z", + "start_time": "2026-11-01T00:00:00Z", + "end_time": "2026-11-13T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "status_retention_days": 2, + "backfill_on_regrant": true + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-01T00:00:00Z", + "period_end": "2026-11-02T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-03T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-13T00:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-01T00:00:00Z", + "period_end": "2026-11-02T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-02T00:00:00Z", + "period_end": "2026-11-03T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-09T00:00:00Z", + "period_end": "2026-11-10T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-10T00:00:00Z", + "period_end": "2026-11-11T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-11T00:00:00Z", + "period_end": "2026-11-12T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-12T00:00:00Z", + "period_end": "2026-11-13T00:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "max-accounts-capacity-per-offering", + "name": "max_accounts capacity exception per offering on different boundaries", + "origin": "adcp", + "rule": "Beyond subscriptions.max_accounts the seller excludes the account with reason capacity from 11-04T12 until it is served again at 11-06T12. Under match all the covered offerings have different boundaries, so the seller lists one entry per offering_id with that offering's E instants: UTC days [11-05T00, 11-07T00) and New York days [11-05T05, 11-07T05). Each removes only its own offering's periods.", + "spec_refs": [ + "static/schemas/source/core/reporting-subscription-coverage.json#/properties/excluded", + "docs/media-buy/task-reference/get_reporting_status.mdx#exceptions", + "static/schemas/source/core/reporting-delivery-capabilities.json#/properties/subscriptions", + "docs/protocol/sync_principal.mdx#reporting-subscriptions", + "static/schemas/source/core/reporting-subscription.json#/x-adcp-validation/coverage", + "docs/media-buy/task-reference/get_reporting_status.mdx#which-periods-are-owed" + ], + "timezones": ["America/New_York"], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": { + "feed_purpose": "analytics", + "period_duration": "P1D", + "required_finality": "official", + "dimensions": ["package"], + "match": "all" + }, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-09T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_a_pkg", "off_e_pkg_acct_tz"]}] + } + ], + "offerings": [ + { + "offering_id": "off_a_pkg", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_a_pkg", + "report_definition_uri": "https://seller.example/report-definitions/off_a_pkg.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "utc", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + }, + { + "offering_id": "off_e_pkg_acct_tz", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_e_pkg_acct_tz", + "report_definition_uri": "https://seller.example/report-definitions/off_e_pkg_acct_tz.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "account_timezone", "delivery_sla": "PT6H"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z", + "coverage": { + "excluded": [ + {"offering_id": "off_a_pkg", "reason": "capacity", "from": "2026-11-05T00:00:00Z", "until": "2026-11-07T00:00:00Z"}, + {"offering_id": "off_e_pkg_acct_tz", "reason": "capacity", "from": "2026-11-05T05:00:00Z", "until": "2026-11-07T05:00:00Z"} + ] + } + }, + "expected": [ + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T05:00:00Z", + "period_end": "2026-11-08T05:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z" + }, + { + "subscription_version": 1, + "media_buy_id": "mb_1", + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-08T05:00:00Z", + "period_end": "2026-11-09T05:00:00Z" + } + ], + "expected_obligations": [ + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-02T05:00:00Z", + "period_end": "2026-11-03T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-03T00:00:00Z", + "period_end": "2026-11-04T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-03T05:00:00Z", + "period_end": "2026-11-04T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-04T00:00:00Z", + "period_end": "2026-11-05T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-04T05:00:00Z", + "period_end": "2026-11-05T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-07T00:00:00Z", + "period_end": "2026-11-08T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-07T05:00:00Z", + "period_end": "2026-11-08T05:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_a_pkg", + "period_start": "2026-11-08T00:00:00Z", + "period_end": "2026-11-09T00:00:00Z", + "media_buy_ids": ["mb_1"] + }, + { + "subscription_version": 1, + "offering_id": "off_e_pkg_acct_tz", + "period_start": "2026-11-08T05:00:00Z", + "period_end": "2026-11-09T05:00:00Z", + "media_buy_ids": ["mb_1"] + } + ] + }, + { + "id": "account-resolved-source-timezone-requires-the-resolved-zone", + "name": "An account-resolved source_timezone offering needs the seller-resolved zone", + "origin": "adcp", + "rule": "A source_timezone offering with period_timezone_policy account_resolved publishes no zone; the seller resolves the account's upstream reporting timezone and echoes it as the obligation's period.source_timezone. Without that value the boundaries cannot be derived.", + "spec_refs": [ + "static/schemas/source/core/reporting-schedule-offering.json#/properties/period_timezone_policy", + "static/schemas/source/core/reporting-schedule.json#/x-adcp-validation/period_generation" + ], + "input": { + "subscription_id": "analytics-daily", + "versions": [ + { + "subscription_version": 1, + "accepted_at": "2026-11-01T12:00:00Z", + "configuration": { + "subscription_id": "analytics-daily", + "subscription_version": 1, + "active": true, + "scope": {"all_authorized_accounts": true}, + "selector": {"feed_purpose": "analytics", "period_duration": "P1D", "required_finality": "official", "dimensions": ["package"]}, + "reconciliation_mode": "delivery_only" + } + } + ], + "account": {"account_id": "acct_1", "timezone": "America/New_York", "grants": [{"authorized_at": "2026-10-01T00:00:00Z"}]}, + "buys": [ + { + "media_buy_id": "mb_1", + "confirmed_at": "2026-11-02T15:00:00Z", + "start_time": "2026-11-03T00:00:00Z", + "end_time": "2026-11-06T00:00:00Z", + "packages": [{"package_id": "pkg_1", "reporting_delivery_offering_ids": ["off_s_resolved"]}] + } + ], + "offerings": [ + { + "offering_id": "off_s_resolved", + "feed_purpose": "analytics", + "report_definition_id": "rd_off_s_resolved", + "report_definition_uri": "https://seller.example/report-definitions/off_s_resolved.json", + "report_definition_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "reporting_profile": { + "id": "adcp.delivery.v1", + "version": "1.0.0", + "schema_uri": "https://seller.example/schemas/delivery.json", + "schema_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "schema_dialect": "https://json-schema.org/draft/2020-12/schema", + "schema_ref_policy": "local_fragment_only", + "grain": "daily", + "primary_keys": ["account_id", "package_id"] + }, + "schedule": {"period_duration": "P1D", "alignment": "source_timezone", "delivery_sla": "PT6H", "period_timezone_policy": "account_resolved"}, + "supported_finality": ["official"], + "reconciliation_mode": "delivery_only", + "standard_dimensions": ["package"] + } + ], + "now": "2026-12-01T00:00:00Z" + }, + "expected_error": {"code": "COVERAGE_INPUT_INCOMPLETE", "detail": "missing_source_timezone", "wire_valid": true} + } + ] +} diff --git a/tests/test_reporting_subscription_engine.py b/tests/test_reporting_subscription_engine.py index 7ad8aae4f..334a67373 100644 --- a/tests/test_reporting_subscription_engine.py +++ b/tests/test_reporting_subscription_engine.py @@ -1032,8 +1032,12 @@ async def test_an_account_without_a_timezone_is_never_given_utc() -> None: ) await world.engine._evaluate(IDENTITY, at("2026-10-01T00:00:00Z")) assert ("https://agency.example/agent", "analytics") in world.engine.evaluation_errors - with pytest.raises(ValueError, match="account timezone is required"): + with pytest.raises(ValueError) as missing: # CoverageInputError is a ValueError await world.seller_owes("analytics", "acct-1", "2026-10-06T00:00:00Z") + assert (missing.value.code, missing.value.detail) == ( + "COVERAGE_INPUT_INCOMPLETE", + "missing_account_timezone", + ) # Once the host says, the zone is set without a fake UTC -> NY cutover. world.host.accounts["acct-1"] = AuthorizedAccount( "acct-1", timezone=NY, authorized_at=at("2026-09-01T00:00:00Z") diff --git a/tests/test_reporting_subscription_facade.py b/tests/test_reporting_subscription_facade.py index b8c46e921..c5787c009 100644 --- a/tests/test_reporting_subscription_facade.py +++ b/tests/test_reporting_subscription_facade.py @@ -160,6 +160,7 @@ async def test_omitting_a_destination_is_refused_unless_allowed() -> None: destination={"destination_id": "warehouse", "path_template": "a/{account_id}"} ), register_destination=DESTINATION, + acknowledge_cross_operator=True, ) raw = SyncPrincipalRequest.model_validate( {"idempotency_key": "raw-write-0000000003", "configuration": {"reporting_destinations": []}} @@ -167,6 +168,7 @@ async def test_omitting_a_destination_is_refused_unless_allowed() -> None: with pytest.raises(ReportingSubscriptionError) as refused: await guard_sync_principal(client, raw) assert refused.value.code == "DESTINATION_WOULD_REVOKE" + assert refused.value.would_revoke == ("warehouse",) await guard_sync_principal(client, raw, allow_revocation=True) @@ -300,7 +302,7 @@ def _account(account_id: str, operator: str, configs=()) -> dict[str, Any]: } -async def test_roster_checks_refuse_an_id_clash_and_cross_operator_scope() -> None: +async def test_roster_checks_refuse_an_id_clash() -> None: clash = Roster( Seller(), [ @@ -311,12 +313,23 @@ async def test_roster_checks_refuse_an_id_clash_and_cross_operator_scope() -> No ) with pytest.raises(ReportingSubscriptionError) as refused: await ReportingClient(clash).subscribe(_subscription()) - assert refused.value.code == "SUBSCRIPTION_ID_CLASH" and is_pre_dispatch_error(refused.value) - two = Roster(Seller(), [_account("a", "op-a.example"), _account("b", "op-b.example")]) + error = refused.value + assert error.code == "SUBSCRIPTION_ID_CLASH" and is_pre_dispatch_error(error) + assert (error.delivery_config_id, error.account_id) == ("analytics", "acct-1") + + +async def test_an_all_accounts_subscription_naming_a_destination_needs_operator_domains() -> None: + to_warehouse = _subscription( + destination={"destination_id": "warehouse", "path_template": "a/{account_id}"} + ) + reporting = ReportingClient(Client(Seller())) with pytest.raises(ReportingSubscriptionError) as scoped: - await ReportingClient(two).subscribe(_subscription()) + await reporting.subscribe(to_warehouse, register_destination=DESTINATION) assert scoped.value.code == "SUBSCRIPTION_OPERATOR_SCOPE_REQUIRED" - created = await ReportingClient(two).subscribe(_subscription(), acknowledge_cross_operator=True) + assert is_pre_dispatch_error(scoped.value) + created = await reporting.subscribe( + {**to_warehouse, "operator_domains": ["op-a.example"]}, register_destination=DESTINATION + ) assert created.action == "created" @@ -339,7 +352,8 @@ async def test_a_selector_no_advertised_offering_matches_is_refused_before_dispa await ReportingClient(hourly).subscribe(_subscription()) error = unmatched.value assert error.code == "SUBSCRIPTION_SELECTOR_UNMATCHED" and is_pre_dispatch_error(error) - assert "hourly (period_duration PT1H)" in str(error) + assert error.nearest == (("hourly", ("period_duration",)),) + assert "hourly (period_duration)" in str(error) daily = Roster(Seller(), [], offerings=[_offering("pkg", "P1D", ["package"])]) preview = await ReportingClient(daily).preview(_subscription()) assert (preview.would_be, preview.subscription_version) == ("created", 1) diff --git a/tests/test_reporting_subscription_parity.py b/tests/test_reporting_subscription_parity.py index f422dc208..b05b2f774 100644 --- a/tests/test_reporting_subscription_parity.py +++ b/tests/test_reporting_subscription_parity.py @@ -1,23 +1,32 @@ -"""Cross-SDK parity: the TypeScript SDK's coverage table, run against Python. - -``tests/fixtures/reporting_subscriptions/coverage-cases.json`` is copied from -the TypeScript SDK (its ``$source`` names the commit). Each case gives plain -input and the exact owed ``(subscription_version, media_buy_id, offering_id, -period)`` rows, derived by hand from the spec rule, or an expected error. Both -SDKs must produce identical periods, so this test maps the shared input onto -:func:`expected_subscription_periods` and compares instants row by row. +"""Cross-SDK parity: the spec's canonical coverage vectors, run against Python. + +``tests/fixtures/reporting_subscriptions/spec/`` vendors +``static/compliance/source/test-vectors/reporting-subscriptions/`` from the spec +repository at :data:`SPEC_COMMIT` (adcp#8616), pinned below by SHA-256. Each +case gives the buyer-side input and either the exact owed rows, derived from +the spec text its ``spec_refs`` cite and reproduced by an independent +reference model, or the input error. Both SDKs must produce identical periods, +so this test maps each input onto :func:`expected_subscription_periods` and +compares instants row by row. + +The rows are derived with IANA tzdata 2026f. The test pins zoneinfo to the +``tzdata==2026.6`` distribution (2026f), never the host's zoneinfo. """ from __future__ import annotations +import hashlib import json +import zoneinfo from datetime import datetime +from importlib.metadata import PackageNotFoundError, version from pathlib import Path from typing import Any import pytest from adcp.reporting.subscriptions import ( + CoverageInputError, SubscriptionAuthorization, SubscriptionBuy, SubscriptionBuyFlight, @@ -28,8 +37,46 @@ expected_subscription_periods, ) -FIXTURE = Path(__file__).parent / "fixtures" / "reporting_subscriptions" / "coverage-cases.json" -CASES = json.loads(FIXTURE.read_text())["cases"] +SPEC = Path(__file__).parent / "fixtures" / "reporting_subscriptions" / "spec" +#: adcontextprotocol/adcp commit the vendored files come from (adcp#8616). +SPEC_COMMIT = "023bbd26e7c230dcc74bea4087336ea6bc8d0f6a" +PINNED = { + "vectors.json": "b392df771fc2bf635c5c441ff2dd5107e1cda13ab483fe902a6a56661f5e7904", + "case.schema.json": "0550b51097ea2c9a6bbd8721de5b5855acfcbd097dff31edeb0df2f397f7dc42", + "error-codes.json": "4e8e5142ada936fc8923735155d786a0801258922fb85b492785730479713481", + "reason-codes.json": "2574b2a32fb8260fc7f9a7d9cd1eac1b588aa22c54a350e54964a893b80e77c4", +} +#: tzdata 2026f is the 2026.6 distribution on PyPI. +TZDATA = "2026.6" +VECTORS = json.loads((SPEC / "vectors.json").read_text()) +CASES = VECTORS["cases"] + + +def test_the_vendored_vectors_are_the_pinned_spec_files() -> None: + for name, digest in PINNED.items(): + assert hashlib.sha256((SPEC / name).read_bytes()).hexdigest() == digest, name + assert VECTORS["tzdata"]["version"] == "2026f" + + +@pytest.fixture(scope="module", autouse=True) +def pinned_tzdata(): + """Resolve zones from the pinned tzdata distribution, never the host's zoneinfo.""" + from adcp.reporting.subscriptions import _clock + + try: + installed = version("tzdata") + except PackageNotFoundError: + installed = None + assert installed == TZDATA, ( + f"the coverage vectors need tzdata {TZDATA} (IANA 2026f); install the dev extra" + ) + zoneinfo.reset_tzpath(to=[]) + zoneinfo.ZoneInfo.clear_cache() + _clock._iana_zones.cache_clear() + yield + zoneinfo.reset_tzpath() + zoneinfo.ZoneInfo.clear_cache() + _clock._iana_zones.cache_clear() def at(value: str | None) -> datetime | None: @@ -163,19 +210,18 @@ def rows(owed) -> list[tuple]: ] -#: The table names JavaScript error classes. Python raises ValueError for the -#: malformed input TypeScript reports as TypeError (and RangeError). -ERROR_CLASSES = {"TypeError": ValueError, "RangeError": ValueError} - - -@pytest.mark.parametrize("case", CASES, ids=[case["name"] for case in CASES]) -def test_typescript_parity(case: dict[str, Any]) -> None: +@pytest.mark.parametrize("case", CASES, ids=[case["id"] for case in CASES]) +def test_spec_vectors(case: dict[str, Any]) -> None: if "expected_error" in case: - expected_class = ERROR_CLASSES[case["expected_error"]] - with pytest.raises(Exception) as raised: + expected = case["expected_error"] + with pytest.raises(CoverageInputError) as raised: periods(case["input"]) - # Strict: malformed input, not an incidental KeyError or AttributeError. - assert isinstance(raised.value, expected_class), (case["name"], raised.value) + error = raised.value + assert (error.code, error.detail) == (expected["code"], expected["detail"]), ( + case["id"], + str(error), + ) + assert error.recovery == "correctable" return owed = periods(case["input"]) assert {p.delivery_config_id for p in owed} <= {case["input"]["subscription_id"]} @@ -214,14 +260,16 @@ def test_typescript_parity(case: dict[str, Any]) -> None: ], case.get("rule") -def test_every_subscription_in_the_table_is_schema_valid() -> None: - """The table's subscriptions validate against core/reporting-subscription.json.""" +def test_every_vector_subscription_is_schema_valid() -> None: + """Each vector's subscriptions validate against core/reporting-subscription.json.""" from adcp.validation import schema_loader validator = schema_loader.get_named_validator( "core/reporting-subscription.json", version="3.3.0-beta.1" ) for case in CASES: + if case.get("expected_error", {}).get("wire_valid") is False: + continue # the input deliberately fails AdCP schema validation (P1W) for version in case["input"]["versions"]: errors = [ error.message @@ -231,3 +279,50 @@ def test_every_subscription_in_the_table_is_schema_valid() -> None: if not (error.validator == "enum" and "dimensions" in list(error.absolute_path)) ] assert errors == [], (case["name"], version["subscription_version"], errors) + + +def test_error_codes_match_the_frozen_spec_vocabulary() -> None: + """Codes, recovery classes, dispatch and Python classes follow error-codes.json.""" + import adcp.reporting as reporting + from adcp.reporting.subscriptions import ( + COVERAGE_INPUT_DETAILS, + REPORTING_SUBSCRIPTION_ERROR_CODES, + ReportingSubscriptionError, + ) + + vocabulary = json.loads((SPEC / "error-codes.json").read_text()) + assert vocabulary["vocabulary_version"] == 1 + classes = { + "ReportingSubscriptionError": ReportingSubscriptionError, + "CoverageInputError": CoverageInputError, + "ReliableReportingConfigurationError": reporting.ReliableReportingConfigurationError, + } + buyer = {} + details: set[str] = set() + for entry in vocabulary["codes"]: + assert entry["sdk_classes"]["python"] in classes, entry["code"] + if entry["sdk_classes"]["python"] == "ReportingSubscriptionError": + buyer[entry["code"]] = (entry["recovery"], entry["dispatched"] == "false") + if entry["code"] in {"COVERAGE_INPUT_INCOMPLETE", "COVERAGE_INPUT_INVALID"}: + for detail in entry["details"]: + details.add(detail) + error = CoverageInputError(detail, "x") + assert (error.code, error.recovery) == (entry["code"], entry["recovery"]) + assert error.dispatched is None # a local computation dispatches nothing + assert dict(REPORTING_SUBSCRIPTION_ERROR_CODES) == buyer + assert COVERAGE_INPUT_DETAILS == details + + +def test_reason_codes_match_the_frozen_spec_vocabulary() -> None: + from adcp.reporting.subscriptions import ( + COVERAGE_REASON_CODES, + COVERAGE_RULE_ORDER, + COVERAGE_VOCABULARY_VERSION, + ) + + vocabulary = json.loads((SPEC / "reason-codes.json").read_text()) + assert vocabulary["vocabulary_version"] == COVERAGE_VOCABULARY_VERSION + assert list(COVERAGE_RULE_ORDER) == vocabulary["rule_order"] + assert dict(COVERAGE_REASON_CODES) == { + item["code"]: item.get("rule") for item in vocabulary["reasons"] + }