cayu.sessions.cleanup
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
copy_recovery_cleanup_policy
Section titled “copy_recovery_cleanup_policy”from cayu.sessions import copy_recovery_cleanup_policycopy_recovery_cleanup_policy(policy: RecoveryCleanupPolicy | None) -> RecoveryCleanupPolicyRelease source · Runtime guarantees · Capability guides
DEFAULT_RECOVERY_CLEANUP_MAX_SUPERVISED_TASKS
Section titled “DEFAULT_RECOVERY_CLEANUP_MAX_SUPERVISED_TASKS”from cayu.sessions import DEFAULT_RECOVERY_CLEANUP_MAX_SUPERVISED_TASKSDEFAULT_RECOVERY_CLEANUP_MAX_SUPERVISED_TASKS = 256Release source · Runtime guarantees · Capability guides
DEFAULT_RECOVERY_CLEANUP_OVERALL_TIMEOUT_SECONDS
Section titled “DEFAULT_RECOVERY_CLEANUP_OVERALL_TIMEOUT_SECONDS”from cayu.sessions import DEFAULT_RECOVERY_CLEANUP_OVERALL_TIMEOUT_SECONDSDEFAULT_RECOVERY_CLEANUP_OVERALL_TIMEOUT_SECONDS = 120.0Release source · Runtime guarantees · Capability guides
DEFAULT_RECOVERY_CLEANUP_STEP_TIMEOUT_SECONDS
Section titled “DEFAULT_RECOVERY_CLEANUP_STEP_TIMEOUT_SECONDS”from cayu.sessions import DEFAULT_RECOVERY_CLEANUP_STEP_TIMEOUT_SECONDSDEFAULT_RECOVERY_CLEANUP_STEP_TIMEOUT_SECONDS = 30.0Release source · Runtime guarantees · Capability guides
RECOVERY_CLEANUP_MAX_TIMEOUT_SECONDS
Section titled “RECOVERY_CLEANUP_MAX_TIMEOUT_SECONDS”from cayu.sessions import RECOVERY_CLEANUP_MAX_TIMEOUT_SECONDSRECOVERY_CLEANUP_MAX_TIMEOUT_SECONDS = 86400.0Release source · Runtime guarantees · Capability guides
RecoveryCleanupCapacityExceeded
Section titled “RecoveryCleanupCapacityExceeded”from cayu.sessions import RecoveryCleanupCapacityExceededA new cleanup cannot be supervised without exceeding its configured bound.
Bases: RuntimeError.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
code |
Literal['recovery_cleanup_capacity_exceeded'] |
'recovery_cleanup_capacity_exceeded' |
init (method)
Section titled “init (method)”RecoveryCleanupCapacityExceeded.__init__(*, operation: str, max_supervised_tasks: int) -> NoneRelease source · Runtime guarantees · Capability guides
RecoveryCleanupDeadlineEvidence
Section titled “RecoveryCleanupDeadlineEvidence”from cayu.sessions import RecoveryCleanupDeadlineEvidencePortable, content-free evidence for an outcome-unknown cleanup step.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
code |
Literal['recovery_cleanup_deadline_exceeded'] |
'recovery_cleanup_deadline_exceeded' |
operation |
str |
required |
scope |
RecoveryCleanupDeadlineScope |
required |
timeout_seconds |
float |
required |
outcome_unknown |
Literal[True] |
True |
validate_operation (method)
Section titled “validate_operation (method)”RecoveryCleanupDeadlineEvidence.validate_operation(value: object) -> strvalidate_timeout_seconds (method)
Section titled “validate_timeout_seconds (method)”RecoveryCleanupDeadlineEvidence.validate_timeout_seconds(value: object) -> floatRelease source · Runtime guarantees · Capability guides
RecoveryCleanupDeadlineExceeded
Section titled “RecoveryCleanupDeadlineExceeded”from cayu.sessions import RecoveryCleanupDeadlineExceededOne cleanup step transferred to retained supervision at a finite deadline.
Bases: TimeoutError.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
code |
Literal['recovery_cleanup_deadline_exceeded'] |
'recovery_cleanup_deadline_exceeded' |
init (method)
Section titled “init (method)”RecoveryCleanupDeadlineExceeded.__init__(*, operation: str, scope: RecoveryCleanupDeadlineScope, timeout_seconds: float) -> Noneevidence (method)
Section titled “evidence (method)”RecoveryCleanupDeadlineExceeded.evidence() -> RecoveryCleanupDeadlineEvidenceRelease source · Runtime guarantees · Capability guides
RecoveryCleanupDeadlineScope
Section titled “RecoveryCleanupDeadlineScope”from cayu.sessions import RecoveryCleanupDeadlineScopeBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
STEP |
class attribute |
'step' |
OVERALL |
class attribute |
'overall' |
Release source · Runtime guarantees · Capability guides
RecoveryCleanupOwner
Section titled “RecoveryCleanupOwner”from cayu.sessions import RecoveryCleanupOwnerExact process-local observation identity; never recovery authority.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
supervisor_id |
str |
Field(min_length=1, max_length=64) |
session_id |
str |
Field(min_length=1, max_length=2048) |
session_instance_id |
str |
Field(min_length=1, max_length=512) |
run_epoch |
StrictInt |
Field(ge=0) |
Release source · Runtime guarantees · Capability guides
RecoveryCleanupPolicy
Section titled “RecoveryCleanupPolicy”from cayu.sessions import RecoveryCleanupPolicyFinite deadlines for one ordered Runtime recovery-cleanup sequence.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
step_timeout_seconds |
float |
DEFAULT_RECOVERY_CLEANUP_STEP_TIMEOUT_SECONDS |
overall_timeout_seconds |
float |
DEFAULT_RECOVERY_CLEANUP_OVERALL_TIMEOUT_SECONDS |
max_supervised_tasks |
StrictInt |
Field(default=DEFAULT_RECOVERY_CLEANUP_MAX_SUPERVISED_TASKS, ge=1, le=4096) |
validate_timeout_seconds (method)
Section titled “validate_timeout_seconds (method)”RecoveryCleanupPolicy.validate_timeout_seconds(value: object, info) -> floatRelease source · Runtime guarantees · Capability guides
RecoveryCleanupRetainedTaskSnapshot
Section titled “RecoveryCleanupRetainedTaskSnapshot”from cayu.sessions import RecoveryCleanupRetainedTaskSnapshotBounded process-local identity for one retained cleanup task.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
operation |
str |
required |
scope |
RecoveryCleanupDeadlineScope |
required |
timeout_seconds |
float |
required |
outcome_unknown |
Literal[True] |
True |
caller_cancellation_observed |
bool |
required |
validate_operation (method)
Section titled “validate_operation (method)”RecoveryCleanupRetainedTaskSnapshot.validate_operation(value: object) -> strvalidate_timeout_seconds (method)
Section titled “validate_timeout_seconds (method)”RecoveryCleanupRetainedTaskSnapshot.validate_timeout_seconds(value: object) -> floatRelease source · Runtime guarantees · Capability guides
RecoveryCleanupSessionSnapshot
Section titled “RecoveryCleanupSessionSnapshot”from cayu.sessions import RecoveryCleanupSessionSnapshotLocal observations only; absence never proves remote or durable settlement.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
owner |
RecoveryCleanupOwner |
required |
tasks |
tuple[RecoveryCleanupTaskSnapshot, ...] |
required |
active_tasks |
int |
required |
retained_tasks |
int |
required |
history_truncated |
bool |
required |
unattributed_tasks |
int |
required |
cross_process_settlement |
Literal['unknown'] |
'unknown' |
Release source · Runtime guarantees · Capability guides
RecoveryCleanupSupervisorSnapshot
Section titled “RecoveryCleanupSupervisorSnapshot”from cayu.sessions import RecoveryCleanupSupervisorSnapshotContent-free process-local cleanup supervision state.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
active_tasks |
StrictInt |
Field(ge=0) |
retained_tasks |
StrictInt |
Field(ge=0) |
timed_out_steps |
StrictInt |
Field(ge=0) |
completed_after_timeout |
StrictInt |
Field(ge=0) |
failed_after_timeout |
StrictInt |
Field(ge=0) |
retained_after_cancellation |
StrictInt |
Field(ge=0) |
capacity_exhausted_steps |
StrictInt |
Field(ge=0) |
retained |
tuple[RecoveryCleanupRetainedTaskSnapshot, ...] |
() |
tasks |
tuple[RecoveryCleanupTaskSnapshot, ...] |
() |
history_truncated |
bool |
False |
Release source · Runtime guarantees · Capability guides
RecoveryCleanupTaskSnapshot
Section titled “RecoveryCleanupTaskSnapshot”from cayu.sessions import RecoveryCleanupTaskSnapshotImmutable bounded observation of a supervised task, with no exception data.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
task_id |
str |
required |
owner |
RecoveryCleanupOwner | None |
required |
operation |
str |
required |
status |
Literal['active', 'retained', 'completed', 'failed'] |
required |