cadrumo.application.filing.history_repository module

Application repository facade for local filing-history records.

The repository persists lightweight ModeloHistory payloads keyed by modelo. Encrypted storage, envelope validation, and persistence failures are owned by the required outer capability in history_ports.

Core types: SensitivityClass.

class ModeloHistoryRepository(*, ports)[source]

Bases: object

Bucket-bound application facade over the filing-history capability.

Parameters:

ports (FilingHistoryPorts)

namespace: ClassVar[str]
sensitivity: ClassVar[SensitivityClass]
schema_version: ClassVar[int]
payload_type

alias of ModeloHistory

property bucket_id: str

Return the bucket identity carried by the required port bundle.

property store_dir: Path

Return the logical secure-store marker for this repository.

envelope_path_for(identifier)[source]

Return the logical marker for identifier.

Return type:

Path

Parameters:

identifier (str)

lock_target_for(identifier)[source]

Return the logical lock marker for identifier.

Return type:

Path

Parameters:

identifier (str)

extract_identifier(payload)[source]

Return the natural modelo identifier carried by payload.

Return type:

str

Parameters:

payload (ModeloHistory)

classmethod payload_model()[source]

Return the payload type for outer custody-key inspection.

Return type:

type[ModeloHistory]

load(identifier)[source]

Load one history through the composed application capability.

Return type:

ModeloHistory | None

Parameters:

identifier (str)

save(payload)[source]

Persist one history through the composed application capability.

Return type:

None

Parameters:

payload (ModeloHistory)

delete(identifier)[source]

Delete one history through the composed application capability.

Return type:

bool

Parameters:

identifier (str)

iter_records()[source]

Iterate all histories through the composed application capability.

Return type:

Iterator[ModeloHistory]

list_modelos()[source]

Return every modelo persisted in this repository, sorted.

Return type:

tuple[str, ...]