aeat.application.registry package

Application services for read-only registry workflows.

Registry query and corpus validation services consume a domain.calculations.registry.ValidatedRegistryAuthority as the single entry point for domain.calculations.registry.ModeloDefinition instances, domain.calculations.registry.RegistrySnapshot values, and deadline windows.

The package exposes three local read surfaces: registry-tree inspection and verification over the bundled registry/aeat tree, corpus/manual projection over RegistryTopicProjection and related report records, and filed-state comparison that loads captured AEAT observations before recomputing a registry snapshot locally.

The observation-persistence path reads captured filed state through the active-bucket encrypted observation store.

See also

domain.calculations.registry.ValidatedRegistryAuthority

Domain authority used to load, validate, and snapshot modelo registry definitions.

RegistryTreeReport

Application report returned by registry-tree inspection and verification.

RegistryCitationsListReport

Citation projection over reviewed registry legal references and topics.

RegistryManualVerificationReport

Manual/casilla verification report for bundled manual corpus checks.

domain.manuals

Strict manual schema and loader surface that owns extracted manual records and domain.manuals.ManualCasillaReference values.

core.resources

Bundled-data boundary used to locate packaged registry and corpus material without repository-relative path reads.

FiledStateVerificationReport

Filed-state comparison report built from encrypted captured AEAT observations and local registry recalculation.

adapters.outbound.aeat.sede.FiledDeclaracionObservationStore

Active-bucket observation store that persists captured filed state for local registry comparison.

application.modelo._registry_discovery

Modelo work-unit discovery facade for CLI-facing registry queries.

class RegistryTreeReport(**data)[source]

Bases: BaseModel

Read-only registry tree load or verification result.

Parameters:

data (Any)

registry_root: str
source_root: str | None
modelo_count: int
revision_count: int
legal_reference_count: int
source_reference_count: int
casilla_count: int
formula_count: int
extraction_profile_count: int
cross_reference_count: int
workbook_parity_ref_count: int
verification_expectation_count: int
relation_count: int
relation_dependency_roles: tuple[str, ...]
filing_schedule_count: int
modelos: tuple[str, ...]
revision_details: tuple[RegistryRevisionDetailReport, ...]
verified: bool
class RegistryWorkbookParityDetailReport(**data)[source]

Bases: BaseModel

Workbook parity coverage declared by one registry revision.

Parameters:
  • id (WorkbookParityRefId)

  • workbook_source (SourceRefId)

  • formula_coverage (str)

  • runner_required (bool)

  • output_cell_count (int)

id: _WorkbookParityRefId
workbook_source: _SourceRefId
formula_coverage: str
runner_required: bool
output_cell_count: int
class RegistryRevisionDetailReport(**data)[source]

Bases: BaseModel

Read-only details for one modelo revision from the central registry.

Parameters:
  • modelo (str)

  • revision (str)

  • legal_refs (tuple[LegalRefId, ...])

  • source_refs (tuple[SourceRefId, ...])

  • export_layout_ids (tuple[ExportLayoutId, ...])

  • export_layout_count (int)

  • export_record_count (int)

  • export_field_count (int)

  • deadline_window_count (int)

  • deadline_periods (tuple[str, ...])

  • relation_ids (tuple[RelationId, ...])

  • relation_count (int)

  • relation_dependency_roles (tuple[str, ...])

  • filing_schedule_ids (tuple[str, ...])

  • filing_schedule_count (int)

  • portal_guard_policy_ids (tuple[str, ...])

  • workbook_parity (tuple[RegistryWorkbookParityDetailReport, ...])

  • support_removal_decision_count (int)

modelo: str
revision: str
legal_refs: tuple[_LegalRefId, ...]
source_refs: tuple[_SourceRefId, ...]
export_layout_ids: tuple[_ExportLayoutId, ...]
export_layout_count: int
export_record_count: int
export_field_count: int
deadline_window_count: int
deadline_periods: tuple[str, ...]
relation_ids: tuple[_RelationId, ...]
relation_count: int
relation_dependency_roles: tuple[str, ...]
filing_schedule_ids: tuple[str, ...]
filing_schedule_count: int
portal_guard_policy_ids: tuple[str, ...]
workbook_parity: tuple[RegistryWorkbookParityDetailReport, ...]
support_removal_decision_count: int
class FiledStateVerificationReport(**data)[source]

Bases: BaseModel

Local registry calculation versus filed AEAT state verification report.

Parameters:
observation_path: str
source_observation_paths: tuple[str, ...]
comparison: _RegistryFiledStateComparison
class RegistryOracleAuditReport(**data)[source]

Bases: BaseModel

Live-parity oracle binding audit report.

Parameters:
environment: str
registered_oracle_ids: tuple[str, ...]
failure_count: int
failures: tuple[str, ...]
applicability_declarations: tuple[_CrossReferenceApplicabilityDeclaracion, ...]
orphan_oracle_ids: tuple[str, ...]
class RegistryRevisionInventory(casilla_count, formula_count, extraction_profile_count, cross_reference_count, workbook_parity_ref_count, verification_expectation_count, application_link_count, application_link_surfaces, relation_count, relation_dependency_roles, filing_schedule_count)[source]

Bases: NamedTuple

Parameters:
  • casilla_count (int)

  • formula_count (int)

  • extraction_profile_count (int)

  • cross_reference_count (int)

  • workbook_parity_ref_count (int)

  • verification_expectation_count (int)

  • application_link_count (int)

  • application_link_surfaces (tuple[str, ...])

  • relation_count (int)

  • relation_dependency_roles (tuple[str, ...])

  • filing_schedule_count (int)

casilla_count: int

Alias for field number 0

formula_count: int

Alias for field number 1

extraction_profile_count: int

Alias for field number 2

cross_reference_count: int

Alias for field number 3

workbook_parity_ref_count: int

Alias for field number 4

verification_expectation_count: int

Alias for field number 5

Alias for field number 6

Alias for field number 7

relation_count: int

Alias for field number 8

relation_dependency_roles: tuple[str, ...]

Alias for field number 9

filing_schedule_count: int

Alias for field number 10

inspect_registry_tree(registry_root)[source]

Load the registry tree and return a RegistryTreeReport with stable read-only inventory counts.

Return type:

RegistryTreeReport

Parameters:

registry_root (Path)

verify_registry_tree(registry_root, *, source_root)[source]

Load and fail-fast validate every registry modelo against shared catalogues.

Returns a RegistryTreeReport.

Runs a full audit including required_text corpus checks on every legal reference.

Return type:

RegistryTreeReport

Parameters:
  • registry_root (Path)

  • source_root (Path)

absent_corpus_companion_binaries(registry_root, *, source_root)[source]

Return the loud advisory for corpus source binaries absent from tree and companion.

Loads the shared source catalogue for registry_root and resolves every cited corpus binary against source_root and the optional aeat_data companion. An empty tuple means every declared binary is present and byte-integrity verifiable; a non-empty tuple is the loud advisory the split-install path surfaces, naming the missing set and the aeat-cli[corpus-sources] install hint. The aeat app registry verification verbs consult this to refuse instructively when the companion is required and absent.

Return type:

tuple[str, ...]

Parameters:
  • registry_root (Path)

  • source_root (Path)

audit_registry_oracles(registry_root, *, environment)[source]

Audit registered live-parity oracles against every registry cross-reference.

Returns a RegistryOracleAuditReport.

Return type:

RegistryOracleAuditReport

Parameters:
  • registry_root (Path)

  • environment (str)

verify_filed_state(*, observation_path, source_observation_paths=(), registry_root=None, source_root=None, required_casilla_ids=())[source]

Compare a local registry calculation to a captured filed observation.

Returns a FiledStateVerificationReport with the per-casilla comparison results between the registry calculation and the filed values.

Return type:

FiledStateVerificationReport

Parameters:
  • observation_path (Path)

  • source_observation_paths (tuple[Path, ...])

  • registry_root (Path | None)

  • source_root (Path | None)

  • required_casilla_ids (tuple[CasillaId, ...])

verify_registry_workbooks(*, root, limit=None, per_file_timeout_seconds=10.0, resume_from=None, output=None)[source]

Run workbook backend verification and optionally persist the JSON report.

Return type:

WorkbookBackendVerificationReport

Parameters:
  • root (Path)

  • limit (int | None)

  • per_file_timeout_seconds (float)

  • resume_from (Path | None)

  • output (Path | None)

run_registry_parity(*, scenario_path, registry_root, source_root, store_root, output=None)[source]

Run one stored parity scenario and archive the resulting tape.

Parameters:
  • scenario_path (Path)

  • registry_root (Path)

  • source_root (Path)

  • store_root (Path)

  • output (Path | None)

replay_registry_parity(*, tape_path, registry_root, source_root)[source]

Replay one archived parity tape against the current registry runtime.

Parameters:

Submodules