cadrumo.application.evidence.ports module

Application-owned capabilities for evidence-bundle verification.

The evidence service works with validated bundle models and a bucket-bound work-unit existence check. Encrypted storage and catalogue adapters are composed outside the application package and implement these narrow contracts.

exception EvidenceBundlePersistenceError(operation)[source]

Bases: CadrumoError

Translated failure from an evidence-bundle persistence capability.

Parameters:

operation (str)

Return type:

None

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

Bases: Protocol

Bucket-bound persistence capability for evidence-bundle manifests.

load(identifier)[source]

Load one bundle by its complete storage identifier.

Return type:

EvidenceBundle | None

Parameters:

identifier (str)

save(payload)[source]

Persist one validated bundle manifest.

Return type:

None

Parameters:

payload (EvidenceBundle)

iter_records()[source]

Iterate persisted bundle manifests with integrity checks.

Return type:

Iterator[EvidenceBundle]

class EvidenceBundleWorkUnitPort(*args, **kwargs)[source]

Bases: Protocol

Bucket-bound capability that answers whether a work unit exists.

exists(work_unit_id)[source]

Return whether work_unit_id is present in the work-unit catalogue.

Return type:

bool

Parameters:

work_unit_id (str)

class EvidenceBundlePorts(repository, work_units)[source]

Bases: object

Required authorities for one evidence-bundle service invocation.

Parameters:
repository: EvidenceBundleRepositoryPort
work_units: EvidenceBundleWorkUnitPort