feat(reporting): prototype reliable ledger reconciliation - #1095
feat(reporting): prototype reliable ledger reconciliation#1095bokelley wants to merge 12 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: ... |
| ctx: RequestContext[TMeta], | ||
| ) -> MaybeAsync[GetReportingStatusResponse]: | ||
| """Reconcile the caller's durable reporting ledger.""" | ||
| ... |
| ctx: RequestContext[TMeta], | ||
| ) -> MaybeAsync[SyncReportingReceiptsResponse]: | ||
| """Record caller verification receipts for materialized reports.""" | ||
| ... |
|
SDK validation surfaced five upstream follow-ups beyond the reporting feature itself:
The cross-repository release gate is tracked in adcontextprotocol/adcp#6984. It should let a schema PR produce a deterministic bundle, run both SDK generators before merge, and record the exact protocol commit/bundle digest consumed by generated output. I would treat #1099, #1100, #1101, and #1102 as release-safety work; #1103 is the next implementation/DX slice after the wire contract stabilizes. |
|
Issue #1103 proposes completing the manifest/file inspection surface that this PR's reconciler currently delegates to the adopter via Since this PR is still a draft, it may be worth folding that scope here before merge rather than shipping a separate follow-up PR that needs its own rebase against the protocol bundle. I've deferred #1103 as a fold candidate; closing this PR will resurface it automatically. Generated by Claude Code |
c77c160 to
765d1d3
Compare
|
Packaging fix scope note (from issue triage of #1104): #1104 tracks the bug where VCS-built wheels omit Two paths forward before this PR merges:
Flagging here so the packaging fix doesn't get lost when this PR eventually merges. No action required from the triage routine — this is just the audit trail. Generated by Claude Code |
|
The first adopter is now pinned to this PR's exact commit in scope3data/embedded-sales-agent#456. That exposed and fixed two SDK boundary issues here: agent-configuration types were generated but not exported through the supported public surface, and a clean VCS-built wheel omitted all runtime schemas. The latter is tracked in #1104. A clean wheel now bundles 3,054 schemas and resolves legacy 3.1, managed-reporting, and agent-configuration contracts; the adopter's full typecheck and 6,750-test suite pass against the installed wheel. |
|
Adopter proof from scope3data/embedded-sales-agent#456 is now green against exact commit That run builds the Git wheel in Docker and exercises delivery-webhook serialization under |
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 active beta.9 schema cache is regenerated from a local integration of both protocol branches. This proves the combined contract and fixes source-style schema-reference handling in the generator and runtime loader, but the SDK must not merge or release until both protocol changes are accepted and published as one authoritative bundle.
The generation also updates the SDK's expected schema-collision and generated-contract inventories. Follow-up release-engineering gaps are tracked in adcontextprotocol/adcp#6984 and the linked SDK issues.
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, full required coverage, 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, loader, generated surface, and testsmypyon the reporting implementation and schema loader