cadrumo.application.filing.history_ports module

Application-owned persistence contract for local filing history.

The filing-history service owns the payload and repository semantics. An outer composition supplies the encrypted persistence capability through this module; the application surface never names the storage implementation or its errors.

Core types: SensitivityClass.

exception FilingHistoryPersistenceError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]

Bases: ModeloApplicationError

Translated persistence failure for the filing-history boundary.

Parameters:
Return type:

None

code
class FilingHistoryRepositoryPort(*args, **kwargs)[source]

Bases: Protocol

Bucket-bound filing-history persistence capability.

property store_dir: Path

Return the logical secure-store marker used for diagnostics.

envelope_path_for(identifier)[source]

Return the logical marker for one history identifier.

Return type:

Path

Parameters:

identifier (str)

lock_target_for(identifier)[source]

Return the logical lock marker for one history identifier.

Return type:

Path

Parameters:

identifier (str)

load(identifier)[source]

Load one history, returning None when it is absent.

Return type:

ModeloHistory | None

Parameters:

identifier (str)

save(payload)[source]

Persist one validated history payload.

Return type:

None

Parameters:

payload (ModeloHistory)

delete(identifier)[source]

Delete one history and report whether it existed.

Return type:

bool

Parameters:

identifier (str)

iter_records()[source]

Iterate all persisted history payloads with integrity checks.

Return type:

Iterator[ModeloHistory]

class FilingHistoryPorts(repository, bucket_id)[source]

Bases: object

Required authorities for one bucket-local filing-history repository.

Parameters:
repository: FilingHistoryRepositoryPort
bucket_id: str