cadrumo.application.aeat_sync.workspace_reader module

Read the local-only AEAT Sync workspace an installed session starts from.

Every fact this workspace shows is either observed AT the AEAT or derived from comparing local records against such an observation, and the decision that governs this surface is explicit: initial load is local-only, and reaching the AEAT is always an operator action with visible progress and result.

So the projection a session opens with reports what is genuinely local — the profile record and the local filing records — and states, per source, why the rest is empty. An AEAT authority is NEVER CAPTURED because nothing has been pulled yet; a local authority with no installed row reader is UNAVAILABLE. A zero filing count is neither of those: it is an observed zero, and it stays distinguishable from both.

What the workspace does offer, even before a pull, are the pull actions themselves, joined to the operation contracts the session actually composed — which is what makes the destination worth reaching in a fresh session.

read_local_aeat_sync_workspace_projection(*, bucket_id, subject_key, observed_at, filings, operation_contracts, custody_count=None, censo_values=None)[source]

Project the pre-pull AEAT Sync workspace for one authenticated profile.

custody_count is how many notification documents this profile already holds locally. None means this session did not read the store – distinct from 0, which means it read and found nothing, a proven zero the operator can act on.

censo_values is the profile’s own censo field values, keyed by schema path. None means this session did not read the profile record, and the census zone stays empty; an empty mapping means it read one that declares none of those fields, which still produces a full set of rows carrying observed blanks. The two are different answers and the census zone shows them differently.

Core types: ModeloRecord.

Return type:

AeatSyncWorkspaceProjectionV1

Parameters: