cadrumo.application.config_reset_models module¶
Record contracts for durable reset journals.
These models define local journal shapes and invariants only. They do not implement reset orchestration, discovery, transition enforcement, resume, or completion semantics.
- class ConfigResetOperationStatus(*values)[source]¶
Bases:
StrEnumClosed vocabulary of operation-status labels, without transition rules.
- INCOMPLETE¶
- PAUSED¶
- COMPLETE¶
- class ConfigResetPauseReason(*values)[source]¶
Bases:
StrEnumClosed vocabulary of reasons that require an explicit resume.
- RETENTION_UNRESOLVED¶
- TARGET_STATE_CHANGED¶
- POINTER_CHANGED¶
- class ConfigResetTargetPhase(*values)[source]¶
Bases:
StrEnumClosed vocabulary of target-phase labels, without transition rules.
- SNAPSHOTTED¶
- RETENTION_APPROVED¶
- AUTH_CLEARING¶
- AUTH_CLEARED¶
- POINTER_RECONCILING¶
- POINTER_RECONCILED¶
- DELETING¶
- DELETED¶
- class ConfigResetPointerSnapshot(**data)[source]¶
Bases:
BaseModelReset-journal witness over the canonical pointer record.
- Parameters:
data (Any)
- record: BucketPointer¶
- class ConfigResetRetentionDecision(**data)[source]¶
Bases:
BaseModelJournaled correlations supporting a retention decision.
The record enforces internal count, flag, and reason correlations only; it is not proof of external policy approval.
- Parameters:
data (Any)
- assessed_at: datetime¶
- blocks_erase: bool¶
- retained_record_count: NonNegativeInt¶
- latest_safe_erase_date: datetime | None¶
- override_approved: bool¶
- override_reason: str | None¶
- class ConfigResetAuthClearanceMode(*values)[source]¶
Bases:
StrEnumClosed vocabulary of how one target’s auth custody was actually ended.
- UNLOCKED_REVOCATION¶
- CAPSULE_DESTRUCTION¶
- class ConfigResetAuthClearance(**data)[source]¶
Bases:
BaseModelWhat the auth phase removed for one target, and what it could not reach.
The phase name says auth was cleared; this record says HOW, because the two modes end custody by different means and leave different residue.
UNLOCKED_REVOCATIONmeans a custody session for the target was already open, so the full revocation ran: the encrypted rows inside the capsule and the certificate-source secrets held outside it were both removed, andremoved_out_of_bucket_secret_recordscounts the latter.CAPSULE_DESTRUCTIONmeans the target was locked. Its in-capsule auth rows end with the capsule, and the acquisition locks – plaintext files outside it, which the deletion does not reap – were cleared explicitly. Its certificate-source secrets could be neither enumerated nor removed, because both the record naming them and the lookup digest addressing them need the profile’s key, soremoved_out_of_bucket_secret_recordsisNone: an unknown, never a zero. Their ciphertext outlives the erase and is unreadable, the wrapping of its key having been destroyed with the capsule.- Parameters:
data (Any)
- mode: ConfigResetAuthClearanceMode¶
- cleared_at: datetime¶
- cleared_lock_provider_ids: tuple[str, ...]¶
- removed_out_of_bucket_secret_records: int | None¶
- class ConfigResetDeletionMarker(**data)[source]¶
Bases:
BaseModelOwnership-witness shape intended for pre-delete persistence.
This model does not implement the orchestration that writes the marker.
- Parameters:
data (Any)
- operation_id: Hex64Str¶
- bucket_id: BucketId¶
- fingerprint: ContentDigest¶
- marked_at: datetime¶
- class ConfigResetTarget(**data)[source]¶
Bases:
BaseModelExplicit bucket target recorded in a reset journal.
The model represents a supplied target and does not perform discovery.
- Parameters:
data (Any)
- bucket_id: BucketId¶
- label: str | None¶
- setup_state_at_snapshot: ProfileSetupState | None¶
- exists_at_snapshot: bool¶
- fingerprint: BucketDeletionFingerprint | None¶
- phase: ConfigResetTargetPhase¶
- retention: ConfigResetRetentionDecision | None¶
- auth_clearance: ConfigResetAuthClearance | None¶
- deletion_marker: ConfigResetDeletionMarker | None¶
- completed_at: datetime | None¶
- class ConfigResetSummary(**data)[source]¶
Bases:
BaseModelReconciled-count shape for a completed operation record.
The model defines the record shape but is not itself reset orchestration.
- Parameters:
data (Any)
- target_count: NonNegativeInt¶
- deleted_count: NonNegativeInt¶
- already_absent_count: NonNegativeInt¶
- retention_override_count: NonNegativeInt¶
- completed_at: datetime¶
- class ConfigResetOperation(**data)[source]¶
Bases:
BaseModelCredential-free reset-journal document with local invariants.
Targets are unique and sorted. The model accepts only the current schema version and validates its own record structure. It does not enforce state transitions.
- Parameters:
data (Any)
- schema_version: Literal[2]¶
- operation_id: Hex64Str¶
- status: ConfigResetOperationStatus¶
- started_at: datetime¶
- updated_at: datetime¶
- pointer_snapshot: ConfigResetPointerSnapshot¶
- targets: tuple[ConfigResetTarget, ...]¶
- pause_reason: ConfigResetPauseReason | None¶
- paused_target_ids: tuple[BucketId, ...]¶
- summary: ConfigResetSummary | None¶