Execution & Trust
MIFY classifies every workflow execution by how much you can trust its reproducibility.
Execution Classes
Section titled “Execution Classes”Every node belongs to one of three classes:
| Class | Behavior | Examples |
|---|---|---|
| Deterministic | Same input always produces same output | Template, JavaScript, Route If |
| Probabilistic | Output may vary (AI models) | Chat, Embed, Image Generate |
| Opaque | External platform execution (black box) | Dify App, Flowise Flow |
Trust Levels
Section titled “Trust Levels”Trust level is determined by the “least trusted” node in your workflow:
| Trust Level | When | Guarantees |
|---|---|---|
| Trusted | All nodes are deterministic | Full caching, safe replay, authoritative comparisons |
| Semi-Trusted | Contains probabilistic (AI) nodes | Partial caching, replay with warnings |
| Opaque | Contains external platform nodes | No caching, unsafe replay |
Rigor Modes
Section titled “Rigor Modes”| Mode | Use Case | What It Does |
|---|---|---|
| Experimental (default) | Development, iteration | Minimal overhead, fast execution |
| Audited | Compliance, regulated workflows | Full audit trail, integrity hashing, immutable logs |
Execution Lifecycle
Section titled “Execution Lifecycle”Every workflow run progresses through these states:
pending → running → completed → failed → cancelled waiting (paused for HITL)Comparison & Replay
Section titled “Comparison & Replay”- Baselines: Set a reference execution to compare against
- Side-by-side comparison: Diff two runs to see what changed
- Replay: Re-run a workflow with the same inputs (deterministic nodes produce identical results)
Batch Processing
Section titled “Batch Processing”Run workflows at scale:
- Submit batches with configurable concurrency
- Pause, resume, or cancel batches
- Stop-on-error to halt on first failure
- Progress tracking per batch item
Executor V2 (Control Flow)
Section titled “Executor V2 (Control Flow)”The Executor V2 cutover adds typed control-flow handlers:
- Loop / Map — iterate over arrays
- Switch / If — branching with case-matched routing
- Fanout / Join — parallel-branch execution with results merged
Internally backed by the graphlib bridge for graph semantics. Feature-flagged behind EXECUTOR_V2.
DelegatedExecutor
Section titled “DelegatedExecutor”Some nodes delegate execution to external runtimes — for example, ComfyUI workflows run on a GPU host rather than inside the MIFY API process. The DelegatedExecutor interface provides hybrid resolution: MIFY decides whether a node runs in-process or is delegated based on executionRequirements annotations on each node type.
Workflow Readiness Gate
Section titled “Workflow Readiness Gate”Before any execution, MIFY runs a canonical readiness probe (GET /api/workflows/readiness) to verify:
- Connected accounts are still authorized (Gmail, Outlook, etc.)
- Required credentials exist
- Quota is available
- Models are reachable
If readiness fails, the canvas blocks execution and shows a setup hint.
Graph Versioning
Section titled “Graph Versioning”Every published workflow has a version history:
- Publish — capture a snapshot in the GraphVersion table
- Diff — line-level diff against a prior version (uses diff-match-patch)
- Archive / Restore — roll back to any previous version
- Audit — every transition is logged
UI: /graphs/[graphId]/versions — VersionPicker, VersionDiff, LifecycleControls.
Durable Execution (Temporal)
Section titled “Durable Execution (Temporal)”Long-running workflows can run on Temporal instead of the in-process SimpleExecutor. Every node executes as a Temporal Activity, so the runtime:
- Survives process restarts — pick up exactly where you left off
- Scales horizontally — workers can be added without state-loss
- Pauses and resumes at any point
- Records full event history — every input, output, and decision is captured
Time-Travel
Section titled “Time-Travel”Because the entire execution history is replayable, you can:
- Replay from any prior step with the same inputs (deterministic-node guarantees apply)
- Fork from a chosen step with overridden inputs to explore alternatives
- Inspect intermediate state at any point in history
UI: /admin/temporal/durable for the run list; /workflows/[graphId]/runs/[runId] for the run detail with time-travel controls.
Switching a workflow to durable mode is opt-in via workflow settings (/graphs/[graphId]/settings). Short-running workflows continue to use the SimpleExecutor for lower latency.
Partial Execution
Section titled “Partial Execution”When you edit a workflow and run it again, MIFY re-runs only the dirty nodes (and their downstream dependents) — not the entire DAG.
How it works:
- Mify diffs your current canvas against the last successful run
- Marks every changed node + its downstream dependents as “dirty”
- For unchanged subgraphs, it returns cached outputs from
PartialExecutionCache - Only the dirty nodes actually execute
You’ll see the DirtyNodesIndicator on canvas highlighting nodes that will re-run. If a node’s cached output is too large to fit in the cache row, an OversizedOutputBadge appears and that node will fully re-run.
Admin override: POST /api/canvas-execute/admin/cache-clear purges the cache and forces a full re-run on next execute.