Saga Validate
workflow.saga_validate
Overview
You send up to 1000 steps with id, dependsOn, actionRef, optional compensationRef, optional and terminal flags, plus mode ORCHESTRATION or CHOREOGRAPHY. The answer is valid, topological order, layers, roots, terminals and diagnostics for cycles, unreachable steps, missing dependencies, uncompensated required steps and duplicate action references. This does not execute a saga. A successful call costs 1 execution credit.
Saga authors need a published graph and compensation check, not a workflow engine.
Reliability
Graph problems return valid false. SAGA_LIMIT_EXCEEDED — trigger: more than 1000 steps; retryable: no; next: split the graph. SAGA_STEP_INVALID — trigger: a step cannot be parsed as a graph node; retryable: no; next: fix the step. WORKFLOW_IDENTIFIER_INVALID — trigger: an id is empty, padded or too long; retryable: no; next: fix the id.
Context footprint
Returns ids and diagnostic counts, never action payloads. A successful call costs 1 execution credit.
When to use it
When a declared saga must be checked for cycles, reachability and compensation coverage.
When you need to execute the saga or prove compensating actions are correct.
Powered by Squillify's shared iterative graph engine. No workflow runtime is involved.
Scope
Non-goals
- Does not execute a saga
- Does not prove compensation correctness or idempotency
- Does not validate a message broker
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| steps | array | Yes | Saga steps, 0 through 1001 closed objects; runtime accepts at most 1000. |
| mode | string | No | ORCHESTRATION or CHOREOGRAPHY; omit it for ORCHESTRATION. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when the graph has no structural or compensation diagnostics. |
| mode | string | Yes | Mode that was actually applied to this saga. |
| stepCount | integer | Yes | How many steps were declared, 0 through 1000. |
| topologicalOrder | array | Yes | Step ids in Kahn order, 0 through 1000 strings of 1 through 128 characters. |
| layers | array | Yes | Parallel waves as arrays of step ids, 0 through 1000 layers. |
| roots | array | Yes | Step ids with no declared dependsOn, in input order, 0 through 1000 strings. |
| terminals | array | Yes | Step ids marked terminal, in input order, 0 through 1000 strings. |
| diagnostics | array | Yes | Closed findings in a stable code order, 0 through 16 {code, count, message} objects. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"workflow.saga_validate","input":{"steps":[{"id":"debit","actionRef":"ledger.debit","compensationRef":"ledger.credit"},{"id":"notify","dependsOn":["debit"],"actionRef":"notify.send","compensationRef":"notify.void","terminal":true}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("workflow.saga_validate", {"steps":[{"terminal":false,"actionRef":"ledger.debit","compensationRef":"ledger.credit","id":"debit"},{"id":"notify","actionRef":"notify.send","terminal":true,"compensationRef":"notify.void","dependsOn":["debit"]}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| SAGA_STEP_INVALID | 400 | No | The request payload failed this skill's input validation. |
| SAGA_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| WORKFLOW_IDENTIFIER_INVALID | 400 | No | The request payload failed this skill's input validation. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not execute a saga
- Does not prove compensation correctness or idempotency
- Does not validate a message broker
- Running the saga
- Generating workflow code
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "workflow.saga_validate",
"input": {
"steps": [
{
"terminal": false,
"actionRef": "ledger.debit",
"compensationRef": "ledger.credit",
"id": "debit"
},
{
"id": "notify",
"actionRef": "notify.send",
"terminal": true,
"compensationRef": "notify.void",
"dependsOn": [
"debit"
]
}
]
}
}Examples
A two-step linear saga with compensation on both steps
{
"steps": [
{
"terminal": false,
"actionRef": "ledger.debit",
"compensationRef": "ledger.credit",
"id": "debit"
},
{
"id": "notify",
"actionRef": "notify.send",
"terminal": true,
"compensationRef": "notify.void",
"dependsOn": [
"debit"
]
}
]
}{
"valid": true,
"diagnostics": [],
"topologicalOrder": [
"debit",
"notify"
],
"roots": [
"debit"
],
"layers": [
[
"debit"
],
[
"notify"
]
],
"mode": "ORCHESTRATION",
"stepCount": 2,
"terminals": [
"notify"
]
}A two-step cycle is a successful answer with valid false
{
"steps": [
{
"actionRef": "a.run",
"dependsOn": [
"b"
],
"compensationRef": "a.undo",
"id": "a"
},
{
"actionRef": "b.run",
"dependsOn": [
"a"
],
"compensationRef": "b.undo",
"id": "b"
}
]
}{
"valid": false,
"diagnostics": [
{
"code": "CYCLE",
"count": 1,
"message": "Steps depend on each other in a loop."
}
],
"topologicalOrder": [],
"roots": [],
"layers": [],
"mode": "ORCHESTRATION",
"stepCount": 2,
"terminals": []
}Recommended use cases
- Reject a cyclic compensation graph
- Confirm every required step has a compensationRef
Avoid for
- Running the saga
- Generating workflow code
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.