cadrumo.application.user_profile.censal_operation module

Resumable censo acquisition, exact review, and cotejo application.

class CensalFieldIntent(*values)[source]

Bases: StrEnum

Closed operator intent for one reviewed censo-derived profile field.

ADOPT
PRESERVE
class CensalReviewedFieldIntent(**data)[source]

Bases: BaseModel

One exact field decision retained with the reviewed observation.

Parameters:

data (Any)

path: str
intent: CensalFieldIntent
class CensalProfileBaseline(**data)[source]

Bases: BaseModel

Exact immutable profile revision against which the proposal was reviewed.

Parameters:

data (Any)

profile_id: ProfileId
record_revision: int
content_digest: ContentDigest
classmethod from_record(record)[source]

Capture the canonical revision and self-verifying content digest.

Core types: UserProfileRecord.

Return type:

CensalProfileBaseline

Parameters:

record (UserProfileRecord)

CENSAL_REVIEWED_OPERAND_SCHEMA_VERSION: Final[Literal[1]]

Wire version of the reviewed-operand record. Named rather than written as a bare default so the number has one home: a reader can find every site bound to this shape, and a bump cannot land on the model while a writer stamping the old number silently disagrees with it.

class CensalReviewedOperand(**data)[source]

Bases: BaseModel

Encrypted exact preimage approved or rejected by the operator.

Parameters:
schema_version: Literal[1]
observation: CensalObservation
baseline: CensalProfileBaseline
field_intents: tuple[CensalReviewedFieldIntent, ...]
proposed_effect_digest: ContentDigestOrAbsent
class CensalOperationRequest(**data)[source]

Bases: BaseModel

Exact preflight baseline and review choices with no bearer material.

Parameters:

data (Any)

baseline: CensalProfileBaseline
field_intents: tuple[CensalReviewedFieldIntent, ...]
build_censal_operation_request(record)[source]

Bind the exact baseline and safe per-field defaults for frontend review.

Core types: UserProfileRecord.

Return type:

CensalOperationRequest

Parameters:

record (UserProfileRecord)

class CensalOperationOutcome(*values)[source]

Bases: StrEnum

Settled domain outcome represented by the executor result reference.

APPLIED
REJECTED
class CensalOperationResult(**data)[source]

Bases: BaseModel

Typed schema for the safe result referenced by a completed continuation.

Parameters:

data (Any)

outcome: CensalOperationOutcome
reviewed_proposal_digest: ContentDigest
class CensalReviewResponse(**data)[source]

Bases: BaseModel

Authority-free public decision submitted for a censal REVIEW.

Parameters:
  • response_version (Literal[1])

  • intent (Literal[OperationResponseIntent.APPLY, OperationResponseIntent.REJECT])

response_version: Literal[1]
intent: OperationResponseIntentValue
class CensalReviewFieldProjectionV1(**data)[source]

Bases: BaseModel

One safe censo field displayed for an exact REVIEW decision.

Parameters:

data (Any)

path: str
intent: CensalFieldIntent
observed_value: str | None
class CensalReviewProjectionV1(**data)[source]

Bases: BaseModel

Bearer-free public projection of the encrypted censal proposal.

Parameters:
projection_version: Literal[1]
fields: tuple[CensalReviewFieldProjectionV1, ...]
build_censal_operation_registration(definition)[source]

Bind the canonical censal definition to its public REVIEW contract.

Return type:

OperationPublicDefinitionRegistrationV1

Parameters:

definition (OperationDefinition)

class CensalOperationAcquisition(observation, resource=None)[source]

Bases: object

Completed read plus its idempotently closeable acquisition resource.

Parameters:
observation: CensalObservation
resource: AsyncCloseable | None
class CensalOperationExecutor(*, certificate_secret_backend_factory, browser_session_factory, operator_scope_ports, censal_fetch_port, acquire=None, apply=None, before_irreversible_section=None)[source]

Bases: object

Acquire once, publish one durable review, and resume only from it.

Parameters:
async execute(request, context)[source]

Acquire the observation and publish one durable review checkpoint.

Return type:

str | None

Parameters:
async resume(request, checkpoint, context)[source]

Resume a consumed review checkpoint and apply or reject its operand.

Return type:

str | None

Parameters:
build_censal_operation_definition(*, certificate_secret_backend_factory, browser_session_factory, operator_scope_ports, censal_fetch_port, acquire=None, apply=None, before_irreversible_section=None)[source]

Build the one CENSO registration with its outer live authorities bound.

Return type:

OperationDefinition

Parameters: