cadrumo.application.user_profile.login_handover module

Application contract for a durable profile-login handover witness.

class HandoverPhase(*values)[source]

Bases: StrEnum

Durable boundaries of one password-authenticated profile handover.

PREPARED
POINTER_PUBLISHED
B_BOUND
ACCELERATED
ACTIVATED
A_RETIRED
class ProfileLoginHandoverJournal(**data)[source]

Bases: BaseModel

Non-secret recovery witness for the short A-to-B handover window.

Parameters:

data (Any)

schema_version: Literal[2]
phase: HandoverPhase
profile_a: BucketId | None
profile_b: BucketId
pointer_before: BucketPointer
pointer_after: BucketPointer
activation_at: datetime
classmethod prepare(*, profile_a, profile_b, pointer_before, pointer_after, activation_at)[source]

Capture the transition before pointer publication.

Return type:

ProfileLoginHandoverJournal

Parameters:
at_phase(phase)[source]

Return this handover witnessed at its next durable phase.

Return type:

ProfileLoginHandoverJournal

Parameters:

phase (HandoverPhase)

at_least_phase(phase)[source]

Advance without regressing the durable phase.

Return type:

ProfileLoginHandoverJournal

Parameters:

phase (HandoverPhase)

canonical_json_bytes()[source]

Return the journal’s bounded, byte-exact persistence form.

Return type:

bytes