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:
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:

OperationDetachRefusalV1

Parameters:
async execute_cancellation(reader, supervisor, context)

Request cancellation and translate races into stable public outcomes.

Return type:

TypeAliasType

Parameters:
async inspect_response_authority(authority, context)

Project only the supported intents authorized by the bound bearer.

Return type:

TypeAliasType

Parameters:
async load_cancellation_snapshot(reader, request)

Read and validate the exact live snapshot named by the request.

Return type:

_CancellationSnapshot | OperationCancellationRefusalV1

Parameters:
async load_detach_context(reader, registry, request)

Validate, read, and authorize the exact live detach snapshot.

Return type:

_DetachContext | OperationDetachRefusalV1

Parameters:
async load_response_control_context(reader, request)

Read and validate the exact live REVIEW checkpoint for response control.

Return type:

_ResponseControlContext | OperationResponseControlRefusalV1

Parameters:
response_control_contract_is_current(registry, context)

Require the checkpoint response schema and definition digest to match.

Return type:

bool

Parameters:
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:

OperationApplyResponse | OperationRejectResponse

Parameters:
response_refusal(code, *, requested_version)
Return type:

OperationResponseControlRefusalV1

Parameters: