cadrumo.application.workflow.active_profile module¶
Canonical active-profile selection and record-resolution contracts.
Workflow state is an encrypted record and must not become a second import surface for the process-wide active-profile selector. This module owns the translation from that core selector to a committed capsule and its authenticated profile record.
Core types:
UserProfileRecord.
- class ActiveProfileRecordResolution(record=None, unavailability=None)[source]¶
Bases:
objectOne active-profile record read, together with why it produced nothing.
Exactly one of
recordandunavailabilityis populated. The dataclass never crosses a serialization boundary, so it deliberately avoids eagerly importing the domain profile model at module import time.- Parameters:
record (UserProfileRecord | None)
unavailability (ProfileRecordUnavailability | None)
-
record:
UserProfileRecord|None¶
- active_profile_selection()[source]¶
Return the raw active selector and its canonical live bucket UUID.
- require_active_profile_bucket_id()[source]¶
Return the selected committed bucket or raise the canonical refusal.
- Return type:
- resolve_active_profile_record(*, profile_decode_context)[source]¶
Read the active profile record and name the reason when it is absent.
- Return type:
- Parameters:
profile_decode_context (ProfileDecodeContext)