cadrumo.adapters.persistence.profile.verify_observations module

Encrypted persistence adapter for live verification observations.

The live verify application service owns the observation model and its query semantics. This adapter owns the secure-object wire format: one encrypted Envelope[VerifyObservation] per observation, addressed by the bucket and content id under the registry-owned verify namespace.

The adapter is deliberately bucket-bound. A command creates one instance for its active bucket and injects it into VerifyService; the service never needs to know about secure-object records, envelopes, or hashed lookup keys.

Core types: Envelope, SecureObjectRepository.

class VerifyObservationRepository(*, bucket_id, objects=None, settings=None)[source]

Bases: VerifyObservationPersistencePort

Bucket-bound implementation of VerifyObservationPersistencePort.

Parameters:
property bucket_id: str

Return the bucket this adapter is bound to.

load(*, bucket_id, observation_id)[source]

Load one observation by its full content id, or return None.

Return type:

VerifyObservation | None

Parameters:
  • bucket_id (str)

  • observation_id (str)

list_observations(*, bucket_id)[source]

List all observations in deterministic capture order.

Return type:

tuple[VerifyObservation, ...]

Parameters:

bucket_id (str)

save(observation)[source]

Encrypt and persist one application-level verify observation.

Return type:

None

Parameters:

observation (VerifyObservation)