aeat.adapters.persistence.profile._filing_runtime module

Runtime-backed repository helpers shared by the filing persistence adapters.

Shared private helpers for the sibling filing repositories (filing_drafts and filing_amendments): a bucket-id resolver and a runtime factory that returns a SecureObjectRepository bound to the active profile bucket. Both live in the persistence adapter alongside the repositories they serve, so the secure-object coupling is a same-layer adapters -> adapters.persistence.storage import rather than a domain -> adapters violation.

See also

resolve_repository_bucket_id()

Shared resolver for explicit-or-active profile bucket ids.

secure_object_repository_for_bucket()

Runtime storage factory used after the filing bucket id is resolved.

filing_drafts

Draft repository consumer of these filing runtime helpers.

_runtime_repository

Application-layer sibling helper that keeps application filing imports out of adapter module import time.

ModeloDraftRepositoryProtocol

Domain repository port implemented by the filing draft adapter.

resolve_filing_repository_bucket_id(bucket_id)[source]

Return an explicit or active profile bucket id for filing repositories.

Return type:

str

Parameters:

bucket_id (str | None)

secure_objects_for_filing_bucket(bucket_id)[source]

Return runtime-created secure-object storage for bucket_id.

Return type:

SecureObjectRepository

Returns:

A SecureObjectRepository scoped to the given filing bucket.

Parameters:

bucket_id (str)