feat(reporting): prototype reliable ledger reconciliation - #1095
Draft
bokelley wants to merge 6 commits into
Draft
feat(reporting): prototype reliable ledger reconciliation#1095bokelley wants to merge 6 commits into
bokelley wants to merge 6 commits into
Conversation
| class ReportingReconciliationClient(Protocol): | ||
| async def get_reporting_status( | ||
| self, request: GetReportingStatusRequest | ||
| ) -> TaskResult[GetReportingStatusResponse]: ... |
|
|
||
| async def sync_reporting_receipts( | ||
| self, request: SyncReportingReceiptsRequest | ||
| ) -> TaskResult[SyncReportingReceiptsResponse]: ... |
|
|
||
|
|
||
| class ReportingCheckpointStore(Protocol): | ||
| async def get(self, reporting_materialization_id: str) -> ReportingReceipt | None: ... |
| class ReportingCheckpointStore(Protocol): | ||
| async def get(self, reporting_materialization_id: str) -> ReportingReceipt | None: ... | ||
|
|
||
| async def put(self, receipt: ReportingReceipt) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prototype the reliable reporting reconciliation loop in the Python SDK against the current protocol work:
get_reporting_statusandsync_reporting_receiptsover MCP and A2Aadcp.typessurfaceWhy this is a draft
This intentionally validates two pending protocol changes together:
The Python SDK is currently pinned to AdCP 3.2.0-beta.6. Generating from the current combined schema exposed substantial unrelated beta.8 type churn, so this draft does not change the runtime schema pin or commit a new schema cache. It should be rebased/regenerated from the released protocol bundle before merge.
The proof-of-concept generation also refreshes the SDK's generated-contract expectations for the current schema: collision inventory, canonical error-code inventory, and the split between the legacy versioned reporting webhook and the new delivery-ready webhook. The released beta.6 schema cache remains unchanged.
What the prototype proved
A buyer can only call a period definitive when the seller returns a closed, retained denominator and the SDK independently finds every expected period, complete associated history, one current revision at the requested finality, matching materialization evidence, and an accepted consumer receipt when required.
The seller learns that a buyer or governance consumer agrees by reading the authenticated receipt back from the same ledger. Availability alone does not prove consumer agreement or downstream ingestion.
Validation
ruff checkon the reporting implementation, public type exports, and testsmypy --strict src/adcp/reporting.py