Skip to content

OPEN-57

Exceeding the iteration budget fails the run with MAX_ITERATIONS_EXCEEDED, published in terminalReason.

What was open

SG-14 said a run that exceeds its iteration budget reports the status max_iterations_exceeded. It did not say whether that is a stored run status beside completed, failed and cancelled, or a reason reported beside a terminal status. A client that knows three terminal statuses treats a fourth as still running and keeps polling. Nor did any rule give a failed run a place to say why it failed.

Decision

The run's terminal status is failed, so the terminal statuses stay those of INT-11 and PIPE-10. The job of the node whose state update would exceed the maximum is recorded as failed with the code MAX_ITERATIONS_EXCEEDED and the maximum, the count the update would have reached and the node; the update is not applied. The failure escapes the node as ERR-3 says: it cannot travel an error edge and is not retried, since otherwise ERR-9 would complete a run with no unhandled failure, or a handler inside the loop would trip the budget again every round. The remaining work is handled as ORC-11 handles an unhandled failure. The run is never paused and offers no resume handle. SG-14's run-wide budget stays distinct from SG-7's per-loop round budget, whose exhaustion only ends the loop. PIPE-1 gains terminalReason on the run document and the status document, and the completion announcement carries the same value: null unless the run reached a terminal status for a reason a rule names by code, and then an object with that code and its details. The member is general, not specific to the budget or to failure: INT-18's INTERRUPT_EXPIRED and INTERRUPT_CANCELLED use it too, so a run has one place that says why it ended and later reasons need no new member.

Rules affected