Checkpoint
Marks a guaranteed durability point in the workflow execution.
Meant to skip replays of an operation by remembering an idempotency key in the workflow key-value state. In the current runtime it always leaves through error with logger.debug is not a function, before reading or writing any state.
A Checkpoint acts as a "Save Game" spot. If the workflow crashes or is restarted, it can resume from the last successful checkpoint rather than restarting from the beginning. It also supports Idempotency, identifying duplicate requests to prevent double-processing.
Behavior:
- First Run: Persists the checkpoint and triggers 'success'.
- Replay: Detects the checkpoint exists and triggers 'skip' (or returns the previous output).
- Hashing: Can optionally hash the input payload to ensure it's the exact same request.
Use Cases:
- Between charging a credit card and shipping a product.
- Ensuring an email is sent exactly once.
How it works
- Merges the input item with the resolved config (config wins).
- Leaves through
errorwithMissing 'idempotency_key'when the key is empty. - Builds the state key
chk:<idempotency_key>; withpayload_hash_modeit appends:<md5>. - Calls
logger.debug(), which throws; the worker catches it and leaves througherror. The steps below are not reached today. - Looks the key up in
$input.$kv_state. Found: leaves throughskipwith the stored payload. - Not found: leaves through
successwith{}and asks the backend to save{ timestamp, payload }under the key throughmeta.kv_state.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-checkpoint-order",
"label": "Checkpoint order",
"operator_slug": "ops.checkpoint",
"operator_version": "1.0.0",
"config": {
"idempotency_key": "{{ $json.order_id }}",
"payload_hash_mode": false
}
}{
"ok": false,
"port": "error",
"data": {
"port": "error",
"error": "logger.debug is not a function"
}
}Configuration
-
payload_hash_modeboolean Optional -
If true, the input payload must match exactly to be considered a duplicate replay.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
idempotency_key - Not in the config schema (only in the input contract), but read from the node config or, when unset there, from the input item:
idempotency_key. -
payload_hash_mode - The hash is computed over the worker context
payload, which the runtime does not set, so it is always the MD5 of{}: the suffix never distinguishes one payload from another.
Output ports
success default Not reached in the current runtime: the logger.debug() call fails first. Shown with the shape the code builds.
{}skip Not reached in the current runtime: the logger.debug() call fails first. Shown with the shape the code builds.
{
"order_id": "ord_123",
"total": 129.9
}error Every run today. The output is the whole returned object, { port, error }, because the worker sets no data.
{
"port": "error",
"error": "logger.debug is not a function"
}In expressions
What a later node can read from this node's output with $("Checkpoint").item.json.<path> (write your node's label instead of Checkpoint). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through success, from the output shown in Ports.
This node declares no output fields.
Errors
| Message | Port | Cause and fix |
|---|---|---|
logger.debug is not a function | error | The worker calls logger.debug(), which the runtime logger does not provide. It happens on every run; there is no configuration that avoids it. |
Missing 'idempotency_key' | error | idempotency_key is set neither on the node nor in the input item. |
Input contract
-
idempotency_keystring Required -
Unique identifier for this specific operation execution.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "ops.checkpoint",
"name": "Checkpoint",
"category": "ops",
"version": "1.0.0",
"description": "Marks a guaranteed durability point in the workflow execution.\n\n A Checkpoint acts as a \"Save Game\" spot. If the workflow crashes or is restarted, it can resume from the last successful checkpoint rather than restarting from the beginning. It also supports Idempotency, identifying duplicate requests to prevent double-processing.\n\n **Behavior:**\n - **First Run:** Persists the checkpoint and triggers 'success'.\n - **Replay:** Detects the checkpoint exists and triggers 'skip' (or returns the previous output).\n - **Hashing:** Can optionally hash the input payload to ensure it's the *exact same* request.\n\n **Use Cases:**\n - Between charging a credit card and shipping a product.\n - Ensuring an email is sent exactly once.",
"capabilities": [
"reliability",
"recovery",
"idempotency",
"checkpoint"
],
"config_schema": {
"type": "object",
"properties": {
"payload_hash_mode": {
"type": "boolean",
"default": false,
"title": "Strict Payload Hashing",
"description": "If true, the input payload must match exactly to be considered a duplicate replay."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"idempotency_key": {
"type": "string",
"description": "Unique identifier for this specific operation execution."
}
},
"required": [
"idempotency_key"
]
},
"output_contract_schema": {
"type": "object",
"description": "Empty on success, or previous result on skip.",
"properties": {}
},
"ports": [
{
"port_id": "success",
"label": "Success",
"is_default": true,
"description": "Checkpoint created. Continue execution."
},
{
"port_id": "skip",
"label": "Skip (Duplicate)",
"description": "Checkpoint already exists. Skipping downstream logic."
},
{
"port_id": "error",
"label": "Error",
"description": "Failed to persist."
}
],
"execution_mode": "sync",
"tags": [
"reliability",
"recovery",
"idempotency"
],
"is_stateful": true,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"payload_hash_mode": {
"type": "boolean",
"default": false,
"title": "Strict Payload Hashing",
"description": "If true, the input payload must match exactly to be considered a duplicate replay."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"idempotency_key": {
"type": "string",
"description": "Unique identifier for this specific operation execution."
}
},
"required": [
"idempotency_key"
]
}{
"type": "object",
"description": "Empty on success, or previous result on skip.",
"properties": {}
}[
{
"port_id": "success",
"label": "Success",
"is_default": true,
"description": "Checkpoint created. Continue execution."
},
{
"port_id": "skip",
"label": "Skip (Duplicate)",
"description": "Checkpoint already exists. Skipping downstream logic."
},
{
"port_id": "error",
"label": "Error",
"description": "Failed to persist."
}
]Execution
- Execution
sync- Stateful
- Yes
- Retries (
retryOnFail) - No
- Capabilities
reliabilityrecoveryidempotencycheckpoint- Tags
reliabilityrecoveryidempotency
Notes and limits
- The worker calls
logger.debug(), which the runtime logger does not provide (it offersinfo,warning,error,logandsuccess). The call throws on every run. - Key-value state lives in the workflow definition metadata (
kv_state), shared by every run of that workflow. The backend injects it at run start as$input.$kv_stateonly when the run uses the draft graph; runs of a published version receive none. Writes (meta.kv_stateof each step) are merged into the metadata after the run ends, so later nodes of the same run do not see them. There is no expiry. - The worker returns its fields at the top level instead of under
data, so the engine uses the whole returned object,portincluded, as the node output. - Leaving through
errordoes not fail the run: the engine follows the edges wired toerror, and if there are none the branch simply ends. - The
executionsettings (retryOnFail,maxTries,waitBetweenTries,continueOnFail,timeout_ms) are accepted, but neither this worker nor the engine applies them.
Reviewed against the orchestrator code · 31e874b · 2026-11-26