aeat.domain.user_profile package

Public facade for the central user-profile schema contract.

The package exposes strict Pydantic schema records, live value records, the schema loader, and the registry-selector coverage report for the schema-driven user-profile backend. The primary runtime aggregate is UserProfileRecord: TOML owns schema metadata and selector namespaces, while live profile facts and immutable snapshots are stored by the persistence layer. new_profile_id() mints the immutable UUID identity used as the profile and bucket id; display_name is the mutable operator label and is not a storage key. Active-bucket selection, pointer files, and storage sessions live in the application/workflow layers, not in these schema records.

The UserProfilePortableExport re-export is resolved on demand through a module-level __getattr__ (PEP 562). The portable-export bundle composes four heavy domain types domain.modelos.CalculationRevision, domain.modelos.WorkUnit, domain.transactions.Transaction, and domain.modelos.ModeloRecord) whose imports cascade into the calculation registry; eagerly re-exporting it at this boundary would drag the full registry into every consumer that touches the package surface, including the state-free CLI surfaces enforced by entrypoints.cli.test_lazy_command_tree. CarriedSecureObject and CoverageManifest are declared in the same _portable_export module and share the same lazy-resolution path so importing either does not trigger the same cascade. Every other re-export (errors, value records, schema records, loader, registry-contract) stays eager because each is genuinely lightweight and every consumer pays for it unconditionally.

See also

UserProfileRecord

Canonical runtime aggregate carrying profile facts and lifecycle state.

UserProfilePortableExport

Lazy-resolved cross-bucket bundle payload that includes profile, work-unit, ledger, calculation, and filing history.

validate_user_profile_registry_contract()

Registry-selector coverage check binding schema paths to modelo calculation requirements.

new_profile_id()

Identity authority for UUID-backed profile and bucket ids.

application.user_profile

Application facade for lifecycle services, Censo sync, preflight, projections, custody, and portable-bundle serialisation.

application.workflow

Active-profile pointer and bucket-manifest readers that resolve the current storage slice before application services load records.

Submodules