cadrumo.application.modelo.edit_models module¶
Strict, frontend-neutral records for the Modelo Edit Contract V1.
Behind cadrumo.application.modelo, this family owns edit admission and
parsing, authoritative preflight, an exact compare-and-swap mutation
baseline, typed scalar and repeatable-row intents, and the safe result receipt
for a guarded calculation edit. It
never owns TUI state, operation lifecycle or custody, registry meaning,
calculation formulas, or persistence adapters – see
ModeloRevision for the
registry-owned schema these edits address.
A ModeloWorkspaceBaselineV1 read-consistency token is never accepted
as mutation authority; admission independently re-resolves every coordinate
this family authorizes against.
- class ModeloEditScalarIntentKind(*values)[source]¶
Bases:
StrEnumThe two distinct scalar edit intents; address absence means UNCHANGED.
REMOVE_OVERRIDEis deliberately NOT a member: it addresses theCalculationRevision.binding_overridesstore, which is keyed byBindingId, neverCasillaId– no casilla-addressed scalar intent can reach it. SeeModeloEditBindingIntentKind.- SET_TYPED_VALUE¶
- CLEAR_DECLARED_VALUE¶
- class ModeloEditRowIntentKind(*values)[source]¶
Bases:
StrEnumThe closed repeatable-row edit intents; MOVE_ROW requires reorderable groups.
- ADD_ROW¶
- UPDATE_ROW¶
- DELETE_ROW¶
- MOVE_ROW¶
- class ModeloEditDetailRowIntentKind(*values)[source]¶
Bases:
StrEnumThe closed
ModeloDetailRowedit intents, addressed by natural key.MOVE_ROWis deliberately NOT a member. A row’s physical record occurrence number in the exported fichero is NOT a function of caller-supplied order at all: every row-producer resolver indomain.calculations.registry.detail_record_bindings(resolve_atribucion_binding_row_values,_build_related_party_rows,_build_foreign_asset_rows, and their siblings) sorts its rows by a content key –(country_code, tax_id)or equivalent – BEFOREenumerate(..., 1)assigns row indices, so two calls supplying the same rows in different orders render byte-identical ficheros (each builder’s sort is proven incadrumo.domain.calculations.registry.tests.test_detail_record_row_builders). The AEAT diseno de registro for these record families identifies each repeated record by its declared content (member/counterparty NIF, asset identifier, clave/subclave) rather than by a required sequence – there is no “declared order” for AEAT to read or for a reorder to change. Consistently, the calculation revision’s content address is also order-BLIND (_canonical_detail_rowssorts by(row_type, nif-like)specifically so “operators can supply rows in any order”). A pure reorder therefore computes the SAME revision id AND renders the SAME fichero bytes as the existing revision, so the guarded compare-and-swap persistence layer’s duplicate-result branch would silently absorb it and return the existing revision – the requested reorder would never actually persist, and even if it did nothing observable would change. Building MOVE_ROW against the current content-address shape would ship a control with no addressable effect.- ADD_ROW¶
- UPDATE_ROW¶
- DELETE_ROW¶
- class ModeloEditBindingIntentKind(*values)[source]¶
Bases:
StrEnumThe two distinct binding-override edit intents; address absence means UNCHANGED.
Mirrors
SET_TYPED_VALUE/CLEAR_DECLARED_VALUEin shape, but these apply to theBindingId-keyedbinding_overridesstore rather than a casilla’s declared value – the operator-facing--binding KEY=VALUECLI override and its withdrawal.- SET_OVERRIDE_VALUE¶
- REMOVE_OVERRIDE¶
- class ModeloEditNonWritableReason(*values)[source]¶
Bases:
StrEnumWhy one permitted-surface address is not writable in this baseline.
- COMPUTED_BY_FORMULA¶
- SCHEMA_DECLARED_READ_ONLY¶
- CAPABILITY_UNAVAILABLE¶
- class ModeloEditFindingSeverity(*values)[source]¶
Bases:
StrEnumThe closed severity denominator for one preflight finding.
- ERROR¶
- WARNING¶
- INFO¶
- class ModeloEditRefusalCode(*values)[source]¶
Bases:
StrEnumThe closed refusal-boundary denominator for the edit contract.
STALE_EDIT_BASELINEnever appears onModeloEditDomainRefusalV1; it is carried only by the structuredModeloEditStaleBaselineRefusalV1, the same splitModeloWorkspaceDomainRefusalV1draws for its own two-axis mismatch.- TARGET_ABSENT¶
- TARGET_AMBIGUOUS¶
- ADMISSION_DENIED¶
- UNSUPPORTED_SCHEMA_KIND¶
- DISALLOWED_INTENT¶
- PARSE_FAILED¶
- VALIDATION_FAILED¶
- CAPABILITY_UNAVAILABLE¶
- WORK_CATALOGUE_CONFLICT¶
- CALCULATION_HEAD_CONFLICT¶
- REGISTRY_SCHEMA_CONFLICT¶
- SURFACE_CONFLICT¶
- BASELINE_EXPIRED¶
- STALE_EDIT_BASELINE¶
- class ModeloEditScalarAddressV1(**data)[source]¶
Bases:
EditModelA canonical semantic scalar address, keyed by the registry casilla identity.
- kind: Literal['scalar']¶
- casilla_id: CasillaId¶
- class ModeloEditBindingAddressV1(**data)[source]¶
Bases:
EditModelA canonical binding-override address, keyed by the registry binding identity.
Distinct from
ModeloEditScalarAddressV1: a binding override addressesCalculationRevision.binding_overrides, which is keyed byBindingId, neverCasillaId– most overridable bindings (a fichero-BOE record-fieldmanual_inputbinding, most notably) have no casilla at all to address through.- Parameters:
kind (Literal['binding'])
binding_id (BindingId)
- kind: Literal['binding']¶
- binding_id: BindingId¶
- class ModeloEditExistingRowAddressV1(**data)[source]¶
Bases:
EditModelThe application-issued canonical coordinate of one persisted repeated row.
- Parameters:
- kind: Literal['existing_row']¶
- binding_id: BindingId¶
- row_index: Annotated[int, Field(ge=1)]¶
- class ModeloEditNewRowCorrelationV1(**data)[source]¶
Bases:
EditModelAn opaque client correlation for a row not yet assigned persistence identity.
Carries no persistence meaning; the canonical row coordinate is minted by the result and mapped back to this correlation. Positional widget indexes are never identity.
- Parameters:
kind (Literal['new_row'])
binding_id (BindingId)
client_correlation_id (_ClientRowCorrelationId)
- kind: Literal['new_row']¶
- binding_id: BindingId¶
- client_correlation_id: _ClientRowCorrelationId¶
- class ModeloEditDetailRowAddressV1(**data)[source]¶
Bases:
EditModelThe natural-key address of one
ModeloDetailRow, never position or a minted id.detail_row_kindis the discriminatedModeloDetailRow.row_typevalue (e.g."miembro","contraparte").natural_keyis the row’s own already-declared identity field, joined with|for a compound key (M349 operador/rectificación key onnif_comunitario|clave_operacion, since one counterparty can carry more than one operation type) – never a minted or positional identity. This mirrors the codebase’s established whole-set-replacement convention for repeating declared rows (RetencionObservationRepository.replace_observations): rows are addressed by the business key they already carry, and an absent key is sufficient to express removal with no separate “explicitly deleted” axis, because a row (unlike a scalar) has no ambiguous middle state between “declared” and “absent”.- Parameters:
- kind: Literal['detail_row']¶
- detail_row_kind: _BoundedCode¶
- natural_key: Annotated[str, Field(min_length=1, max_length=256)]¶
- class ModeloEditWritableScalarSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne scalar address the baseline admits for writing, with its allowed intents.
- Parameters:
kind (Literal['writable_scalar'])
casilla_id (CasillaId)
data_type (Literal[CasillaDataType.DECIMAL, CasillaDataType.MONEY, CasillaDataType.INTEGER, CasillaDataType.RATIO, CasillaDataType.TEXT, CasillaDataType.BOOLEAN, CasillaDataType.NIF, CasillaDataType.YEAR, CasillaDataType.PERIOD_CODE, CasillaDataType.COUNTRY_CODE, CasillaDataType.IBAN, CasillaDataType.NAME, CasillaDataType.NIF_IVA, CasillaDataType.CCAA_CODE, CasillaDataType.PROVINCE_CODE, CasillaDataType.POSTAL_CODE, CasillaDataType.MUNICIPALITY_CODE, CasillaDataType.BIC, CasillaDataType.DATE])
allowed_intents (Annotated[tuple[ModeloEditScalarIntentKind, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=3)])])
- kind: Literal['writable_scalar']¶
- casilla_id: CasillaId¶
- data_type: CasillaDataTypeValue¶
- allowed_intents: Annotated[tuple[ModeloEditScalarIntentKind, ...], Field(min_length=1, max_length=3)]¶
- class ModeloEditNonWritableScalarSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne scalar address the baseline exposes as read-only, with its reason.
- Parameters:
kind (Literal['non_writable_scalar'])
casilla_id (CasillaId)
reason (ModeloEditNonWritableReason)
- kind: Literal['non_writable_scalar']¶
- casilla_id: CasillaId¶
- reason: ModeloEditNonWritableReason¶
- class ModeloEditWritableRowGroupSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne repeated-row group the baseline admits for writing.
- Parameters:
kind (Literal['writable_row_group'])
binding_id (BindingId)
allowed_intents (Annotated[tuple[ModeloEditRowIntentKind, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=4)])])
reorderable (bool)
max_rows (Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1)])] | None)
- kind: Literal['writable_row_group']¶
- binding_id: BindingId¶
- allowed_intents: Annotated[tuple[ModeloEditRowIntentKind, ...], Field(min_length=1, max_length=4)]¶
- reorderable: bool¶
- max_rows: Annotated[int, Field(ge=1)] | None¶
- class ModeloEditNonWritableRowGroupSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne repeated-row group the baseline exposes as read-only, with its reason.
- Parameters:
kind (Literal['non_writable_row_group'])
binding_id (BindingId)
reason (ModeloEditNonWritableReason)
- kind: Literal['non_writable_row_group']¶
- binding_id: BindingId¶
- reason: ModeloEditNonWritableReason¶
- class ModeloEditWritableBindingOverrideSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne binding the baseline admits the operator-facing
--bindingoverride for.Distinct from a scalar or row-group entry: it addresses
CalculationRevision.binding_overrides(BindingId-keyed), never a casilla, because most eligible bindings – a fichero-BOE record-fieldmanual_inputbinding, most notably – have no casilla to address through at all.- Parameters:
kind (Literal['writable_binding_override'])
binding_id (BindingId)
allowed_intents (Annotated[tuple[ModeloEditBindingIntentKind, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=2)])])
- kind: Literal['writable_binding_override']¶
- binding_id: BindingId¶
- allowed_intents: Annotated[tuple[ModeloEditBindingIntentKind, ...], Field(min_length=1, max_length=2)]¶
- class ModeloEditNonWritableBindingOverrideSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne binding the baseline exposes as override-locked, with its reason.
- Parameters:
kind (Literal['non_writable_binding_override'])
binding_id (BindingId)
reason (ModeloEditNonWritableReason)
- kind: Literal['non_writable_binding_override']¶
- binding_id: BindingId¶
- reason: ModeloEditNonWritableReason¶
- class ModeloEditWritableDetailRowSurfaceEntryV1(**data)[source]¶
Bases:
EditModelOne
ModeloDetailRowkind the baseline admits for writing, natural-key addressed.Distinct from the (permanently empty)
BindingId-keyed row-group axis: this addresses the genuine repeatable, taxpayer-typedModeloDetailRowmechanism, admitted per the same real, enforced per-modelo eligibility table thatrequire_detail_rows_declared_for_their_owning_modelo()refuses a mismatched row against.- Parameters:
kind (Literal['writable_detail_row'])
detail_row_kind (_BoundedCode)
allowed_intents (Annotated[tuple[ModeloEditDetailRowIntentKind, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=3)])])
- kind: Literal['writable_detail_row']¶
- detail_row_kind: _BoundedCode¶
- allowed_intents: Annotated[tuple[ModeloEditDetailRowIntentKind, ...], Field(min_length=1, max_length=3)]¶
- class ModeloEditSchemaIdentityV1(**data)[source]¶
Bases:
EditModelThe edit contract’s own schema identity: a compare-and-swap coordinate, not a display fact.
Deliberately its own type rather than a reuse of
ModeloWorkspaceSchemaIdentityV1– the two types share a shape (an id, a fingerprint, and a manifest digest) but not a meaning.completeness_manifest_digestdigests the registry’sCalculationCompletenessManifest(the required calculation-closure casilla set: a TAX-SEMANTIC completeness declaration), so a compare-and-swap re-check catches the registry’s declared completeness rules changing between admission and commit. The Workspace type’sfield_manifest_digestdigests a structurally unrelated concept – the field-CLASSIFICATION manifest, a deterministic walk over the public registry TYPE denominator for display rendering. Reusing one field name for both silently made two genuinely different values compare unequal under one name; see the edit-contract ADR amendment this type was added by.- Parameters:
schema_id (_BoundedCode)
schema_fingerprint (ContentDigest)
completeness_manifest_digest (ContentDigest)
- schema_id: _BoundedCode¶
- schema_fingerprint: ContentDigest¶
- completeness_manifest_digest: ContentDigest¶
- class ModeloEditBaselineV1(**data)[source]¶
Bases:
EditModelOne admitted, independently re-resolved compare-and-swap edit coordinate.
Contains only safe coordinates and no values. It is a compare-and-swap coordinate, not actor authorization or proof that the operation remains available.
NEVER COMPARED BY RECORD EQUALITY. This carries its own admission identity and lifetime –
issued_at,expires_atandbaseline_id– so two admissions of an UNCHANGED tree are never equal, and==between two of these can only ever report “different”. Staleness is asked ofreconfirm_modelo_edit_baseline(), which judges the coordinate axes the guarded commit point judges.The distinction matters because
ModeloWorkspaceBaselineV1shares the name and has the OPPOSITE contract: it is content-derived, carries no timestamp, and is compared by equality on purpose. An editor session once carried that pattern here, and its stale signal was permanently on – worse than absent, because a warning that always fires teaches the operator to dismiss it.- Parameters:
edit_contract_version (Literal[1])
compatibility (ModeloEditCompatibilityTupleV1)
bucket_id (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=128, pattern=None, ascii_only=None)])
modelo (ModeloCode)
filing_year (Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=2000), Le(le=2099)])])
period (Period)
work_unit_id (WorkUnitId)
work_catalogue_revision (ContentDigest)
calculation_catalogue_revision (ContentDigest)
current_calculation_revision_id (CalculationRevisionId | None)
law_selected_revision_id (RevisionId)
schema_identity (ModeloEditSchemaIdentityV1)
schema_version (Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1)])])
permitted_surface (Annotated[tuple[ModeloEditPermittedSurfaceEntryV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=2000)])])
permitted_surface_digest (ContentDigest)
mutation_family (ModeloEditMutationFamily)
issued_at (datetime)
expires_at (datetime)
baseline_id (ModeloEditBaselineId)
- edit_contract_version: Literal[1]¶
- compatibility: _ModeloEditCompatibilityTupleV1¶
- bucket_id: BucketId¶
- modelo: ModeloCode¶
- filing_year: FilingYear¶
- period: Period¶
- work_unit_id: WorkUnitId¶
- work_catalogue_revision: ContentDigest¶
- calculation_catalogue_revision: ContentDigest¶
- current_calculation_revision_id: CalculationRevisionId | None¶
- law_selected_revision_id: RevisionId¶
- schema_identity: ModeloEditSchemaIdentityV1¶
- schema_version: Annotated[int, Field(ge=1)]¶
- permitted_surface: Annotated[tuple[ModeloEditPermittedSurfaceEntryV1, ...], Field(max_length=_MAX_SURFACE_ENTRIES)]¶
- permitted_surface_digest: ContentDigest¶
- mutation_family: _ModeloEditMutationFamily¶
- issued_at: datetime¶
- expires_at: datetime¶
- baseline_id: ModeloEditBaselineId¶
- class ModeloEditAdmittedV1(**data)[source]¶
Bases:
EditModelA successful admission carrying the exact re-resolved baseline.
- Parameters:
outcome (Literal['admitted'])
baseline (ModeloEditBaselineV1)
- outcome: Literal['admitted']¶
- baseline: ModeloEditBaselineV1¶
- class ModeloEditParsedValueV1(**data)[source]¶
Bases:
EditModelA successfully parsed canonical typed value for one scalar address.
Never echoes the transient raw lexeme that produced it.
- Parameters:
- outcome: Literal['parsed']¶
- address: ModeloEditScalarAddressV1¶
- value: ModeloScalar¶
- class ModeloEditPreflightEvaluatedV1(**data)[source]¶
Bases:
EditModelA completed preflight evaluation carrying every finding.
A green (empty-error) preflight is review material, not authorization; execution independently repeats every concurrency and capability check.
- Parameters:
outcome (Literal['evaluated'])
baseline_id (ModeloEditBaselineId)
findings (Annotated[tuple[ModeloEditFindingV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=500)])])
- outcome: Literal['evaluated']¶
- baseline_id: ModeloEditBaselineId¶
- findings: Annotated[tuple[ModeloEditFindingV1, ...], Field(max_length=_MAX_FINDINGS)]¶
- class ModeloEditVersionRefusalV1(**data)[source]¶
Bases:
EditModelMinimal refusal produced before a rejected request target is parsed.
- Parameters:
- kind: Literal['unsupported_version']¶
- requested_version: Annotated[int, Field(ge=1)] | None¶
- supported_version: Literal[1]¶
- class ModeloEditCompatibilityRefusalV1(**data)[source]¶
Bases:
EditModelRefusal produced when the requested compatibility tuple is unsupported.
- Parameters:
- kind: Literal['unsupported_compatibility']¶
- edit_contract_version: Literal[1]¶
- requested_axis: _BoundedCode¶
- responsible_owner: _BoundedCode¶
- reconsideration_condition: _BoundedText¶
- class ModeloEditStaleBaselineRefusalV1(**data)[source]¶
Bases:
EditModelThe compare-and-swap refusal naming every coordinate that disagreed.
Writes nothing and settles the domain effect as
NONE. Never silently rebases, merges, or retries against a new baseline.- Parameters:
kind (Literal['stale_edit_baseline'])
edit_contract_version (Literal[1])
baseline_id (ModeloEditBaselineId)
mismatching_coordinates (Annotated[tuple[_BoundedCode, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=8)])])
responsible_owner (_BoundedCode)
reconsideration_condition (_BoundedText)
recovery_action (ActionReference | None)
- kind: Literal['stale_edit_baseline']¶
- edit_contract_version: Literal[1]¶
- baseline_id: ModeloEditBaselineId¶
- mismatching_coordinates: Annotated[tuple[_BoundedCode, ...], Field(min_length=1, max_length=8)]¶
- responsible_owner: _BoundedCode¶
- reconsideration_condition: _BoundedText¶
- recovery_action: ActionReference | None¶
- class ModeloEditDomainRefusalV1(**data)[source]¶
Bases:
EditModelTyped post-admission refusal without a partial projection or raw exception.
- Parameters:
kind (Literal['domain'])
edit_contract_version (Literal[1])
code (ModeloEditRefusalCode)
address (ModeloEditAddressV1 | None)
facts (Annotated[tuple[_BoundedText, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=16)])])
evidence (_BoundedRefList)
responsible_owner (_BoundedCode)
reconsideration_condition (_BoundedText)
recovery_action (ActionReference | None)
- kind: Literal['domain']¶
- edit_contract_version: Literal[1]¶
- code: ModeloEditRefusalCode¶
- address: ModeloEditAddressV1 | None¶
- facts: Annotated[tuple[_BoundedText, ...], Field(max_length=_MAX_MESSAGE_ARGUMENTS)]¶
- evidence: _BoundedRefList¶
- responsible_owner: _BoundedCode¶
- reconsideration_condition: _BoundedText¶
- recovery_action: ActionReference | None¶
- class ModeloEditUnsupportedIntentReason(*values)[source]¶
Bases:
StrEnumOne closed reason per intent kind this V1 executor cannot yet reach.
Named for what capability is missing, never for the internal plan Step that will supply it: a plan Step id is process metadata, and this reason ships inside a public runtime contract. The Step-to-reason mapping is recorded where cross-referencing code to project tracking belongs – the Step Record that implements each reason, never the reverse.
- SET_OVERRIDE_VALUE_NOT_YET_WIRED¶
- REMOVE_OVERRIDE_NOT_YET_WIRED¶
- ADD_ROW_NOT_YET_WIRED¶
- UPDATE_ROW_NOT_YET_WIRED¶
- DELETE_ROW_NOT_YET_WIRED¶
- MOVE_ROW_NOT_YET_WIRED¶
- RECALCULATE_NOT_YET_WIRED¶
- class ModeloEditUnsupportedIntentRefusalV1(**data)[source]¶
Bases:
EditModelA syntactically admitted intent this V1 executor cannot yet execute.
Distinct from
ModeloEditDomainRefusalV1’sDISALLOWED_INTENT: that code means the baseline’s permitted surface never admitted the address. This refusal means the address and intent ARE admitted, but the calculation boundary this executor delegates to has no input shape for this intent kind yet, so a caller can tell a not-yet-built path from a genuinely invalid one.- Parameters:
kind (Literal['unsupported_intent'])
edit_contract_version (Literal[1])
address (ModeloEditAddressV1 | None)
reason (ModeloEditUnsupportedIntentReason)
responsible_owner (_BoundedCode)
reconsideration_condition (_BoundedText)
- kind: Literal['unsupported_intent']¶
- edit_contract_version: Literal[1]¶
- address: ModeloEditAddressV1 | None¶
- reason: ModeloEditUnsupportedIntentReason¶
- responsible_owner: _BoundedCode¶
- reconsideration_condition: _BoundedText¶
- class ModeloEditRefusedV1(**data)[source]¶
Bases:
EditModelThe result arm that exposes a refusal without calling it a partial success.
- Parameters:
outcome (Literal['refused'])
refusal (ModeloEditRefusalV1)
- outcome: Literal['refused']¶
- refusal: ModeloEditRefusalV1¶
- class ModeloEditFindingV1(**data)[source]¶
Bases:
EditModelOne preflight finding at a semantic address or global scope.
- Parameters:
code (_BoundedCode)
severity (ModeloEditFindingSeverity)
address (ModeloEditAddressV1 | None)
message_arguments (Annotated[tuple[_BoundedText, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=16)])])
evidence (_BoundedRefList)
- code: _BoundedCode¶
- severity: ModeloEditFindingSeverity¶
- address: ModeloEditAddressV1 | None¶
- message_arguments: Annotated[tuple[_BoundedText, ...], Field(max_length=_MAX_MESSAGE_ARGUMENTS)]¶
- evidence: _BoundedRefList¶
- class ModeloScalarEditIntentV1(**data)[source]¶
Bases:
EditModelOne scalar edit intent; zero, false, and empty text remain distinct states.
- Parameters:
address (ModeloEditScalarAddressV1)
kind (ModeloEditScalarIntentKind)
- address: ModeloEditScalarAddressV1¶
- kind: ModeloEditScalarIntentKind¶
- value: ModeloScalar | None¶
- class ModeloBindingEditIntentV1(**data)[source]¶
Bases:
EditModelOne binding-override edit intent; zero and false remain distinct from UNCHANGED.
Addresses
CalculationRevision.binding_overridesdirectly byBindingId. Never carries a value forREMOVE_OVERRIDE: withdrawing an override is expressed by absence of a value, not a typed zero.- Parameters:
address (ModeloEditBindingAddressV1)
kind (ModeloEditBindingIntentKind)
- address: ModeloEditBindingAddressV1¶
- kind: ModeloEditBindingIntentKind¶
- value: ModeloScalar | None¶
- class ModeloRowEditIntentV1(**data)[source]¶
Bases:
EditModelOne repeatable-row edit intent addressed by canonical or correlation identity.
- Parameters:
address (ModeloEditRowAddressV1)
kind (ModeloEditRowIntentKind)
row (Annotated[tuple[ModeloScalarEditIntentV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=200)])] | None)
move_to_index (Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1)])] | None)
- address: ModeloEditRowAddressV1¶
- kind: ModeloEditRowIntentKind¶
- row: Annotated[tuple[ModeloScalarEditIntentV1, ...], Field(max_length=_MAX_ROW_VALUES)] | None¶
- move_to_index: Annotated[int, Field(ge=1)] | None¶
- class ModeloDetailRowEditIntentV1(**data)[source]¶
Bases:
EditModelOne
ModeloDetailRowedit intent, addressed by the row’s own natural key.ADD_ROW and UPDATE_ROW submit a complete typed
ModeloDetailRow. DELETE_ROW names only the natural key: removal is expressed by the row’s absence from the executor’s reconstructed set, with no separate “explicitly deleted” axis, perModeloEditDetailRowAddressV1. No MOVE intent exists – seeModeloEditDetailRowIntentKind.- Parameters:
- address: ModeloEditDetailRowAddressV1¶
- kind: ModeloEditDetailRowIntentKind¶
- row: ModeloDetailRow | None¶
- class ModeloEditSubmissionV1(**data)[source]¶
Bases:
EditModelOne baseline plus its complete normalized ordered intent set.
Carries no frontend state. Duplicate or contradictory address intents refuse before execution.
- Parameters:
edit_contract_version (Literal[1])
baseline (ModeloEditBaselineV1)
mutation_family (ModeloEditMutationFamily)
scalar_intents (Annotated[tuple[ModeloScalarEditIntentV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=500)])])
binding_intents (Annotated[tuple[ModeloBindingEditIntentV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=500)])])
row_intents (Annotated[tuple[ModeloRowEditIntentV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=500)])])
detail_row_intents (Annotated[tuple[ModeloDetailRowEditIntentV1, ...], FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=500)])])
- edit_contract_version: Literal[1]¶
- baseline: ModeloEditBaselineV1¶
- mutation_family: _ModeloEditMutationFamily¶
- scalar_intents: Annotated[tuple[ModeloScalarEditIntentV1, ...], Field(max_length=_MAX_INTENTS)]¶
- binding_intents: Annotated[tuple[ModeloBindingEditIntentV1, ...], Field(max_length=_MAX_INTENTS)]¶
- row_intents: Annotated[tuple[ModeloRowEditIntentV1, ...], Field(max_length=_MAX_INTENTS)]¶
- detail_row_intents: Annotated[tuple[ModeloDetailRowEditIntentV1, ...], Field(max_length=_MAX_INTENTS)]¶
- class ModeloEditApplyRequestV1(**data)[source]¶
Bases:
EditModelThe guarded apply request only the enrolled operation executor may invoke.
- Parameters:
edit_contract_version (Literal[1])
operation_id (OperationId)
submission (ModeloEditSubmissionV1)
- edit_contract_version: Literal[1]¶
- operation_id: OperationId¶
- submission: ModeloEditSubmissionV1¶
- class ModeloEditExecutionUpdatedV1(**data)[source]¶
Bases:
EditModelThe successful compare-and-swap arm carrying the authoritative receipt.
- Parameters:
effect (Literal[ModeloEditExecutionEffect.UPDATED])
receipt (ModeloEditMutationResultReceiptV1)
- effect: Literal[_ModeloEditExecutionEffect.UPDATED]¶
- receipt: _ModeloEditMutationResultReceiptV1¶
- class ModeloEditExecutionNoEffectV1(**data)[source]¶
Bases:
EditModelThe failed compare-and-swap arm; writes nothing and names the refusal.
- Parameters:
effect (Literal[ModeloEditExecutionEffect.NONE])
refusal (ModeloEditRefusalV1)
- effect: Literal[_ModeloEditExecutionEffect.NONE]¶
- refusal: ModeloEditRefusalV1¶