Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Saga Validate

workflow.saga_validate

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

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

Note
Validates a declarative saga graph and required compensation coverage.

Non-goals

  • Does not execute a saga
  • Does not prove compensation correctness or idempotency
  • Does not validate a message broker

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
stepsarrayYesSaga steps, 0 through 1001 closed objects; runtime accepts at most 1000.
modestringNoORCHESTRATION or CHOREOGRAPHY; omit it for ORCHESTRATION.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when the graph has no structural or compensation diagnostics.
modestringYesMode that was actually applied to this saga.
stepCountintegerYesHow many steps were declared, 0 through 1000.
topologicalOrderarrayYesStep ids in Kahn order, 0 through 1000 strings of 1 through 128 characters.
layersarrayYesParallel waves as arrays of step ids, 0 through 1000 layers.
rootsarrayYesStep ids with no declared dependsOn, in input order, 0 through 1000 strings.
terminalsarrayYesStep ids marked terminal, in input order, 0 through 1000 strings.
diagnosticsarrayYesClosed findings in a stable code order, 0 through 16 {code, count, message} objects.

API contract

POST /v1/execute
curl
curl -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}]}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
SAGA_STEP_INVALID400NoThe request payload failed this skill's input validation.
SAGA_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
WORKFLOW_IDENTIFIER_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "steps": [
    {
      "terminal": false,
      "actionRef": "ledger.debit",
      "compensationRef": "ledger.credit",
      "id": "debit"
    },
    {
      "id": "notify",
      "actionRef": "notify.send",
      "terminal": true,
      "compensationRef": "notify.void",
      "dependsOn": [
        "debit"
      ]
    }
  ]
}
Expected outputjson
{
  "valid": true,
  "diagnostics": [],
  "topologicalOrder": [
    "debit",
    "notify"
  ],
  "roots": [
    "debit"
  ],
  "layers": [
    [
      "debit"
    ],
    [
      "notify"
    ]
  ],
  "mode": "ORCHESTRATION",
  "stepCount": 2,
  "terminals": [
    "notify"
  ]
}
Tip
debit is the root; notify is the marked terminal.

A two-step cycle is a successful answer with valid false

Inputjson
{
  "steps": [
    {
      "actionRef": "a.run",
      "dependsOn": [
        "b"
      ],
      "compensationRef": "a.undo",
      "id": "a"
    },
    {
      "actionRef": "b.run",
      "dependsOn": [
        "a"
      ],
      "compensationRef": "b.undo",
      "id": "b"
    }
  ]
}
Expected outputjson
{
  "valid": false,
  "diagnostics": [
    {
      "code": "CYCLE",
      "count": 1,
      "message": "Steps depend on each other in a loop."
    }
  ],
  "topologicalOrder": [],
  "roots": [],
  "layers": [],
  "mode": "ORCHESTRATION",
  "stepCount": 2,
  "terminals": []
}
Tip
Cycles are diagnostics, not transport errors.
  • Reject a cyclic compensation graph
  • Confirm every required step has a compensationRef

Avoid for

  • Running the saga
  • Generating workflow code

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.

Tags

validationworkflow