cadrumo.domain.calculations.registry.source_byte_availability module¶
Which catalogued official sources carry their bytes inside a published authority.
A published authority embeds the bytes of a source reference only when a runtime workflow interprets those bytes: the XML dictionary that maps casillas to element paths, and the XSD that fixes the declared schema version. Every other source kind - record designs, form specifications, instructions, manuals, suppression notices - is a citation. Its identifier, kind, digest and byte count travel in the catalogue and into every observation, review row and explanation that cites it, but its bytes are not part of the generation, because the fixed-width layout already carries the compiled offsets, widths and order the design fixes.
The publisher selects the embedded set from this module, the artifact closure check requires exactly that set, and runtime readers request bytes only for the references this module declares embedded. A reader therefore never asks for a payload the generation cannot hold, and a genuinely required dictionary or XSD payload that is missing still refuses at the fetch.
- EMBEDDED_SOURCE_KINDS: Final[frozenset[RegistrySourceKind]]¶
Source kinds whose bytes a published authority generation embeds.
- source_bytes_are_embedded(source)[source]¶
Report whether a published generation embeds the bytes of
source.- Return type:
- Parameters:
source (SourceReference)
- embedded_source_ids(sources)[source]¶
Return the identifiers in
sourceswhose bytes a generation embeds.- Return type:
- Parameters:
sources (Mapping[str, SourceReference])
- layout_embedded_source_ids(layouts, *, sources)[source]¶
Return the embedded source identifiers a set of export layouts may read.
Every layout source reference must resolve in
sources; an unresolved reference is a registry defect, not a citation to skip. An XML dictionary layout must name a dictionary source whose kind is embedded, because its parser cannot run without those bytes.- Raises:
RegistryValidationError – A layout cites a source absent from
sources, or an XML dictionary layout’s dictionary source is missing or is not an embedded kind.- Return type:
- Parameters:
layouts (Iterable[ExportLayoutDefinition])
sources (Mapping[str, SourceReference])