aeat.application.registry._corpus module¶
Application services for registry corpus projections.
Citation services project TopicCatalogue entries and reviewed
registry legal references into operator-facing reports.
Manual services project extracted manual parts, rules, and verification
results. Manual verification can receive a
ValidatedRegistryAuthority so manual casilla references are
checked against the same validated registry authority as runtime
registry workflows.
All services are local and read-only: they load bundled topic, registry, and manual catalogues, then return strict report records for the CLI layer. They do not fetch manuals, mutate registry TOML, or emit bucket events.
See also
RegistryCitationsListReport,
RegistryManualsListReport,
RegistryManualRulesReport,
RegistryManualVerificationReport, and
RegistryCorpusIssueProjection.
- class RegistryManualId(*values)[source]¶
Bases:
StrEnumManual identifiers approved for the registry manual operator surface.
These values intentionally narrow the wider
ManualIddomain to the manual families exposed byaeat app registry manuals.- RENTA¶
- IVA¶
- class RegistryTopicProjection(**data)[source]¶
Bases:
BaseModelResolved
Topiccontent exposed by registry corpus services.Topic projections attach localized explanatory text and related legal refs to citation and manual reports without widening those report contracts to the full
TopicCatalogue.- Parameters:
slug (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
title (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
body (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
see_also (tuple[Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)], ...])
legal_refs (tuple[LegalRefId, ...])
- slug: _ProjectionText¶
- title: _ProjectionText¶
- body: _ProjectionText¶
- see_also: tuple[_ProjectionText, ...]¶
- legal_refs: tuple[LegalRefId, ...]¶
- class RegistryCitationReferenceProjection(**data)[source]¶
Bases:
BaseModelOne legal document row in the registry citations surface.
The row is derived from reviewed registry
LegalReferenceentries grouped by document id, preserving the document id for article lookup and topic cross-linking.- Parameters:
id (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
kind (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
number (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
title (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
published_at (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=10, max_length=None, pattern=None, ascii_only=None)])
boe_id (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
boe_url (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
tags (tuple[Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)], ...])
articulo_count (int)
short_title (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
topic_slugs (tuple[Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)], ...])
- id: _ProjectionText¶
- kind: _ProjectionText¶
- number: _ProjectionText¶
- title: _ProjectionText¶
- published_at: _ProjectionDateText¶
- boe_id: _ProjectionText¶
- boe_url: _ProjectionText¶
- tags: tuple[_ProjectionText, ...]¶
- articulo_count: int¶
- short_title: _ProjectionText¶
- topic_slugs: tuple[_ProjectionText, ...]¶
- class RegistryCitationArticleProjection(**data)[source]¶
Bases:
BaseModelOne cited article projection in the registry citations surface.
Built from the current reviewed registry
LegalReferenceentry and its bundled authoritative corpus permalink.- Parameters:
numero (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
titulo (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
summary (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
permalink (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
cite (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)])
- numero: _ProjectionText¶
- titulo: _ProjectionText¶
- summary: _ProjectionText¶
- permalink: _ProjectionText¶
- cite: _ProjectionText¶
- class RegistryCitationsListCommand(**data)[source]¶
Bases:
BaseModelApplication command for listing registry citations.
- Parameters:
tag (str | None)
- tag: str | None¶
- class RegistryCitationShowCommand(**data)[source]¶
Bases:
BaseModelApplication command for showing one registry citation.
- legal_id: str¶
- articulo: str | None¶
- class RegistryCitationsListReport(**data)[source]¶
Bases:
BaseModelTyped report for registry citation listing.
Carries rendered
RegistryTopicProjectionrows andRegistryCitationReferenceProjectionrows from the reviewed legal catalogue.- Parameters:
operation (str)
reference_count (int)
tag_filter (str | None)
topic_count (int)
topics (tuple[RegistryTopicProjection, ...])
references (tuple[RegistryCitationReferenceProjection, ...])
- operation: str¶
- reference_count: int¶
- tag_filter: str | None¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- references: tuple[RegistryCitationReferenceProjection, ...]¶
- class RegistryCitationShowReport(**data)[source]¶
Bases:
BaseModelTyped report for a single registry citation lookup.
Carries one
RegistryCitationReferenceProjection, optional article detail, and relatedRegistryTopicProjectionrows.- Parameters:
operation (str)
reference (RegistryCitationReferenceProjection)
articulo (RegistryCitationArticleProjection | None)
related_topics (tuple[RegistryTopicProjection, ...])
- operation: str¶
- reference: RegistryCitationReferenceProjection¶
- articulo: RegistryCitationArticleProjection | None¶
- class RegistryCorpusIssueProjection(**data)[source]¶
Bases:
BaseModelNormalized issue row for registry corpus verification reports.
Used by citation verification and manual verification so CLI payloads carry one stable issue shape even though the underlying domain issues come from different registry and corpus verifiers.
- level: str¶
- code: str¶
- message: str¶
- reference_id: str | None¶
- class RegistryCitationsVerificationReport(**data)[source]¶
Bases:
BaseModelTyped report for registry citation corpus verification.
- Parameters:
operation (str)
reference_count (int)
issue_count (int)
issues (tuple[RegistryCorpusIssueProjection, ...])
passed (bool)
topic_count (int)
topics (tuple[RegistryTopicProjection, ...])
- operation: str¶
- reference_count: int¶
- issue_count: int¶
- issues: tuple[RegistryCorpusIssueProjection, ...]¶
- passed: bool¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- class RegistryManualPartProjection(**data)[source]¶
Bases:
BaseModelOne discovered local
ManualPartrow.- manual_id: str¶
- year: int¶
- part: str¶
- root: str¶
- class RegistryManualsListCommand(**data)[source]¶
Bases:
BaseModelApplication command for listing registry manuals.
- Parameters:
manual (RegistryManualId | None)
year (int | None)
- manual: RegistryManualId | None¶
- year: int | None¶
- class RegistryManualShowCommand(**data)[source]¶
Bases:
BaseModelApplication command for showing one registry manual.
- Parameters:
manual (RegistryManualId)
year (int)
part (ManualPart)
section (str | None)
- manual: RegistryManualId¶
- year: int¶
- part: ManualPart¶
- section: str | None¶
- class RegistryManualRulesCommand(**data)[source]¶
Bases:
BaseModelApplication command for listing registry manual rules.
- Parameters:
manual (RegistryManualId)
year (int)
part (ManualPart)
kind (str | None)
- manual: RegistryManualId¶
- year: int¶
- part: ManualPart¶
- kind: str | None¶
- class RegistryManualVerifyCommand(**data)[source]¶
Bases:
BaseModelApplication command for verifying one registry manual part.
- Parameters:
manual (RegistryManualId)
year (int)
part (ManualPart)
- manual: RegistryManualId¶
- year: int¶
- part: ManualPart¶
- class RegistryManualsListReport(**data)[source]¶
Bases:
BaseModelTyped report for registry manual listing.
Carries discovered
RegistryManualPartProjectionrows plus topic projections shared with the citation surfaces.- Parameters:
operation (str)
manual_filter (str | None)
year_filter (int | None)
part_count (int)
parts (tuple[RegistryManualPartProjection, ...])
topic_count (int)
topics (tuple[RegistryTopicProjection, ...])
- operation: str¶
- manual_filter: str | None¶
- year_filter: int | None¶
- part_count: int¶
- parts: tuple[RegistryManualPartProjection, ...]¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- class RegistryManualSectionProjection(**data)[source]¶
Bases:
BaseModelOne extracted manual section projection.
- section_id: str¶
- title: str¶
- rule_count: int¶
- paragraph_count: int¶
- class RegistryManualShowReport(**data)[source]¶
Bases:
BaseModelTyped report for one manual lookup.
When extracted structure is absent, manifest metadata still populates the report with
structure_available=Falseand zero section/chapter counts.- Parameters:
- operation: str¶
- manual_id: str¶
- year: int¶
- part: str¶
- title: str | None¶
- source_pdf_url: str¶
- chapter_count: int¶
- section_count: int¶
- structure_available: bool¶
- section: RegistryManualSectionProjection | None¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- class RegistryManualRuleProjection(**data)[source]¶
Bases:
BaseModelOne manual rule projection.
references_casillaspreserves typedManualCasillaReferencevalues so verification can cross-check the rule againstValidatedRegistryAuthority.- Parameters:
rule_id (str)
kind (str)
section_id (str)
references_casillas (tuple[ManualCasillaReference, ...])
- rule_id: str¶
- kind: str¶
- section_id: str¶
- references_casillas: tuple[ManualCasillaReference, ...]¶
- class RegistryManualRulesReport(**data)[source]¶
Bases:
BaseModelTyped report for manual rule listing.
Projects manual rules into
RegistryManualRuleProjectionrows while preserving typedManualCasillaReferencereferences for registry cross-checking.- Parameters:
- operation: str¶
- manual_id: str¶
- year: int¶
- part: str¶
- kind_filter: str | None¶
- structure_available: bool¶
- rule_count: int¶
- rules: tuple[RegistryManualRuleProjection, ...]¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- class RegistryManualVerificationReport(**data)[source]¶
Bases:
BaseModelTyped report for manual corpus verification.
Summarizes a
ManualVerificationReportas normalizedRegistryCorpusIssueProjectionrows for the application surface.- Parameters:
- operation: str¶
- manual_id: str¶
- year: int¶
- part: str¶
- issue_count: int¶
- error_count: int¶
- warning_count: int¶
- passed: bool¶
- issues: tuple[RegistryCorpusIssueProjection, ...]¶
- topic_count: int¶
- topics: tuple[RegistryTopicProjection, ...]¶
- list_registry_citations(command=None, *, topic_catalogue=None, locale=None)[source]¶
Return topic-backed citation references from the reviewed legal catalogue.
Returns a
RegistryCitationsListReport.- Return type:
- Parameters:
command (RegistryCitationsListCommand | None)
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- show_registry_citation(command, *, topic_catalogue=None, locale=None)[source]¶
Return one topic-backed citation reference from the reviewed legal catalogue.
Returns a
RegistryCitationShowReportwith the matched legal document and optional article detail.- Return type:
- Parameters:
command (RegistryCitationShowCommand)
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- verify_registry_citations(*, topic_catalogue=None, locale=None)[source]¶
Verify the reviewed legal catalogue and return a
RegistryCitationsVerificationReport.- Return type:
- Parameters:
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- list_registry_manuals(command=None, *, settings=None, topic_catalogue=None, locale=None)[source]¶
Return discovered local manual parts as a
RegistryManualsListReport.- Return type:
- Parameters:
command (RegistryManualsListCommand | None)
settings (Settings | None)
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- show_registry_manual(command, *, settings=None, topic_catalogue=None, locale=None)[source]¶
Return one local manual part as a
RegistryManualShowReport.- Return type:
- Parameters:
command (RegistryManualShowCommand)
settings (Settings | None)
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- list_registry_manual_rules(command, *, settings=None, topic_catalogue=None, locale=None)[source]¶
Return manual rules as a typed application report.
Returns a
RegistryManualRulesReportwith the matched rules and whether the manual structure was available for lookup.- Return type:
- Parameters:
command (RegistryManualRulesCommand)
settings (Settings | None)
topic_catalogue (TopicCatalogue | None)
locale (str | None)
- verify_registry_manual(command, *, settings=None, registry_authority=None, topic_catalogue=None, locale=None)[source]¶
Verify one local manual part and return a typed application report.
- Parameters:
command (
RegistryManualVerifyCommand) – Manual verification command to execute.settings (
Settings|None) – Optional application settings override.registry_authority (
ValidatedRegistryAuthority|None) – OptionalValidatedRegistryAuthorityused to validate manual casilla references against registry snapshots.topic_catalogue (
TopicCatalogue|None) – Optional topic catalogue used to attach topic projections.locale (
str|None) – Optional output locale for topic projection text.
- Return type:
Returns a
RegistryManualVerificationReportwith verification findings for the requested manual part.
- registry_manual_id(value)[source]¶
Resolve an operator-facing registry manual id.
Returns a
RegistryManualId.- Return type:
- Parameters:
value (str | RegistryManualId | ManualId)