events.iterate.com

Event type

events.iterate.com/capability-host/script-run-settled

The one durable settlement for a script obligation. Failures classify where execution stopped, whether script code may have run, and whether cancellation can prove external work ended.

Payload schema

executionIdstring

The obligation this settlement closes.

settlementobject
status: "succeeded"object
status"succeeded"
resultanyoptional
status: "failed"object
status"failed"
errorstring
failureKind"typecheck" | "runtime" | "deadline" | "expired" | "orphaned"
phase"typecheck" | "before-execution" | "execution" | "recovery"
executionMayHaveOccurredboolean
cancellation"not-applicable" | "external-work-may-continue"
Raw JSON schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "executionId": {
      "type": "string",
      "description": "The obligation this settlement closes."
    },
    "settlement": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "succeeded"
            },
            "result": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "status"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "failed"
            },
            "error": {
              "type": "string"
            },
            "failureKind": {
              "type": "string",
              "enum": [
                "typecheck",
                "runtime",
                "deadline",
                "expired",
                "orphaned"
              ]
            },
            "phase": {
              "type": "string",
              "enum": [
                "typecheck",
                "before-execution",
                "execution",
                "recovery"
              ]
            },
            "executionMayHaveOccurred": {
              "type": "boolean"
            },
            "cancellation": {
              "type": "string",
              "enum": [
                "not-applicable",
                "external-work-may-continue"
              ]
            }
          },
          "required": [
            "status",
            "error",
            "failureKind",
            "phase",
            "executionMayHaveOccurred",
            "cancellation"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "executionId",
    "settlement"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}