cadrumo.application.operations._projection_control module¶
Mutation and response-control stages for operation projections.
- authorize_cancellation(registry, loaded)¶
Bind the live snapshot to a current contract that permits cancellation.
- Return type:
_CancellationContext|OperationCancellationRefusalV1- Parameters:
registry (OperationRegistry)
loaded (_CancellationSnapshot)
- cancellation_request_or_refusal(request)¶
Validate the versioned request envelope before reading durable state.
- Return type:
OperationCancellationRequestV1|OperationCancellationRefusalV1- Parameters:
request (OperationCancellationVersionHeader | OperationCancellationRequestV1)
- detach_refusal(code, *, requested_version)¶
- Return type:
- Parameters:
code (OperationDetachRefusalCode)
requested_version (int | None)
- async execute_cancellation(reader, supervisor, context)¶
Request cancellation and translate races into stable public outcomes.
- Return type:
TypeAliasType- Parameters:
reader (OperationObservationReader)
supervisor (OperationControlSupervisor)
context (_CancellationContext)
- async inspect_response_authority(authority, context)¶
Project only the supported intents authorized by the bound bearer.
- Return type:
TypeAliasType- Parameters:
authority (OperationSecureResponseAuthority)
context (_ResponseControlContext)
- async load_cancellation_snapshot(reader, request)¶
Read and validate the exact live snapshot named by the request.
- Return type:
_CancellationSnapshot|OperationCancellationRefusalV1- Parameters:
reader (OperationObservationReader)
request (OperationCancellationRequestV1)
- async load_detach_context(reader, registry, request)¶
Validate, read, and authorize the exact live detach snapshot.
- Return type:
_DetachContext|OperationDetachRefusalV1- Parameters:
reader (OperationObservationReader)
registry (OperationRegistry)
request (OperationDetachVersionHeader | OperationDetachRequestV1)
- async load_response_control_context(reader, request)¶
Read and validate the exact live REVIEW checkpoint for response control.
- Return type:
_ResponseControlContext|OperationResponseControlRefusalV1- Parameters:
reader (OperationObservationReader)
request (OperationResponseControlRequestV1)
- response_control_contract_is_current(registry, context)¶
Require the checkpoint response schema and definition digest to match.
- Return type:
- Parameters:
registry (OperationRegistry)
context (_ResponseControlContext)
- response_control_request_or_refusal(request)¶
Validate the versioned response-control envelope before reading state.
- Return type:
OperationResponseControlRequestV1|OperationResponseControlRefusalV1- Parameters:
request (OperationResponseControlVersionHeader | OperationResponseControlRequestV1)
- response_for_mutation(request, pending, response_token)¶
Materialize the exact response payload accepted by the supervisor.
- Return type:
- Parameters:
request (OperationResponseMutationRequestV1)
pending (OperationPendingInteraction)
response_token (OperationResponseToken)