Skip to content

feat(reporting): owe the period in which a buy is confirmed - #8593

Merged
bokelley merged 1 commit into
mainfrom
bokelley/subscription-start-includes-confirmed-period
Oct 29, 2026
Merged

bokelley merged 1 commit into
mainfrom
bokelley/subscription-start-includes-confirmed-period

Conversation

@bokelley

@bokelley bokelley commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Owner decision on the protocol expert's P0 #1, for 3.3.0-beta.2.

Change. The subscription start bound is the first boundary at or after the later of the version's accepted_at and the account's authorized_at. A buy is then owed every period that ends after its confirmed_at and overlaps its flight, so a mid-period confirmation owes that period in full.

Why. confirmed_at used to move the start to the next boundary:

  • an ASAP buy confirmed at 10:00 on its start day owed nothing for that day on a daily feed;
  • a buy confirmed on November 12 owed nothing for November on a monthly billing feed, so its invoiced spend appeared in no official billing revision and consumer receipts couldn't reconcile;
  • subscription obligations disagreed with the account-level ledger, which already includes any buy confirmed by a period's end (core/reporting-obligation.json scope_resolution).

Also: a flight whose stop time is at or before its start_time (a buy canceled before it starts) overlaps no period and owes nothing. Both SDKs had that bug, found in expert review.

Updated:

  • reporting-subscription.json coverage;
  • the coverage and state descriptions;
  • the get-reporting-status-response note;
  • sync_principal, get_principal, get_reporting_status, and the reporting implementation guide;
  • What's new in 3.3;
  • the reference model and expectations in tests/reporting-subscriptions.test.cjs, plus an empty-flight case.

The SDK stacks (adcp-client #3505/#3508/#3509, adcp-client-python #1696/#1698/#1699) keep this rule in one function and will adopt it.

🤖 Generated with Claude Code


Open workspace in Conductor

The subscription start bound is the later of accepted_at and authorized_at;
a buy is owed every period that ends after its confirmed_at and overlaps
its flight. Before, confirmed_at also moved the start to the next boundary,
so an ASAP buy owed nothing for its first day and a buy confirmed Nov 12
owed nothing for November on a monthly billing feed, disagreeing with the
account-level ledger. An empty flight (stop at or before start) owes nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated path requires human/CODEOWNERS review.

This PR modifies four protocol-source schemas under static/schemas/source/**, which is a deterministic hard approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied and the PR cannot be auto-approved (decision table row 2).

Escalation reasons

  • Modifies gated schema files requiring human/CODEOWNERS approval:
    • static/schemas/source/core/reporting-subscription-coverage.json
    • static/schemas/source/core/reporting-subscription-state.json
    • static/schemas/source/core/reporting-subscription.json
    • static/schemas/source/media-buy/get-reporting-status-response.json

The reviewer reported a clean, coherent change: the coverage-start rule now owes a buy from the period ending after confirmed_at (mid-period confirmation owes the full period), with verified schema↔docs coherence across all four schemas and five docs pages, untouched dist/3.3.0-beta.1 artifacts, and a correct minor changeset on an x-status:experimental surface. No MUST FIX, no blocking, no medium findings. This is an experimental-surface refinement, but the semantic coverage-rule change plus the deterministic gate warrant a human sign-off before merge.

No critical/high/medium findings — the escalation is driven solely by the unsatisfied gated-path approval requirement, not by code defects.

Why human review

  • Gated path: static/schemas/source/core/reporting-subscription-coverage.json modified — human/CODEOWNERS review required (review_decision is REVIEW_REQUIRED, not APPROVED)
  • Gated path: static/schemas/source/core/reporting-subscription-state.json modified — human/CODEOWNERS review required
  • Gated path: static/schemas/source/core/reporting-subscription.json modified — human/CODEOWNERS review required
  • Gated path: static/schemas/source/media-buy/get-reporting-status-response.json modified — human/CODEOWNERS review required
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-subscription-coverage.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-subscription-state.json (modified) matches static/schemas/source/**; static/schemas/source/core/reporting-subscription.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-reporting-status-response.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 29, 2026
@bokelley
bokelley merged commit b9c660b into main Oct 29, 2026
66 checks passed
@bokelley
bokelley deleted the bokelley/subscription-start-includes-confirmed-period branch October 29, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant