CHEESE APIDurable runs

Results, errors, and retries

Consume partial results safely without losing failed items or duplicating commits.

Suggest an edit

Results become readable as items commit. order=completion is safe for resumable partial consumption while a run is active. Each entry retains input_index. order=input is available after the run is terminal and provides stable original order.

for item in dmc.runs.iter_results(run.id):
    if item.ok:
        print(item.id, item.result["results"])
    else:
        print(item.id, item.error["code"])

An item error includes code, message, field, retryable, attempt_count, and run/item/request correlation IDs. completed_with_errors is a successful lifecycle terminal state with one or more failed/cancelled items—including when every item fails deterministically. It is not transformed into an exception that hides successful siblings.

Workers use leases and visibility timeouts. A crash can redeliver uncommitted work, but commits are idempotent by run/item/canonical hash and cannot duplicate results or counts. Only transient worker, dependency, and explicitly retryable timeout failures receive bounded exponential retry. Invalid structures, unsupported capabilities, and exact empty results are not retried.

The first release uses cursor-paginated JSON rather than filesystem paths or downloadable artifacts.