cadrumo.application.live.verify_ports module

Application-owned persistence port for live verification observations.

The verify use case needs only bucket-scoped observation reads and writes. The outer composition supplies the implementation that encrypts, envelopes, and indexes those observations; none of those storage details belong in this module or in cadrumo.application.live.verify.

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

Bases: Protocol

Persist and retrieve application-level verify observations by bucket.

Implementations own storage encryption, envelope/schema validation, namespace selection, natural-key addressing, and translation of backend failures into the application’s error vocabulary. The port deliberately exposes no storage record, envelope, namespace, SQL, or crypto type.

load(*, bucket_id, observation_id)[source]

Return one observation by its full content id, or None when absent.

Return type:

VerifyObservation | None

Parameters:
  • bucket_id (str)

  • observation_id (str)

list_observations(*, bucket_id)[source]

Return every observation in bucket_id in deterministic capture order.

Return type:

tuple[VerifyObservation, ...]

Parameters:

bucket_id (str)

save(observation)[source]

Persist one observation under its application-owned bucket and id.

Return type:

None

Parameters:

observation (VerifyObservation)