Prove that every request of the Message Batch succeeded. A batch that ended is not a batch whose requests succeeded. The level reads request_counts and refuses a batch that holds an error, an expiry, or a cancellation.

Contract identity.
FactValue
Contract idanthropic.message_batch.all_succeeded
Version1.0.0
Hash84f423d28d2f9a93
Completion levelall_succeeded
PublisherBuilt and signed by Provely.
CertificationProvisional
SkillAnthropic Claude API 0.1.0
Valid for provider API versions2023-06-01

What is the intent?

Submit the message requests as one batch and get a message for each one.

What is the subject and the action?

MemberValue
Subject typeanthropic.message_batch
Subject identitymessage_batch_id = $action.result.id
Canonical effectai.message_batch_start
Provider operationPOST /v1/messages/batches
Idempotencynone, retry is not safe

How does the evidence correlate with this operation?

StrategyAssuranceKeysRequired
resource_idstrongmessage_batch_id from $action.result.idyes

Which evidence does the contract require?

Minimum evidence level E2. An independent channel is required. Minimum channels: 1.

ChannelLevelIndependenceVerifierDescription
message_batch_readbackE2provider readbackhttpRead the Message Batch from the provider. A condition path is $observed.message_batch_readback.request_counts.succeeded. The read states no provider API version, because Anthropic returns no version header.

Which conditions must all hold for VERIFIED?

ConditionMeaningPathOperatorExpectedEvidence
batch_presentThe provider holds the Message Batch with the returned identifier.$observed.message_batch_readback.ideq$action.result.idmessage_batch_readback
batch_no_request_still_processingThe member request_counts.processing is zero. Every terminal count is zero until the whole batch ends, so a count of successes alone proves nothing.$observed.message_batch_readback.request_counts.processingeq0message_batch_readback
batch_every_request_succeededThe member request_counts.succeeded equals the request count of the intent. Every request of the batch has a message result.$observed.message_batch_readback.request_counts.succeededeq$input.request_countmessage_batch_readback
batch_no_request_erroredThe member request_counts.errored is zero.$observed.message_batch_readback.request_counts.erroredeq0message_batch_readback
batch_no_request_canceledThe member request_counts.canceled is zero. A canceled batch also reports the status ended.$observed.message_batch_readback.request_counts.canceledeq0message_batch_readback
batch_no_request_expiredThe member request_counts.expired is zero. A batch that reached the 24-hour expiration sent those requests to no model.$observed.message_batch_readback.request_counts.expiredeq0message_batch_readback
batch_ended_in_windowThe provider ended the batch after the operation started.$observed.message_batch_readback.ended_attime_after$operation.created_atmessage_batch_readback
batch_created_in_windowThe provider created the batch after the operation started.$observed.message_batch_readback.created_attime_after$operation.created_atmessage_batch_readback

Which conditions give CONTRADICTED?

ConditionClassReasonPathOperatorExpected
batch_predates_operationpre existing stateThe Message Batch is older than the operation. It proves nothing.$observed.message_batch_readback.created_attime_before$operation.created_at
batch_completed_more_requests_than_intentwrong subjectThe batch completed more requests than the intent named. It is not the batch that the intent described.$observed.message_batch_readback.request_counts.succeededgt$input.request_count
batch_processing_count_exceeds_intentduplicate side effectThe batch holds more requests than the intent named. Anthropic bills each of them. Do not retry.$observed.message_batch_readback.request_counts.processinggt$input.request_count

Which observed states map to a verdict before completion?

RuleMatchVerdictReason
batch_canceled$observed.message_batch_readback.request_counts.canceled gt 0CONTRADICTEDA caller canceled the batch. Anthropic sent those requests to no model.
batch_expired$observed.message_batch_readback.request_counts.expired gt 0FAILEDThe batch reached the 24-hour expiration before Anthropic sent every request to a model.
batch_errored$observed.message_batch_readback.request_counts.errored gt 0FAILEDA request of the batch encountered an error, and Anthropic created no message.
still_processing$observed.message_batch_readback.processing_status in ["in_progress","canceling"]PENDINGThe Message Batch has not ended. The runtime observes again later.

How long does the runtime observe?

Timing memberValue
Initial delay1000 ms
Poll interval5000 ms
Backoffexponential factor 2, max 60000 ms
Maximum attempts40
Timeout90000000 ms
Stale read window20000 ms
On timeoutUNVERIFIABLE (evidence_unavailable_before_timeout), escalated to a person

Where do these rules come from?

Can anthropic.message_batch.all_succeeded return VERIFIED from the action response alone?

No. The minimum evidence level is E2. The action response is E1. The completion conditions read message_batch_readback.

What happens after the timeout?

The verdict is UNVERIFIABLE with the reason evidence_unavailable_before_timeout. The operation goes to a person for review.