Skip to content

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.

from cayu.tasks import TaskGroupConflict

The 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

from cayu.tasks import TaskGroupCreate

Bases: BaseModel.

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
TaskGroupCreate.copy_graph(value: object) -> TaskGraphCreate
TaskGroupCreate.canonical_members(value: object) -> tuple[str, ...]
TaskGroupCreate.validate_group() -> TaskGroupCreate

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupCreationReceipt

Bases: BaseModel.

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}$')
TaskGroupCreationReceipt.validate_membership() -> TaskGroupCreationReceipt

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupDecision

Bases: BaseModel.

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
TaskGroupDecision.normalize_time(value: datetime) -> datetime
TaskGroupDecision.validate_decision() -> TaskGroupDecision

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupEvent

Bases: BaseModel.

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
TaskGroupEvent.normalize_time(value: datetime) -> datetime
TaskGroupEvent.validate_event() -> TaskGroupEvent

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupEventType

Bases: StrEnum.

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

from cayu.tasks import TaskGroupExecutionObligation

Execution evidence survives terminal task publication and lease clearing.

Bases: BaseModel.

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
TaskGroupExecutionObligation.validate_worker_id(value: str | None) -> str | None
TaskGroupExecutionObligation.normalize_time(value: datetime | None) -> datetime | None
TaskGroupExecutionObligation.validate_result_settlement()

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupFinalizerStatus

Bases: StrEnum.

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

from cayu.tasks import TaskGroupInvocationObligation

Exact ownerless invocation; worker callbacks retain their separate owner.

Bases: BaseModel.

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)
TaskGroupInvocationObligation.validate_session_id(value: str) -> str
TaskGroupInvocationObligation.validate_release_owner()

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupPolicy

Bases: BaseModel.

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)
TaskGroupPolicy.validate_policy() -> TaskGroupPolicy
TaskGroupPolicy.required_successes(member_count: int) -> int

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupQuiescence

Bases: BaseModel.

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
TaskGroupQuiescence.normalize_deadline(value: datetime | None) -> datetime | None
TaskGroupQuiescence.validate_evidence() -> TaskGroupQuiescence

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupQuiescencePolicy

Opt-in bounded observation; expiry never proves that effects stopped.

Bases: BaseModel.

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

from cayu.tasks import TaskGroupQuiescenceResolution

Explicit post-timeout authorization; never substitutes for settlement proof.

Bases: BaseModel.

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

from cayu.tasks import TaskGroupQuiescenceStatus

Bases: StrEnum.

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

from cayu.tasks import TaskGroupSnapshot

Bases: BaseModel.

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)
TaskGroupSnapshot.status() -> TaskGroupStatus
TaskGroupSnapshot.validate_snapshot() -> TaskGroupSnapshot

Release source · Runtime guarantees · Capability guides

from cayu.tasks import TaskGroupStatus

Bases: StrEnum.

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

from cayu.tasks import TaskGroupUnavailable

Complete group evidence is unavailable or contradictory.

Bases: ValueError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides