aeat.application.user_profile package¶
Lazy application facade for schema-driven user-profile operations.
This package is the application boundary for the centralised profile
backend. The domain layer (domain.user_profile) owns the
schema, value records, selector registry contract, and portable-export
payload type domain.user_profile.UserProfilePortableExport.
This package owns the command/result records and service entry points
that operate on that contract: lifecycle orchestration, validation and
preflight checks, Censo synchronisation, capability and custody helpers,
consumer projections, bucket-scoped storage sessions, and portable
bundle serialisation.
The records here have no business logic; they are the typed contract
passed between CLI adapters, secure-storage persistence wiring,
bucket-maintenance flows, Modelo readiness gates, workflow adapters, and
calculation/filing/aggregation consumers. The aggregate passed across
service boundaries is domain.user_profile.UserProfileRecord.
The service implementations live in sibling modules and are exposed as
lazy facade members, including
ProfileLifecycleService,
UserProfileSnapshotRepository,
ProfileValidationService, and
ProfilePreflightService.
Portable export composition follows the same split.
serialize_profile_bundle() and deserialize_profile_bundle() live
on this facade so CLI config and bucket-maintenance code compose through
top-level re-exports, while the bundle payload remains the domain-layer
domain.user_profile.UserProfilePortableExport. The current v3 bundle
is the only accepted import shape. Its default
adapters.persistence.storage.StorageCustodyProfile.STRUCTURED scope
carries the typed profile, work-unit, ledger, calculation, and filing categories
plus registry-selected secure-object rows. Sealed bucket backup requests
adapters.persistence.storage.StorageCustodyProfile.FULL,
which asserts every populated secure-object namespace has a registry
custody disposition before export. Generic carried rows use their natural
object keys rather than stored HMAC lookup digests, so import can
re-save them through the target bucket’s secure-object substrate and
re-encrypt under the recipient bucket DEK.
Custody helpers exposed here are application commands over storage-owned
secret-store primitives. mint_recovery_code(),
verify_recovery_code(), rekey_secret_store(), and
recover_secret_store() resolve runtime settings, update active-bucket
recovery metadata when needed, and return typed result records while leaving key
wrapping and recovery envelope persistence in adapters.persistence.storage.
Projection and baseline helpers such as
record_to_path_values(), projection_for_taxpayer(), and
missing_filing_baseline_flags() provide the canonical schema-path and
deadline-engine shapes consumed by filing gates instead of recreating profile
fact decoding downstream.
Every re-exported name is resolved on demand through module-level
__getattr__ (PEP 562). Top-level imports in this file are reserved
for genuinely lightweight setup (core.identity.ProfileId
and the active-profile language-resolver registration) so the boundary
itself does not drag the domain portable-export / registry / service
module surfaces into sys.modules. The state-free CLI surfaces
(aeat, aeat --version, aeat --help) must not pay the
registry cost via this boundary, which the
entrypoints.cli.test_lazy_command_tree gate and the
producer-side probe in
application.user_profile.test_lazy_boundary both enforce.
See also
domain.user_profileDomain schema, value records, registry-selector contract, and lazy portable-export payload consumed by this facade.
ProfileLifecycleServiceApplication service for register, edit, rename, duplicate, snapshot, and remove operations over
domain.user_profile.UserProfileRecord.CensoSyncServiceCenso snapshot comparison and profile-fact application service.
application.bucket_maintenanceBucket lifecycle facade that composes this package’s portable-bundle serialiser and deserialiser for sealed export/import.
adapters.persistence.storageSecure-object repository, namespace custody registry, and master-key recovery primitives composed by this facade without owning storage policy.
application.modeloFiling-grade modelo workflows that consume profile preflight and projection helpers from this boundary.
Submodules¶
- aeat.application.user_profile._aggregate module
- aeat.application.user_profile._bundle module
- aeat.application.user_profile._bundle_encryption module
EncryptedProfileBundleExportEncryptedProfileBundleExport.encrypted_bundle_schema_versionEncryptedProfileBundleExport.payload_modelEncryptedProfileBundleExport.payload_schema_versionEncryptedProfileBundleExport.kdfEncryptedProfileBundleExport.kdf_versionEncryptedProfileBundleExport.memory_costEncryptedProfileBundleExport.time_costEncryptedProfileBundleExport.parallelismEncryptedProfileBundleExport.salt_b64EncryptedProfileBundleExport.ciphertext_b64
EncryptedProfileBundleErrorencrypt_profile_bundle_for_passphrase()decrypt_profile_bundle_with_passphrase()
- aeat.application.user_profile._capabilities module
- aeat.application.user_profile._censo_errors module
- aeat.application.user_profile._censo_sync module
- aeat.application.user_profile._commands module
RegisterProfileCommandEditProfileFieldCommandEditProfileSectionCommandRemoveProfileCommandReactivateProfileCommandDuplicateProfileCommandRenameProfileCommandProfileLifecycleResultProfileListingProfileListResultProfileValidationIssueProfileValidationReportProfilePreflightRequirementProfilePreflightReportProfileSnapshotRequestProfileSnapshotProfileStaleCheckReportProfileImportResult
- aeat.application.user_profile._completeness module
- aeat.application.user_profile._custody module
- aeat.application.user_profile._custody_carry module
- aeat.application.user_profile._filing_baseline module
- aeat.application.user_profile._integrity module
- aeat.application.user_profile._keys_validation module
- aeat.application.user_profile._language_resolver module
- aeat.application.user_profile._lifecycle module
- aeat.application.user_profile._orchestration module
build_lifecycle_service()profile_create_storage_span()profile_storage_session()ProfileAlreadyRegisteredErrorregister_active_profile()select_profile_with_lifecycle_span()delete_profile_with_lifecycle_span()reactivate_profile_with_lifecycle_span()logout_active_profile()capture_active_profile_pointer()restore_active_profile_pointer()refuse_duplicate_label()require_registered_label()remove_profile_bucket_directory()select_profile()set_active_field()set_active_fields()remove_active_profile()fact_value()rename_profile()
- aeat.application.user_profile._preflight module
- aeat.application.user_profile._profile_repository module
- aeat.application.user_profile._projections module
- aeat.application.user_profile._repository module
- aeat.application.user_profile._testing module
- aeat.application.user_profile._validation module