cadrumo.application.storage.calc_sheets.row_set_assembly module

Validate worksheet row-set ingress before delegating typed assembly.

The calculation application owns conversion of one declared row-set into typed observations. This module owns the preceding workbook boundary: an inbound row-set may only address columns declared by the authoritative snapshot, and two submitted row-set blocks must never silently claim the same logical row. It deliberately delegates the actual conversion to the existing snapshot-bound application command rather than growing a second assembler or a source-mesh resolver.

assemble_row_sets_for_snapshot(row_sets, snapshot)[source]

Validate and assemble worksheet row sets against snapshot.

The accepted grouping-to-binding coordinates come from the same collect_row_sets projection that produced the workbook. A cell cannot be repurposed by placing a binding from another grouping beneath a chosen header, and a second input block cannot overwrite part of an already-owned row. After those ingress checks, the existing observation assembler remains the one authority for typed row validation and observation construction.

Returns the existing assembled-observation union once for each supplied row-set block. No source resolution, persisted identity, or provenance is constructed here; later source-specific rows own those concerns.

Core types: RegistrySnapshot.

Return type:

tuple[tuple[str, tuple[WithholdingObservation, ...]] | tuple[str, tuple[RelatedPartyOperationObservation, ...]] | tuple[str, tuple[Modelo720RowObservation, ...]] | tuple[str, tuple[AtributionMemberObservation, ...]] | tuple[str, tuple[RefundOperationObservation, ...]] | tuple[str, tuple[DonativoDonorObservation, ...]] | tuple[str, tuple[Gasto193Observation, ...]] | tuple[str, tuple[Withholding296Observation, ...]], ...]

Parameters: