cadrumo.application.modelo.edit_contract module¶
The publicly consumable face of the Modelo Edit Contract V1.
This module carries only what a package OUTSIDE application.modelo
legitimately holds: the safe result receipt a guarded compare-and-swap
produces, the closed mutation family it names, the execution effect the
receipt records, and the fail-closed boundary posture all three share.
The rest of the Edit Contract V1 record family – admission, parsing,
preflight, intents, addresses, refusals and capability projection – stays
package-internal in _edit_models, because no consumer outside the
package addresses those and publishing them would widen the contract to
the shape of its implementation rather than the shape of its use.
The dependency runs one way: _edit_models imports from here. The
internal record family references the receipt and the effect, so the
reverse direction would be a cycle.
- class EditModel(**data)[source]¶
Bases:
BaseModelThe common fail-closed boundary posture for Edit Contract V1 records.
- class ModeloEditMutationFamily(*values)[source]¶
Bases:
StrEnumThe closed set of edit-executed effects this V1 contract covers.
- CALCULATE¶
- RECALCULATE¶
- class ModeloEditExecutionEffect(*values)[source]¶
Bases:
StrEnumThe two possible outcomes of one guarded compare-and-swap execution.
- UPDATED¶
- NONE¶
- class ModeloEditMutationResultReceiptV1(**data)[source]¶
Bases:
EditModelThe safe domain proof co-committed with one guarded compare-and-swap edit.
Carries no financial value, raw input, row content, or input digest. A matching receipt proves
UPDATED; a proven failed compare-and-swap provesNONE.bucket_event_idisNoneon a duplicate-result confirmation: an identical content-addressed revision already exists, so this commit advances or confirms only the work-unit pointer and emits no freshMODELO_CALCULATION_CREATEDevent to reference. It is always present when the commit created the revision.- Parameters:
receipt_id (ModeloEditMutationResultReceiptId)
operation_id (OperationId)
mutation_family (ModeloEditMutationFamily)
baseline_id (ModeloEditBaselineId)
work_unit_id (WorkUnitId)
calculation_revision_id (CalculationRevisionId)
bucket_event_id (Annotated[str, StringConstraints(strip_whitespace=True, to_upper=None, to_lower=None, strict=None, min_length=64, max_length=64, pattern=^[0-9a-f]{64}$, ascii_only=None)] | None)
effect (Literal[ModeloEditExecutionEffect.UPDATED])
committed_at (datetime)
result_destination (OperationReference)
- receipt_id: ModeloEditMutationResultReceiptId¶
- operation_id: OperationId¶
- mutation_family: ModeloEditMutationFamily¶
- baseline_id: ModeloEditBaselineId¶
- work_unit_id: WorkUnitId¶
- calculation_revision_id: CalculationRevisionId¶
- bucket_event_id: Hex64Str | None¶
- effect: Literal[ModeloEditExecutionEffect.UPDATED]¶
- committed_at: datetime¶
- result_destination: OperationReference¶
- class ModeloEditCompatibilityTupleV1(**data)[source]¶
Bases:
EditModelEvery distinct current-only version and digest axis this edit binds to.
No member is collapsed into a generic shared
version, and a manifest version never substitutes for a definition or contract-set digest.- Parameters:
workspace_contract_version (Literal[1])
edit_contract_version (Literal[1])
operation_manifest_version (Literal[1])
contract_set_digest (ContentDigest)
operation_definition_id (OperationDefinitionId)
definition_contract_digest (ContentDigest)
request_schema (OperationSchemaIdentityV1)
result_schema (OperationSchemaIdentityV1)
observation_contract_version (Literal[1])
review_projection_contract_version (Literal[1] | None)
review_schema (OperationSchemaIdentityV1 | None)
workspace_refresh_target_version (Literal[1])
workspace_refresh_target_schema (OperationSchemaIdentityV1)
financial_operand_protocol_version (Literal[1])
financial_operand_schema (OperationSchemaIdentityV1)
- workspace_contract_version: Literal[1]¶
- edit_contract_version: Literal[1]¶
- operation_manifest_version: Literal[1]¶
- contract_set_digest: ContentDigest¶
- operation_definition_id: OperationDefinitionId¶
- definition_contract_digest: ContentDigest¶
- request_schema: OperationSchemaIdentityV1¶
- result_schema: OperationSchemaIdentityV1¶
- observation_contract_version: Literal[1]¶
- review_projection_contract_version: Literal[1] | None¶
- review_schema: OperationSchemaIdentityV1 | None¶
- workspace_refresh_target_version: Literal[1]¶
- workspace_refresh_target_schema: OperationSchemaIdentityV1¶
- financial_operand_protocol_version: Literal[1]¶
- financial_operand_schema: OperationSchemaIdentityV1¶