Description
Walk supplied transitions with an explicit per-state visit budget, retaining the first violation or terminal/step-limit stop and whole-graph cycle status.
A workflow or scheduling fixture makes ordering, dependencies, capacity, and timing explicit. Returning both the constructed records and their checks helps consumers distinguish a valid arrangement from a simulated failure case.
Walk supplied transitions with an explicit per-state visit budget, retaining the first violation or terminal/step-limit stop and whole-graph cycle status.
When to use this tool
Use this generator to create reproducible workflow loop budget fixture cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply states, transitions, start, visitBudget, steps in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read graphHasCycle, trace, visits, finalState, stop. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Count the initial state as its first visit, then randomly choose outgoing transitions up to the step limit. Record each destination’s visit count before and after the move, including the first move that exceeds visitBudget, and stop at that violation, a terminal state or the step limit.1
Delegated operations used for this result: cycle checker. Their calculation or parsing conventions apply to the corresponding result fields.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| states | States | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 128.; minimum items 1; maximum items 16. |
| transitions | Transitions | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 64. |
| transitions[].from | From | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| transitions[].to | To | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| start | Start | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| visitBudget | Visit Budget | Required. Safe integer; minimum 1; maximum 64. |
| steps | Steps | Required. Safe integer; minimum 1; maximum 64. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| graphHasCycle | Graph Has Cycle | Required. Boolean. |
| trace | Trace | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 64. |
| trace[].from | From | Required. Text; maximum UTF-16 length 65536. |
| trace[].to | To | Required. Text; maximum UTF-16 length 65536. |
| trace[].visitsBefore | Visits Before | Required. Safe integer; minimum 0; maximum 64. |
| trace[].visitsAfter | Visits After | Required. Safe integer; minimum 1; maximum 65. |
| trace[].violation | Violation | Required. Boolean. |
| visits | Visits | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 16. |
| visits[].state | State | Required. Text; maximum UTF-16 length 65536. |
| visits[].count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 0; maximum 65. |
| finalState | Final State | Required. Text; maximum UTF-16 length 65536. |
| stop | Stop | Required. Text; one of "budget", "terminal", "step-limit". |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"states": [
"a"
],
"transitions": [
{
"from": "a",
"to": "a"
}
],
"start": "a",
"visitBudget": 2,
"steps": 5,
"seed": 42
},
"output": {
"graphHasCycle": true,
"trace": [
{
"from": "a",
"to": "a",
"visitsBefore": 1,
"visitsAfter": 2,
"violation": false
},
{
"from": "a",
"to": "a",
"visitsBefore": 2,
"visitsAfter": 3,
"violation": true
}
],
"visits": [
{
"state": "a",
"count": 3
}
],
"finalState": "a",
"stop": "budget",
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- graphHasCycle describes the whole supplied graph, including unreachable cycles. A budget violation is recorded rather than silently prevented; a graph cycle does not guarantee that the sampled walk encounters it.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Workflow Audit Trail Dataset Generator
Walk a supplied workflow graph for an exact event count with monotonic synthetic timestamps, actors, state frequencies, and a separately labeled invalid transition.
- Random Workflow Dead-End Fixture Generator
Plant an unreachable state or nonterminal trap in a supplied workflow graph and retain start reachability and terminal-completion labels.