cayu.tasks.groups
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.
TaskGroupConflict
Section titled “TaskGroupConflict”from cayu.tasks import TaskGroupConflictThe request conflicts with immutable group authority.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
TaskGroupCreate
Section titled “TaskGroupCreate”from cayu.tasks import TaskGroupCreateBases: 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 |
|---|---|---|
group_id |
GraphIdentifier |
required |
graph |
TaskGraphCreate |
required |
member_task_ids |
GraphIdentifiers |
Field(min_length=1) |
policy |
TaskGroupPolicy |
required |
quiescence |
TaskGroupQuiescencePolicy | None |
None |
finalizer_task_id |
GraphIdentifier | None |
None |
copy_graph (method)
Section titled “copy_graph (method)”TaskGroupCreate.copy_graph(value: object) -> TaskGraphCreatecanonical_members (method)
Section titled “canonical_members (method)”TaskGroupCreate.canonical_members(value: object) -> tuple[str, ...]validate_group (method)
Section titled “validate_group (method)”TaskGroupCreate.validate_group() -> TaskGroupCreateRelease source · Runtime guarantees · Capability guides
TaskGroupCreationReceipt
Section titled “TaskGroupCreationReceipt”from cayu.tasks import TaskGroupCreationReceiptBases: 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 |
|---|---|---|
group_id |
GraphIdentifier |
required |
graph |
TaskGraphCreationReceipt |
required |
member_task_ids |
GraphIdentifiers |
Field(min_length=1) |
policy |
TaskGroupPolicy |
required |
quiescence |
TaskGroupQuiescencePolicy | None |
None |
finalizer_task_id |
GraphIdentifier | None |
None |
request_sha256 |
str |
Field(pattern='^[0-9a-f]{64}$') |
submitted_request_sha256 |
str |
Field(pattern='^[0-9a-f]{64}$') |
validate_membership (method)
Section titled “validate_membership (method)”TaskGroupCreationReceipt.validate_membership() -> TaskGroupCreationReceiptRelease source · Runtime guarantees · Capability guides
TaskGroupDecision
Section titled “TaskGroupDecision”from cayu.tasks import TaskGroupDecisionBases: 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 |
|---|---|---|
status |
Literal[TaskGroupStatus.SUCCEEDED, TaskGroupStatus.FAILED] |
required |
decided_at |
datetime |
required |
successful_task_ids |
GraphIdentifiers |
required |
unsuccessful_task_ids |
GraphIdentifiers |
required |
reason |
Literal['completion_policy_impossible'] | None |
None |
normalize_time (method)
Section titled “normalize_time (method)”TaskGroupDecision.normalize_time(value: datetime) -> datetimevalidate_decision (method)
Section titled “validate_decision (method)”TaskGroupDecision.validate_decision() -> TaskGroupDecisionRelease source · Runtime guarantees · Capability guides
TaskGroupEvent
Section titled “TaskGroupEvent”from cayu.tasks import TaskGroupEventBases: 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 |
|---|---|---|
group_id |
GraphIdentifier |
required |
sequence |
StrictInt |
Field(ge=1, le=MAX_PORTABLE_JSON_INTEGER) |
type |
TaskGroupEventType |
required |
occurred_at |
datetime |
required |
task_id |
GraphIdentifier | None |
None |
task_status |
TaskStatus | None |
None |
decision |
TaskGroupDecision | None |
None |
quiescence |
TaskGroupQuiescence | None |
None |
normalize_time (method)
Section titled “normalize_time (method)”TaskGroupEvent.normalize_time(value: datetime) -> datetimevalidate_event (method)
Section titled “validate_event (method)”TaskGroupEvent.validate_event() -> TaskGroupEventRelease source · Runtime guarantees · Capability guides
TaskGroupEventType
Section titled “TaskGroupEventType”from cayu.tasks import TaskGroupEventTypeBases: 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 |
|---|---|---|
CREATED |
class attribute |
'task.group_created' |
MEMBER_TERMINAL |
class attribute |
'task.group_member_terminal' |
POLICY_SATISFIED |
class attribute |
'task.group_policy_satisfied' |
POLICY_IMPOSSIBLE |
class attribute |
'task.group_policy_impossible' |
SUCCEEDED |
class attribute |
'task.group_succeeded' |
FAILED |
class attribute |
'task.group_failed' |
CANCELLATION_REQUESTED |
class attribute |
'task.group_cancellation_requested' |
DRAINING |
class attribute |
'task.group_draining' |
QUIESCENT |
class attribute |
'task.group_quiescent' |
TIMEOUT |
class attribute |
'task.group_quiescence_timeout' |
RESOLVED |
class attribute |
'task.group_quiescence_resolved' |
FINALIZER_RELEASED |
class attribute |
'task.group_finalizer_released' |
FINALIZER_INELIGIBLE |
class attribute |
'task.group_finalizer_ineligible' |
FINALIZER_SETTLED |
class attribute |
'task.group_finalizer_settled' |
Release source · Runtime guarantees · Capability guides
TaskGroupExecutionObligation
Section titled “TaskGroupExecutionObligation”from cayu.tasks import TaskGroupExecutionObligationExecution evidence survives terminal task publication and lease clearing.
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 |
GraphIdentifier |
required |
worker_id |
str | None |
Field(default=None, strict=True) |
started_at |
datetime |
required |
settled_at |
datetime | None |
None |
invocation |
TaskGroupInvocationObligation | None |
None |
result_resolution |
TaskGroupResultResolutionObligation | None |
None |
validate_worker_id (method)
Section titled “validate_worker_id (method)”TaskGroupExecutionObligation.validate_worker_id(value: str | None) -> str | Nonenormalize_time (method)
Section titled “normalize_time (method)”TaskGroupExecutionObligation.normalize_time(value: datetime | None) -> datetime | Nonevalidate_result_settlement (method)
Section titled “validate_result_settlement (method)”TaskGroupExecutionObligation.validate_result_settlement()Release source · Runtime guarantees · Capability guides
TaskGroupFinalizerStatus
Section titled “TaskGroupFinalizerStatus”from cayu.tasks import TaskGroupFinalizerStatusBases: 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 |
|---|---|---|
ABSENT |
class attribute |
'absent' |
WAITING |
class attribute |
'waiting' |
RELEASED |
class attribute |
'released' |
INELIGIBLE |
class attribute |
'ineligible' |
SETTLED |
class attribute |
'settled' |
Release source · Runtime guarantees · Capability guides
TaskGroupInvocationObligation
Section titled “TaskGroupInvocationObligation”from cayu.tasks import TaskGroupInvocationObligationExact ownerless invocation; worker callbacks retain their separate owner.
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 |
GraphIdentifier |
required |
session_id |
str |
Field(strict=True) |
session_instance_id |
GraphIdentifier |
required |
interaction_id |
GraphIdentifier |
required |
run_epoch |
StrictInt |
Field(ge=1, le=MAX_PORTABLE_JSON_INTEGER) |
profile_fingerprint |
str |
Field(pattern='^[0-9a-f]{64}$') |
release_record_sha256 |
str | None |
Field(default=None, pattern='^[0-9a-f]{64}$') |
owner_settled |
bool |
Field(default=False, strict=True) |
validate_session_id (method)
Section titled “validate_session_id (method)”TaskGroupInvocationObligation.validate_session_id(value: str) -> strvalidate_release_owner (method)
Section titled “validate_release_owner (method)”TaskGroupInvocationObligation.validate_release_owner()Release source · Runtime guarantees · Capability guides
TaskGroupPolicy
Section titled “TaskGroupPolicy”from cayu.tasks import TaskGroupPolicyBases: 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 |
|---|---|---|
kind |
Literal['all', 'first_success', 'quorum'] |
required |
k |
StrictInt | None |
Field(default=None, ge=1, le=128) |
validate_policy (method)
Section titled “validate_policy (method)”TaskGroupPolicy.validate_policy() -> TaskGroupPolicyrequired_successes (method)
Section titled “required_successes (method)”TaskGroupPolicy.required_successes(member_count: int) -> intRelease source · Runtime guarantees · Capability guides
TaskGroupQuiescence
Section titled “TaskGroupQuiescence”from cayu.tasks import TaskGroupQuiescenceBases: 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 |
|---|---|---|
status |
TaskGroupQuiescenceStatus |
TaskGroupQuiescenceStatus.NOT_REQUESTED |
deadline |
datetime | None |
None |
loser_task_ids |
GraphIdentifiers |
() |
unsettled_task_ids |
GraphIdentifiers |
() |
executions |
tuple[TaskGroupExecutionObligation, ...] |
Field(default=(), max_length=12800) |
finalizer_status |
TaskGroupFinalizerStatus |
TaskGroupFinalizerStatus.ABSENT |
normalize_deadline (method)
Section titled “normalize_deadline (method)”TaskGroupQuiescence.normalize_deadline(value: datetime | None) -> datetime | Nonevalidate_evidence (method)
Section titled “validate_evidence (method)”TaskGroupQuiescence.validate_evidence() -> TaskGroupQuiescenceRelease source · Runtime guarantees · Capability guides
TaskGroupQuiescencePolicy
Section titled “TaskGroupQuiescencePolicy”from cayu.tasks import TaskGroupQuiescencePolicyOpt-in bounded observation; expiry never proves that effects stopped.
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 |
|---|---|---|
timeout_seconds |
StrictFloat | StrictInt |
Field(gt=0, le=86400, allow_inf_nan=False) |
Release source · Runtime guarantees · Capability guides
TaskGroupQuiescenceResolution
Section titled “TaskGroupQuiescenceResolution”from cayu.tasks import TaskGroupQuiescenceResolutionExplicit post-timeout authorization; never substitutes for settlement proof.
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 |
|---|---|---|
group_id |
GraphIdentifier |
required |
request_sha256 |
str |
Field(pattern='^[0-9a-f]{64}$') |
expected_sequence |
StrictInt |
Field(ge=1, le=MAX_PORTABLE_JSON_INTEGER) |
idempotency_key |
GraphIdentifier |
required |
Release source · Runtime guarantees · Capability guides
TaskGroupQuiescenceStatus
Section titled “TaskGroupQuiescenceStatus”from cayu.tasks import TaskGroupQuiescenceStatusBases: 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 |
|---|---|---|
NOT_REQUESTED |
class attribute |
'not_requested' |
WAITING_DECISION |
class attribute |
'waiting_decision' |
DRAINING |
class attribute |
'draining' |
ATTENTION_REQUIRED |
class attribute |
'attention_required' |
QUIESCENT |
class attribute |
'quiescent' |
Release source · Runtime guarantees · Capability guides
TaskGroupSnapshot
Section titled “TaskGroupSnapshot”from cayu.tasks import TaskGroupSnapshotBases: 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 |
|---|---|---|
receipt |
TaskGroupCreationReceipt |
required |
members |
tuple[TaskGraphMember, ...] |
Field(min_length=1, max_length=128) |
decision |
TaskGroupDecision | None |
None |
quiescence |
TaskGroupQuiescence |
Field(default_factory=TaskGroupQuiescence) |
last_sequence |
StrictInt |
Field(ge=1, le=MAX_PORTABLE_JSON_INTEGER) |
status (property)
Section titled “status (property)”TaskGroupSnapshot.status() -> TaskGroupStatusvalidate_snapshot (method)
Section titled “validate_snapshot (method)”TaskGroupSnapshot.validate_snapshot() -> TaskGroupSnapshotRelease source · Runtime guarantees · Capability guides
TaskGroupStatus
Section titled “TaskGroupStatus”from cayu.tasks import TaskGroupStatusBases: 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 |
|---|---|---|
PENDING |
class attribute |
'pending' |
SUCCEEDED |
class attribute |
'succeeded' |
FAILED |
class attribute |
'failed' |
Release source · Runtime guarantees · Capability guides
TaskGroupUnavailable
Section titled “TaskGroupUnavailable”from cayu.tasks import TaskGroupUnavailableComplete group evidence is unavailable or contradictory.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.