cadrumo.application.state_projection_ports module¶
Application-owned read contracts for the operator state projection.
The projection producer needs a small, profile-scoped view of persistence. It does not need to know which catalogue repositories or storage-runtime inspection serve that view. This module owns the DTOs and the required port bundle that an outer composition root supplies for one profile session.
Core types:
UserProfileRecord.
- class StateProjectionWorkspaceRead(transactions, invoices, drafts, work_units, discarded_work_units, calculation_revisions, unreadable_rows)[source]¶
Bases:
objectCounters and integrity facts read from one profile workspace.
- Parameters:
- class StateProjectionProfileRead(bucket_id, record)[source]¶
Bases:
objectThe profile bucket and current record used by readiness evaluation.
- Parameters:
bucket_id (str)
record (UserProfileRecord)
-
record:
UserProfileRecord¶
- class StateProjectionWorkspaceReadPort(*args, **kwargs)[source]¶
Bases:
ProtocolRead the workspace counters for an explicitly selected bucket.
- class StateProjectionProfileReadPort(*args, **kwargs)[source]¶
Bases:
ProtocolRead the current profile record for an active profile identifier.
- exception StateProjectionReadError(operation)[source]¶
Bases:
CadrumoErrorStable application error raised when a projection read cannot complete.
- Parameters:
operation (str)
- Return type:
None
- code¶
- class StateProjectionReadPorts(workspace, profile, usage_ratio_profile_loader)[source]¶
Bases:
objectRequired persistence reads for one operator state projection.
- Parameters:
workspace (StateProjectionWorkspaceReadPort)
profile (StateProjectionProfileReadPort)
usage_ratio_profile_loader (UsageRatioProfileLoader)
-
workspace:
StateProjectionWorkspaceReadPort¶
-
profile:
StateProjectionProfileReadPort¶
-
usage_ratio_profile_loader:
UsageRatioProfileLoader¶ The persisted usage-ratio read is carried alongside profile readiness because the ledger preflight is part of this same projection.