Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/server/src/plugins/Workflows.testkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ export const fixture = Effect.gen(function* () {
holdCheck: () => {
checkExecution = Effect.never;
},
/** Result the next check commands return. */
setCheck: (result: { exitCode: number; timedOut: boolean; stdout: string }) => {
checkExecution = Effect.succeed({ ...result, stderr: "" });
},
threads,
restart: Effect.gen(function* () {
yield* runtime.close;
Expand Down
561 changes: 561 additions & 0 deletions apps/server/src/plugins/WorkflowsDecisions.test.ts

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions apps/server/src/plugins/WorkflowsValidation.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const definition = Schema.decodeUnknownSync(Definition)({
id: "complexity",
revision: 1,
title: "Complexity",
entry: "d0",
// The source runs first so every decision has a result to read.
entry: "source",
atLimit: "gate",
nodes: [
...Array.from({ length: count }, (_, index) => {
Expand All @@ -38,7 +39,7 @@ const definition = Schema.decodeUnknownSync(Definition)({
runtimeMode: "approval-required",
instruction: "Source",
report: { fields: [{ name: "ready", type: "boolean", required: true }] },
next: { to: "gate" },
next: { to: "d0" },
},
{ id: "gate", kind: "human", title: "Gate", approve: { to: "end" }, changes: { to: "end" } },
{ id: "end", kind: "end", title: "End", outcome: "completed" },
Expand Down
Loading
Loading