Contract · OpenAI Platform API · all_requests_succeeded
What does openai.batch.all_requests_succeeded prove?
Last reviewed 2026-09-05Skill version 0.1.0Provisional
Prove that every request of the batch job succeeded. A batch that reaches the status completed is not a batch in which every request succeeded. This level reads request_counts and refuses a batch with a failed count above zero.
Run every request of the input file as one batch job, and get a result for each one.
What is the subject and the action?
Member
Value
Subject type
openai.batch
Subject identity
batch_id = $action.result.id
Canonical effect
ai.batch_job_start
Provider operation
POST /batches
Idempotency
none, retry is not safe
How does the evidence correlate with this operation?
Strategy
Assurance
Keys
Required
resource_id
strong
batch_id from $action.result.id
yes
fingerprint
weak
input_file_id from $input.input_file_id; endpoint from $input.endpoint
no
Which evidence does the contract require?
Minimum evidence level E2. An independent channel is required. Minimum channels: 1.
Channel
Level
Independence
Verifier
Description
batch_readback
E2
provider readback
http
Read the batch from the provider. A condition path is $observed.batch_readback.status, and a second one is $observed.batch_readback.request_counts.failed.
batch_completed_events
E3
provider event
webhook
The batch.completed events of this batch. The payload carries the identifier of the batch and no other member of it, so the count states the end of the job and never the result of one request. The webhook verifier returns {events, count, latest, earliest, types, duplicates_dropped}.
Which conditions must all hold for VERIFIED?
Condition
Meaning
Path
Operator
Expected
Evidence
batch_present
The provider holds the batch with the returned identifier.
$observed.batch_readback.id
eq
$action.result.id
batch_readback
batch_status_completed
The batch reached the status completed. The published table states that the results are ready.
$observed.batch_readback.status
eq
completed
batch_readback
batch_input_file_matches
The batch reads the input file that the intent named.
$observed.batch_readback.input_file_id
eq
$input.input_file_id
batch_readback
batch_created_in_window
The provider created the batch after the operation started. OpenAI writes created_at in seconds since the epoch.
$observed.batch_readback.created_at
time_after
$operation.created_at
batch_readback
batch_completed_event
At least one batch.completed event names this batch. The payload carries the identifier only, so this condition states the end of the job and nothing about one request.
$observed.batch_completed_events.count
gte
1
batch_completed_events
batch_no_request_failed
No request of the batch failed. The published description of the member is the number of requests that have failed.
$observed.batch_readback.request_counts.failed
eq
0
batch_readback
batch_holds_requests
The batch holds at least one request. An empty batch has no failed request and proves no work.
$observed.batch_readback.request_counts.total
gt
0
batch_readback
batch_completed_every_request
The number of requests that completed successfully equals the number of requests in the batch.
$observed.batch_readback.request_counts.completed
eq
$observed.batch_readback.request_counts.total
batch_readback
Which conditions give CONTRADICTED?
Condition
Class
Reason
Path
Operator
Expected
batch_on_wrong_input_file
wrong subject
The batch reads a different input file than the intent named.
$observed.batch_readback.input_file_id
ne
$input.input_file_id
batch_on_wrong_endpoint
wrong subject
The batch calls a different endpoint than the intent named.
$observed.batch_readback.endpoint
ne
$input.endpoint
batch_predates_operation
pre existing state
The batch is older than the operation. It proves nothing.
$observed.batch_readback.created_at
time_before
$operation.created_at
batch_requests_failed
partial completion
The batch finished, and requests inside it failed. Do not retry the batch: the requests that succeeded would run a second time. Ask a person.
$observed.batch_readback.request_counts.failed
gt
0
Which observed states map to a verdict before completion?
Rule
Match
Verdict
Reason
completed_with_failed_requests
($observed.batch_readback.status eq "completed") and ($observed.batch_readback.request_counts.failed gt 0)
CONTRADICTED
The batch finished, and requests inside it failed. A retry would run the requests that succeeded a second time. Ask a person.
terminal_failure
$observed.batch_readback.status in ["failed","expired"]
FAILED
The provider ended the batch without results. Read the errors of the input file.
cancelled
$observed.batch_readback.status eq "cancelled"
CONTRADICTED
A person or an agent cancelled the batch. Ask a person before a new batch runs.
still_running
$observed.batch_readback.status in ["validating","in_progress","finalizing","cancelling"]
PENDING
The batch has not reached a terminal status. The runtime observes again later.
How long does the runtime observe?
Timing member
Value
Initial delay
1000 ms
Poll interval
30000 ms
Backoff
exponential factor 2, max 900000 ms
Maximum attempts
120
Timeout
93600000 ms
Stale read window
60000 ms
On timeout
UNVERIFIABLE (evidence_unavailable_before_timeout), escalated to a person