Skip to content

cayu.artifacts.settlement

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.artifacts import artifact_store_identity_sha256

Return the bounded diagnostic identity used by settlement evidence.

artifact_store_identity_sha256(store_id: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import artifact_write_settlements

Read bounded settlement evidence without invoking extension exception accessors.

artifact_write_settlements(error: BaseException) -> tuple[ArtifactWriteSettlementEvidence, ...]

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementEvidence

Bounded, non-authoritative evidence for one artifact-write invocation.

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
schema_version Literal[1] 1
operation_id str required
artifact_id str required
store_identity_sha256 str required
status ArtifactWriteSettlementStatus required
phase ArtifactWriteSettlementPhase required
observation ArtifactWriteSettlementObservation required
started_at datetime required
observed_at datetime required
elapsed_ms StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
backend_locator str | None None
backend_version str | None None
failure_codes tuple[ArtifactWriteSettlementFailureCode, ...] ()
ArtifactWriteSettlementEvidence.validate_bounded_identity(value: str | None, info) -> str | None
ArtifactWriteSettlementEvidence.validate_store_identity_sha256(value: str) -> str
ArtifactWriteSettlementEvidence.validate_timestamp(value: datetime, info) -> datetime
ArtifactWriteSettlementEvidence.copy_failure_codes(value: object) -> tuple[object, ...]
ArtifactWriteSettlementEvidence.validate_shape() -> ArtifactWriteSettlementEvidence
ArtifactWriteSettlementEvidence.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> Self

Return an independently validated immutable evidence record.

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementFailureCode

Content-free failure classifications retained by settlement evidence.

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
CAPACITY_EXHAUSTED class attribute 'capacity_exhausted'
MUTATION_FAILED class attribute 'mutation_failed'
COMMIT_FAILED class attribute 'commit_failed'
CLEANUP_FAILED class attribute 'cleanup_failed'
RECONCILIATION_FAILED class attribute 'reconciliation_failed'
CHILD_CANCELLED class attribute 'child_cancelled'
SETTLEMENT_DEADLINE_EXPIRED class attribute 'settlement_deadline_expired'
WAITER_ABANDONED class attribute 'waiter_abandoned'

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementObservation

Boundary at which settlement evidence was observed.

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
CALLER_BOUNDARY class attribute 'caller_boundary'
LATE class attribute 'late'

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementObserver

Bounded non-recursive collector for interrupted artifact-write evidence.

ArtifactWriteSettlementObserver.__init__(*, max_operations: int=64) -> None
ArtifactWriteSettlementObserver.snapshot() -> tuple[ArtifactWriteSettlementEvidence, ...]

Return defensive copies of every retained record.

ArtifactWriteSettlementObserver.drain() -> tuple[ArtifactWriteSettlementEvidence, ...]

Return and clear retained records without abandoning active operations.

ArtifactWriteSettlementObserver.record_active_candidates() -> tuple[ArtifactWriteSettlementEvidence, ...]

Record bounded candidates when this observer’s caller stops waiting.

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementPhase

Last bounded phase observed for an artifact write.

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
PRE_DISPATCH class attribute 'pre_dispatch'
CONTENT class attribute 'content'
COMMIT class attribute 'commit'
CLEANUP class attribute 'cleanup'
RECONCILIATION class attribute 'reconciliation'
SETTLED class attribute 'settled'

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementRegistration

Operation-scoped observer registration for third-party artifact stores.

ArtifactWriteSettlementRegistration.__init__(*, observer: ArtifactWriteSettlementObserver | None, operation_id: str, artifact_id: str, store_identity_sha256: str, started_at: datetime, started_monotonic: float) -> None
ArtifactWriteSettlementRegistration.phase() -> ArtifactWriteSettlementPhase
ArtifactWriteSettlementRegistration.set_phase(phase: ArtifactWriteSettlementPhase) -> None
ArtifactWriteSettlementRegistration.record(*, status: ArtifactWriteSettlementStatus, phase: ArtifactWriteSettlementPhase | None=None, error: BaseException | None=None, failure_codes: Iterable[ArtifactWriteSettlementFailureCode]=(), backend_locator: str | None=None, backend_version: str | None=None, final: bool=True) -> ArtifactWriteSettlementEvidence

Record bounded caller-boundary or late evidence for this operation.

ArtifactWriteSettlementRegistration.close() -> None

Release observer ownership only after the operation is terminal.

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import ArtifactWriteSettlementStatus

Truthful terminal classifications for an interrupted artifact write.

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
COMMITTED class attribute 'committed'
ABSENT class attribute 'absent'
RECONCILIATION_REQUIRED class attribute 'reconciliation_required'

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import copy_artifact_write_settlement

Defensively reconstruct one exact settlement evidence model.

copy_artifact_write_settlement(value: ArtifactWriteSettlementEvidence) -> ArtifactWriteSettlementEvidence

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import record_artifact_write_settlement

Publish one third-party-store settlement record to diagnostics.

record_artifact_write_settlement(evidence: ArtifactWriteSettlementEvidence, *, error: BaseException | None=None) -> None

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import register_artifact_write_operation

Register a third-party write before dispatch so runtime timeouts can identify it.

register_artifact_write_operation(*, artifact_id: str, store_id: str, operation_id: str | None=None) -> ArtifactWriteSettlementRegistration

Release source · Runtime guarantees · Capability guides