cadrumo.application.overview.evidence module

Frontend-neutral calendar-evidence provider.

The provider accepts source values that an entrypoint or composition root has already loaded. It owns neither repositories nor remote reads; its only job is to preserve the authority/freshness of each evidence axis and delegate the actual reconciliation to calendar_filing_evidence_from_sources().

Core types: ModeloRecord.

class LocalCalendarEvidenceSources(filing_records=())[source]

Bases: object

Already-loaded sources capable of establishing the local filing axis.

Parameters:

filing_records (tuple[ModeloRecord, ...])

filing_records: tuple[ModeloRecord, ...]
class AeatCalendarEvidenceSources(filing_records=(), observed_events=(), filed_declaration_observations=(), verified_filed_declaration_artefact_refs=(), verified_filed_declaration_artefact_csvs=(), calculation_observations=(), justificante_capture_snapshots=(), justificantes=())[source]

Bases: object

Already-loaded sources capable of establishing the observed-AEAT axis.

Verified artefact CSVs use a sorted tuple rather than a mutable mapping so the source bundle stays immutable and has a deterministic representation.

Parameters:
filing_records: tuple[ModeloRecord, ...]
observed_events: tuple[OverviewCalendarEvent, ...]
filed_declaration_observations: tuple[FiledDeclaracionObservationProtocol, ...]
verified_filed_declaration_artefact_refs: tuple[str, ...]
verified_filed_declaration_artefact_csvs: tuple[tuple[str, str], ...]
calculation_observations: tuple[ObservationEnvelopePayload, ...]
justificante_capture_snapshots: tuple[JustificanteCaptureSnapshot, ...]
justificantes: tuple[Justificante, ...]
class CalendarEvidenceReadOutcome(state, value=None)[source]

Bases: Generic

One already-completed source read with explicit authority and freshness.

Parameters:
state: HomeZoneState
value: Optional[TypeVar(SourcesT)]
class CalendarEvidenceProjection(local_state, aeat_state, evidence=<factory>)[source]

Bases: object

Reconciled evidence plus independent local and AEAT source truth.

Parameters:
local_state: HomeZoneState
aeat_state: HomeZoneState
evidence: tuple[OverviewCalendarFilingEvidence, ...]
build_calendar_evidence_projection(*, local, aeat, expected_tax_id=None)[source]

Reconcile already-loaded sources without performing implicit I/O.

STALE is observable: its last known values and observed_at survive unchanged. The other non-observable states never become a false empty or a false submission claim. The underlying reconciler owns all strength, identity, and natural (modelo, filing year, period) joins.

Return type:

CalendarEvidenceProjection

Parameters: