cadrumo.domain.calculations.registry.static_inspection module¶
Typed non-filing projection of one registry revision.
Static generators inspect a reviewed source design against the declarations of
one named revision. That work must not manufacture a filing context or obtain
a RegistrySnapshot: a snapshot is the later, filing-instance
authority. This model deliberately exposes only the immutable facts a static
consumer may admit.
- class GeneratedArtifactSource(*args, **kwargs)[source]¶
Bases:
ProtocolThe byte-authority fields a generated-artifact verifier consumes.
- property id: SourceRefId¶
Return the source-reference identity.
- property kind: RegistrySourceKind¶
Return the source kind.
- property corpus_tier: _coerce, json_schema_input_type=PydanticUndefined)] | None¶
Return the corpus authority tier, when declared.
- class StaticGeneratedArtifactSource(id, kind, corpus_path, sha256, bytes, applies_from, applies_to, record_design_epoch, corpus_tier)[source]¶
Bases:
objectImmutable byte-authority facts copied for diagnostic verification.
- Parameters:
id (SourceRefId)
kind (RegistrySourceKind)
corpus_path (str)
sha256 (str)
bytes (int)
applies_from (date | None)
applies_to (date | None)
record_design_epoch (str | None)
corpus_tier (Annotated[CorpusTier, BeforeValidator(func=~cadrumo.domain.calculations.registry.schema_base.coerce_enum_member.<locals>._coerce, json_schema_input_type=PydanticUndefined)] | None)
-
id:
TypeAliasType¶
-
kind:
RegistrySourceKind¶
-
corpus_tier:
Optional[Annotated[CorpusTier]]¶
- applies_across(span_from, span_to)[source]¶
Report whether this copied window overlaps one date span.
Delegates to the same rule the live
SourceReferenceuses, so a diagnostic copy can never answer the applicability question differently from the source it was copied from. Without this method the generated provenance verifier raised on every probe, because it asks a copied source the question it asks a live one.
- classmethod from_source(source)[source]¶
Copy the exact source fields used by generated-artifact verification.
- Return type:
- Parameters:
source (SourceReference)
- class StaticGeneratedArtifactInspection(modelo_id, revision_id, revision_source_refs, sources, legal_ref_ids, casilla_ids, binding_ids, projection_endpoints)[source]¶
Bases:
objectMinimal immutable revision facts for diagnostic generated-artifact checks.
- Parameters:
modelo_id (ModeloId)
revision_id (RevisionId)
revision_source_refs (tuple[SourceRefId, ...])
sources (Mapping[SourceRefId, StaticGeneratedArtifactSource])
legal_ref_ids (frozenset[LegalRefId])
binding_ids (frozenset[BindingId])
projection_endpoints (tuple[ProjectionEndpointDeclaration, ...])
-
modelo_id:
TypeAliasType¶
-
revision_id:
TypeAliasType¶
-
sources:
Mapping[TypeAliasType,StaticGeneratedArtifactSource]¶
-
projection_endpoints:
tuple[ProjectionEndpointDeclaration,...]¶
- class RegistryRevisionInspection(**data)[source]¶
Bases:
RegistryModelThe static admission facts for one explicit registry revision.
It intentionally carries neither a filing year nor a period. A caller must select
revision_idexplicitly, then use the retained source, casilla, binding, projection, and legal identifiers to validate generated static artefacts. It cannot calculate, render, or file anything.- modelo_id: ModeloId¶
- revision_id: RevisionId¶
- review_status: RevisionReviewStatus¶
The revision’s own governance stamp – not filing-grade content, so it stays in scope for a static inspection whose job is validating generated static artefacts against a revision it may or may not trust yet.
- family_dispositions: Annotated[Mapping[str, SchemaFamilyDispositionDeclaration], FROZEN_MAPPING]¶
The revision’s declared not-applicable schema families and their grounding reason/legal_refs/source_refs – classification metadata, not filing-grade content, so it stays in scope for a static inspection.
- source_root: Path | None¶
Development source root when the inspection was built by the compiler.
Published inspections intentionally carry no corpus root; runtime source consumers must request an explicit signed projection instead.
- revision_source_refs: tuple[SourceRefId, ...]¶
- sources: Annotated[Mapping[SourceRefId, SourceReference], FROZEN_MAPPING]¶
The exact source catalogue slice exercised by this model/revision.
- source_ref_ids: frozenset[SourceRefId]¶
- legal_ref_ids: frozenset[LegalRefId]¶
The exact legal-reference union exercised by this model/revision.
- casilla_ids: frozenset[CasillaId]¶
- casilla_sections: Annotated[Mapping[CasillaId, tuple[str, ...]], FROZEN_MAPPING]¶
- casilla_localization_keys: Annotated[Mapping[CasillaId, tuple[str, ...]], FROZEN_MAPPING]¶
Each casilla’s ordered label key chain, as the loaded revision enrolled it.
A label is resolved through this chain, never through one derived key, so an inherited or lineage-keyed casilla reads the text its catalogue home holds.
- binding_ids: frozenset[BindingId]¶
- projection_endpoints: tuple[ProjectionEndpointDeclaration, ...]¶
- formulas: tuple[FormulaDefinition, ...]¶
- parameters: tuple[ParameterDefinition, ...]¶
- bindings: tuple[BindingDefinition, ...]¶
- workbook_parity_refs: tuple[WorkbookParityReference, ...]¶
- live_cross_references: tuple[LiveCrossReferenceDecision, ...]¶
- classmethod from_revision(*, modelo, revision, source_root, sources, legal_ref_ids)[source]¶
Project one loaded revision without creating a filing snapshot.
Core types:
ModeloDefinition,ModeloRevision.- Return type:
- Parameters:
modelo (ModeloDefinition)
revision (ModeloRevision)
source_root (Path | None)
sources (Mapping[SourceRefId, SourceReference])
legal_ref_ids (frozenset[LegalRefId])