SyncReport
Aggregate result of one sync() tick (SPEC §8).
Same invariants as ConnectionSyncReport: negative counts
raise auradefi.errors.ValidationError, as does no_op=True
with any non-zero count and any split where
pages_fetched != live_pages + backfill_pages. The tick's whole
budget is the sum of the two phases it was spent on.
connections carries the per-connection breakdown, defaulting to
(). When it is non-empty it PINS the aggregate: each of the
four counts must equal the sum over the rows and no_op must be
True exactly when every row is a no-op. An aggregate that
contradicts its own breakdown raises ValidationError rather
than reporting two different truths. Prefer assemble, which
derives all five from the rows so they cannot disagree.
failed_connections is likewise derived from the rows, so a
partial failure is nameable rather than hidden behind an aggregate
that reads like a clean tick (RELEASE_0.1.1 §5 #24).
Fields
no_opboolpages_fetchedintlive_pagesintbackfill_pagesinttransactions_ingestedintconnectionstuple[ConnectionSyncReport, ...]default ()failed_connectionspropertyIds of exactly the rows that failed, in breakdown order.assemble
assemble(cls, connections: Iterable[ConnectionSyncReport]) -> SyncReport
Assemble a tick aggregate from its rows; pinned algorithm.
- each of
pages_fetched,live_pages,backfill_pagesandtransactions_ingestedis the exactintsum overconnections: the tick spent one shared budget, so the rows ARE the total. no_opis True iff every row is a no-op; a tick that did work anywhere did work. Zero connections is a no-op tick.connectionsstored as a tuple in input order.
The result satisfies every SyncReport invariant by
construction, so the aggregate can never be typed out of
agreement with its breakdown.
Parameters
connectionsrequired, Iterable[ConnectionSyncReport]none
__init__
__init__(self, no_op: bool, pages_fetched: int, live_pages: int, backfill_pages: int, transactions_ingested: int, connections: tuple[ConnectionSyncReport, ...] = ()) -> None
Parameters
no_oprequired, boolnone
pages_fetchedrequired, intnone
live_pagesrequired, intnone
backfill_pagesrequired, intnone
transactions_ingestedrequired, intnone
connectionsoptional, tuple[ConnectionSyncReport, ...], default ()none