aeat.adapters.persistence.storage.bucket._sealed_archive_errors module¶
Error classes for the sealed bucket-export archive read / write path.
The classes descend from the existing domain
domain.buckets.BucketExportError /
BucketImportError so the CLI boundary’s
command_error_boundary routes them through the same surface as
the other bucket-maintenance verbs. Authority:
2026-06-03-bucket-sealed-archive-adr.
- exception SealedArchiveLayoutError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
BucketImportErrorRaised when the sealed archive’s tar layout does not match the ADR contract.
The expected layout is exactly two or three named members in the order
header.json,payload.envelope, and optionallyrecovery.wrap. Extra members, out-of-order members, and unknown member names all raise this error before any decryption attempt so a tampered or wrong-version archive fast-fails at the layout boundary.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception SealedArchiveHeaderError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
BucketImportErrorRaised when
header.jsonfails strict-validation asExportArchiveHeader.Covers both schema-shape mismatches (missing or extra fields, wrong types, malformed manifest digest) and semantic refusals (unsupported
archive_schema_version).- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception SealedArchivePayloadError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
BucketImportErrorRaised when the encrypted payload member cannot be decrypted or fails integrity.
Distinct from
SealedArchiveHeaderErrorso the operator sees a precise failure mode: a bad header is fixable upstream (re-export); a bad payload typically means the archive was tampered with or the wrong KEK / recovery passphrase was supplied.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception SealedArchiveWriteError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
BucketExportErrorRaised when the sealed archive cannot be written to the operator-specified path.
Covers IO errors (permission denied, disk full, target is a directory) at archive write time. The export service catches this and surfaces it through the CLI boundary’s
command_error_boundarywithout retry.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶