aeat.domain.user_profile._registry_contract module¶
Cross-reference user-profile schema metadata against modelo registry use.
Validates every ModeloDefinition in the registry against the
user-profile schema, checking that each ModeloRevision binding
selector, filing schedule predicate, and deadline applicability condition
maps to a declared profile fact path.
- class UserProfileRegistryContractSeverity(*values)[source]¶
Bases:
StrEnumSeverity of a user-profile to modelo-registry contract issue.
- ERROR¶
- WARNING¶
- class UserProfileRegistryContractIssue(**data)[source]¶
Bases:
BaseModelOne unresolved cross-reference between user-profile schema and modelos.
- Parameters:
- severity: UserProfileRegistryContractSeverity¶
- modelo_id: str¶
- revision_id: str¶
- surface: Literal['binding', 'filing_schedule', 'deadline_window', 'export_layout', 'cross_reference_applicability']¶
- construct_id: str¶
- selector: str¶
- message: str¶
- class UserProfileSelectorIndex(**data)[source]¶
Bases:
BaseModelSchema-owned selector namespaces consumed by modelo registry surfaces.
- Parameters:
- profile_selectors: frozenset[str]¶
- schedule_predicates: frozenset[str]¶
- export_headers: frozenset[str]¶
- field_paths: frozenset[str]¶
- class UserProfileRegistryContractReport(**data)[source]¶
Bases:
BaseModelTyped result for profile schema coverage against modelo registry usage.
- Parameters:
- schema_id: str¶
- schema_version: int¶
- checked_modelos: tuple[str, ...]¶
- issues: tuple[UserProfileRegistryContractIssue, ...]¶
- property errors: tuple[UserProfileRegistryContractIssue, ...]¶
Return blocking
UserProfileRegistryContractIssuefailures.
- property warnings: tuple[UserProfileRegistryContractIssue, ...]¶
Return non-blocking
UserProfileRegistryContractIssuecoverage gaps.
- build_user_profile_selector_index(schema)[source]¶
Build the profile selector namespaces declared by the TOML schema.
- Return type:
- Returns:
A
UserProfileSelectorIndexwith all declared selector namespaces.- Parameters:
schema (ProfileSchemaDefinition)
- validate_user_profile_registry_contract(modelos, schema)[source]¶
Validate all profile-facing modelo registry references against the schema.
Blocking errors are reserved for model calculation and schedule selectors that cannot be resolved from schema-declared profile facts. Export header gaps are warnings during the rollout because several committed layouts use non-profile operational headers that will move behind an export-context backend rather than a live taxpayer profile fact.
- Parameters:
modelos (
Iterable[ModeloDefinition]) – Iterable ofModeloDefinitioninstances to validate.schema (
ProfileSchemaDefinition) – The user-profile schema to validate registry references against.
- Return type:
- Returns:
A
UserProfileRegistryContractReportwith all issues found.