aeat.adapters.outbound.storage._records module¶
Pydantic records and enums for the outbound storage abstraction.
Provider records anchor the storage boundary:
adapters.outbound.storage.StorageProvider- synchronous bytes-in / bytes-out provider Protocol.ProviderKind- closed enum naming the v1 backends.ProviderObjectMetadata- per-object metadata returned by listing / fetching operations. Carries the object key HMAC, namespace, byte size, content hash, and backend-native identifier.ProviderProbeReport- health-probe result. Reports whether the backend is reachable, writable, and (when applicable) bound to the expected root folder. Theread_onlyfield surfaces whether the probe ran in read-only mode (no sentinel-write round-trip).RemoteMirrorObjectManifest,RemoteMirrorNamespaceManifest,RemoteMirrorIssue, andRemoteMirrorInspection- immutable manifest and inspection records for remote ciphertext mirror reconciliation byadapters.outbound.storage._mirror_manifest.
- class ProviderKind(*values)[source]¶
Bases:
StrEnumClosed storage backend selector for
adapters.outbound.storage.get_storage_provider().- LOCAL_FILESYSTEM¶
- GOOGLE_DRIVE¶
- class RemoteMirrorIssueKind(*values)[source]¶
Bases:
StrEnumRemote ciphertext mirror degradation classes carried by
RemoteMirrorIssue.- PARTIAL_UPLOAD¶
- PARTIAL_DOWNLOAD¶
- STALE_MIRROR¶
- REVISION_CONFLICT¶
- class ProviderObjectMetadata(**data)[source]¶
Bases:
BaseModelPer-object metadata returned by storage-provider operations.
Returned by
adapters.outbound.storage.StorageProvidermethods:adapters.outbound.storage.StorageProvider.put(),adapters.outbound.storage.StorageProvider.get(), andadapters.outbound.storage.StorageProvider.iter_objects().provider_object_idis the backend-native identifier (a filesystem path for the local provider, a DrivefileIdfor the Google Drive provider). The coordinator threads it through subsequent get/delete/patch calls without re-resolving by name.- Parameters:
- namespace: str¶
- object_key_hmac: str¶
- provider_object_id: str¶
- byte_length: int¶
- content_hash: str¶
- written_at: datetime¶
- class ProviderProbeReport(**data)[source]¶
Bases:
BaseModelHealth-check result returned by storage-provider probes.
Returned by
adapters.outbound.storage.StorageProvider.probe().reachableis True iff the backend endpoint responds at all.writableis True iff a sentinel payload write/delete succeeded; inherently False when the probe runs in read-only mode.root_folder_presentis non-None only when the backend supports the notion of an operator-configured root folder (currently Google Drive).- Parameters:
- provider_kind: ProviderKind¶
- reachable: bool¶
- writable: bool¶
- read_only: bool¶
- root_folder_present: bool | None¶
- detail: str¶
- class RemoteMirrorObjectManifest(**data)[source]¶
Bases:
BaseModelOne ciphertext object entry recorded in a
RemoteMirrorNamespaceManifest.- Parameters:
namespace (str)
object_key_hmac (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])])
classification (str)
schema_version (int)
byte_length (int)
ciphertext_hash (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])])
storage_revision_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])] | None)
previous_storage_revision_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])] | None)
revision_ancestor_ids (tuple[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])], ...])
row_written_at (datetime)
revision_written_at (datetime | None)
- namespace: str¶
- object_key_hmac: _ObjectKeyHmac¶
- classification: str¶
- schema_version: int¶
- byte_length: int¶
- ciphertext_hash: _CiphertextHash¶
- storage_revision_id: _StorageRevisionId | None¶
- previous_storage_revision_id: _StorageRevisionId | None¶
- revision_ancestor_ids: tuple[_StorageRevisionId, ...]¶
- row_written_at: datetime¶
- revision_written_at: datetime | None¶
- class RemoteMirrorNamespaceManifest(**data)[source]¶
Bases:
BaseModelManifest persisted beside remote ciphertext objects for one namespace.
Built by
adapters.outbound.storage.build_remote_mirror_namespace_manifest()and persisted byadapters.outbound.storage.put_remote_mirror_namespace_manifest().- Parameters:
manifest_schema_version (int)
namespace (str)
object_count (int)
latest_revision_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])] | None)
latest_revision_written_at (datetime | None)
objects (tuple[RemoteMirrorObjectManifest, ...])
- manifest_schema_version: int¶
- namespace: str¶
- object_count: int¶
- latest_revision_id: _StorageRevisionId | None¶
- latest_revision_written_at: datetime | None¶
- objects: tuple[RemoteMirrorObjectManifest, ...]¶
- class RemoteMirrorIssue(**data)[source]¶
Bases:
BaseModelOne detected remote mirror degradation in a
RemoteMirrorInspection.- Parameters:
kind (RemoteMirrorIssueKind)
namespace (str)
object_key_hmac (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=64), MaxLen(max_length=64)])] | None)
detail (str)
- kind: RemoteMirrorIssueKind¶
- namespace: str¶
- object_key_hmac: _ObjectKeyHmac | None¶
- detail: str¶