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.
artifact_store_identity_sha256
Section titled “artifact_store_identity_sha256”from cayu.artifacts import artifact_store_identity_sha256Return the bounded diagnostic identity used by settlement evidence.
artifact_store_identity_sha256(store_id: str) -> strRelease source · Runtime guarantees · Capability guides
artifact_write_settlements
Section titled “artifact_write_settlements”from cayu.artifacts import artifact_write_settlementsRead bounded settlement evidence without invoking extension exception accessors.
artifact_write_settlements(error: BaseException) -> tuple[ArtifactWriteSettlementEvidence, ...]Release source · Runtime guarantees · Capability guides
ArtifactWriteSettlementEvidence
Section titled “ArtifactWriteSettlementEvidence”from cayu.artifacts import ArtifactWriteSettlementEvidenceBounded, non-authoritative evidence for one artifact-write invocation.
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 |
|---|---|---|
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, ...] |
() |
validate_bounded_identity (method)
Section titled “validate_bounded_identity (method)”ArtifactWriteSettlementEvidence.validate_bounded_identity(value: str | None, info) -> str | Nonevalidate_store_identity_sha256 (method)
Section titled “validate_store_identity_sha256 (method)”ArtifactWriteSettlementEvidence.validate_store_identity_sha256(value: str) -> strvalidate_timestamp (method)
Section titled “validate_timestamp (method)”ArtifactWriteSettlementEvidence.validate_timestamp(value: datetime, info) -> datetimecopy_failure_codes (method)
Section titled “copy_failure_codes (method)”ArtifactWriteSettlementEvidence.copy_failure_codes(value: object) -> tuple[object, ...]validate_shape (method)
Section titled “validate_shape (method)”ArtifactWriteSettlementEvidence.validate_shape() -> ArtifactWriteSettlementEvidencemodel_copy (method)
Section titled “model_copy (method)”ArtifactWriteSettlementEvidence.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> SelfReturn an independently validated immutable evidence record.
Release source · Runtime guarantees · Capability guides
ArtifactWriteSettlementFailureCode
Section titled “ArtifactWriteSettlementFailureCode”from cayu.artifacts import ArtifactWriteSettlementFailureCodeContent-free failure classifications retained by settlement evidence.
Bases: 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 |
|---|---|---|
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
ArtifactWriteSettlementObservation
Section titled “ArtifactWriteSettlementObservation”from cayu.artifacts import ArtifactWriteSettlementObservationBoundary at which settlement evidence was observed.
Bases: 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 |
|---|---|---|
CALLER_BOUNDARY |
class attribute |
'caller_boundary' |
LATE |
class attribute |
'late' |
Release source · Runtime guarantees · Capability guides
ArtifactWriteSettlementObserver
Section titled “ArtifactWriteSettlementObserver”from cayu.artifacts import ArtifactWriteSettlementObserverBounded non-recursive collector for interrupted artifact-write evidence.
init (method)
Section titled “init (method)”ArtifactWriteSettlementObserver.__init__(*, max_operations: int=64) -> Nonesnapshot (method)
Section titled “snapshot (method)”ArtifactWriteSettlementObserver.snapshot() -> tuple[ArtifactWriteSettlementEvidence, ...]Return defensive copies of every retained record.
drain (method)
Section titled “drain (method)”ArtifactWriteSettlementObserver.drain() -> tuple[ArtifactWriteSettlementEvidence, ...]Return and clear retained records without abandoning active operations.
record_active_candidates (method)
Section titled “record_active_candidates (method)”ArtifactWriteSettlementObserver.record_active_candidates() -> tuple[ArtifactWriteSettlementEvidence, ...]Record bounded candidates when this observer’s caller stops waiting.
Release source · Runtime guarantees · Capability guides
ArtifactWriteSettlementPhase
Section titled “ArtifactWriteSettlementPhase”from cayu.artifacts import ArtifactWriteSettlementPhaseLast bounded phase observed for an artifact write.
Bases: 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 |
|---|---|---|
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
ArtifactWriteSettlementRegistration
Section titled “ArtifactWriteSettlementRegistration”from cayu.artifacts import ArtifactWriteSettlementRegistrationOperation-scoped observer registration for third-party artifact stores.
init (method)
Section titled “init (method)”ArtifactWriteSettlementRegistration.__init__(*, observer: ArtifactWriteSettlementObserver | None, operation_id: str, artifact_id: str, store_identity_sha256: str, started_at: datetime, started_monotonic: float) -> Nonephase (property)
Section titled “phase (property)”ArtifactWriteSettlementRegistration.phase() -> ArtifactWriteSettlementPhaseset_phase (method)
Section titled “set_phase (method)”ArtifactWriteSettlementRegistration.set_phase(phase: ArtifactWriteSettlementPhase) -> Nonerecord (method)
Section titled “record (method)”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) -> ArtifactWriteSettlementEvidenceRecord bounded caller-boundary or late evidence for this operation.
close (method)
Section titled “close (method)”ArtifactWriteSettlementRegistration.close() -> NoneRelease observer ownership only after the operation is terminal.
Release source · Runtime guarantees · Capability guides
ArtifactWriteSettlementStatus
Section titled “ArtifactWriteSettlementStatus”from cayu.artifacts import ArtifactWriteSettlementStatusTruthful terminal classifications for an interrupted artifact write.
Bases: 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 |
|---|---|---|
COMMITTED |
class attribute |
'committed' |
ABSENT |
class attribute |
'absent' |
RECONCILIATION_REQUIRED |
class attribute |
'reconciliation_required' |
Release source · Runtime guarantees · Capability guides
copy_artifact_write_settlement
Section titled “copy_artifact_write_settlement”from cayu.artifacts import copy_artifact_write_settlementDefensively reconstruct one exact settlement evidence model.
copy_artifact_write_settlement(value: ArtifactWriteSettlementEvidence) -> ArtifactWriteSettlementEvidenceRelease source · Runtime guarantees · Capability guides
record_artifact_write_settlement
Section titled “record_artifact_write_settlement”from cayu.artifacts import record_artifact_write_settlementPublish one third-party-store settlement record to diagnostics.
record_artifact_write_settlement(evidence: ArtifactWriteSettlementEvidence, *, error: BaseException | None=None) -> NoneRelease source · Runtime guarantees · Capability guides
register_artifact_write_operation
Section titled “register_artifact_write_operation”from cayu.artifacts import register_artifact_write_operationRegister 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