@fluidgrids/workflows 2026.1027.0 → 2026.1028.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +170 -18
- package/dist/activation-BBh1p82z.d.cts +57 -0
- package/dist/activation-DnhG7SmF.d.ts +57 -0
- package/dist/assemble-BLqQ8lSu.d.cts +39 -0
- package/dist/assemble-DWgaXHd-.d.ts +39 -0
- package/dist/chunk-2DP2Y6EU.cjs +832 -0
- package/dist/chunk-2J6TF7YI.cjs +86 -0
- package/dist/chunk-3FOTFQ3J.js +1622 -0
- package/dist/chunk-4LYSEANA.js +199 -0
- package/dist/{chunk-KUTMY2IO.cjs → chunk-57MSZ24T.cjs} +162 -98
- package/dist/{chunk-BWSLWF2E.js → chunk-5HDSBTBX.js} +99 -32
- package/dist/chunk-623FVQSN.cjs +251 -0
- package/dist/{chunk-4DPEGDPW.js → chunk-6FSHT5IL.js} +4 -4
- package/dist/{chunk-REV7ZOA4.js → chunk-7AAZGVKD.js} +1 -35
- package/dist/chunk-7NQ37GZU.js +73 -0
- package/dist/chunk-ABFZWYHT.js +612 -0
- package/dist/{chunk-SS4LT2IP.js → chunk-BD7ZPG53.js} +5 -10
- package/dist/chunk-BO6OVILK.js +79 -0
- package/dist/chunk-C5OLWZ42.js +245 -0
- package/dist/chunk-CBL5JSCC.cjs +75 -0
- package/dist/{chunk-LSKSBVL4.cjs → chunk-CPDK3K5N.cjs} +6 -6
- package/dist/chunk-CSNWNFKU.cjs +1635 -0
- package/dist/chunk-DJYMDLV5.js +227 -0
- package/dist/{chunk-X4HKU3MX.js → chunk-E2VK7J2C.js} +3 -1
- package/dist/chunk-FMSW2HDF.cjs +267 -0
- package/dist/chunk-FQIHX7YI.cjs +80 -0
- package/dist/chunk-FR7KYWRO.cjs +41 -0
- package/dist/{chunk-AU3YW7FZ.cjs → chunk-GBQ33SIZ.cjs} +46 -51
- package/dist/{chunk-RRQ5HOBF.cjs → chunk-GVTZMA5C.cjs} +4 -4
- package/dist/chunk-H7KEVW2M.js +816 -0
- package/dist/chunk-HR3BN4C4.cjs +27 -0
- package/dist/chunk-IISBRUWJ.js +13 -0
- package/dist/chunk-JD2VQIDZ.cjs +15 -0
- package/dist/{chunk-PL73GJR4.js → chunk-JZ4TOOLN.js} +1 -1
- package/dist/chunk-L24YIZY7.cjs +207 -0
- package/dist/chunk-LNUQE6D6.js +39 -0
- package/dist/{chunk-BYJ7QTLY.cjs → chunk-NEIUQASE.cjs} +13 -13
- package/dist/chunk-P6TA5EZT.cjs +634 -0
- package/dist/chunk-PDHLTDZB.js +72 -0
- package/dist/chunk-PMCM2OH4.js +46 -0
- package/dist/chunk-PZCVF76Q.cjs +868 -0
- package/dist/{chunk-GO34UHSY.js → chunk-QAN5MZEM.js} +3 -3
- package/dist/{chunk-27HASETB.cjs → chunk-QKZL3ONM.cjs} +3 -1
- package/dist/chunk-SAENRNBJ.cjs +52 -0
- package/dist/{chunk-LMX35GNQ.js → chunk-SMCANK3F.js} +5 -4
- package/dist/{chunk-IZQNUNSU.cjs → chunk-SX2PNKKT.cjs} +18 -17
- package/dist/{chunk-LRM6JXJA.cjs → chunk-TBDXTV22.cjs} +0 -37
- package/dist/chunk-VOKMAAJP.js +848 -0
- package/dist/chunk-XB53G2DK.js +25 -0
- package/dist/chunk-Z2Y65YOY.cjs +7 -0
- package/dist/codegen/index.cjs +9 -7
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/codegen/index.js +6 -5
- package/dist/file-BOoHZgoQ.d.cts +1557 -0
- package/dist/file-yuPCFU5b.d.ts +1557 -0
- package/dist/history/index.cjs +287 -0
- package/dist/history/index.d.cts +157 -0
- package/dist/history/index.d.ts +157 -0
- package/dist/history/index.js +5 -0
- package/dist/index.cjs +134 -36
- package/dist/index.d.cts +137 -9
- package/dist/index.d.ts +137 -9
- package/dist/index.js +8 -3
- package/dist/ir/index.cjs +161 -165
- package/dist/ir/index.d.cts +32 -12
- package/dist/ir/index.d.ts +32 -12
- package/dist/ir/index.js +54 -61
- package/dist/lower-BuSvAFqi.d.cts +129 -0
- package/dist/lower-C_Qv_34S.d.ts +129 -0
- package/dist/lower-types-nofRXw9c.d.cts +15 -0
- package/dist/lower-types-nofRXw9c.d.ts +15 -0
- package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
- package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
- package/dist/node-evaluator-CJNP4GHX.js +12 -0
- package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
- package/dist/quickjs/index.cjs +256 -78
- package/dist/quickjs/index.d.cts +48 -7
- package/dist/quickjs/index.d.ts +48 -7
- package/dist/quickjs/index.js +254 -79
- package/dist/roundtrip/index.cjs +404 -129
- package/dist/roundtrip/index.d.cts +43 -8
- package/dist/roundtrip/index.d.ts +43 -8
- package/dist/roundtrip/index.js +260 -19
- package/dist/runtime/index.cjs +90 -0
- package/dist/runtime/index.d.cts +297 -0
- package/dist/runtime/index.d.ts +297 -0
- package/dist/runtime/index.js +8 -0
- package/dist/testing/index.cjs +1057 -0
- package/dist/testing/index.d.cts +305 -0
- package/dist/testing/index.d.ts +305 -0
- package/dist/testing/index.js +1037 -0
- package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
- package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
- package/dist/types-CpBBjaGX.d.cts +380 -0
- package/dist/types-DV-HX_Gt.d.ts +380 -0
- package/dist/{assemble-DMOuaxRI.d.ts → workflow-Bpr3vnA_.d.ts} +60 -162
- package/dist/workflow-C2a05WUJ.d.ts +444 -0
- package/dist/{assemble-BJo9TECS.d.cts → workflow-FXUkpIBc.d.cts} +60 -162
- package/dist/workflow-J-yYixny.d.cts +444 -0
- package/fixtures/README.md +128 -0
- package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
- package/fixtures/histories/activity-retry-then-success.history.json +147 -0
- package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
- package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
- package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
- package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
- package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
- package/fixtures/histories/cancel-during-timer.history.json +123 -0
- package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
- package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
- package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
- package/fixtures/histories/child-cancel-default.history.json +234 -0
- package/fixtures/histories/child-cancel-request.history.json +206 -0
- package/fixtures/histories/child-durable-child-side.history.json +124 -0
- package/fixtures/histories/child-durable-result.history.json +163 -0
- package/fixtures/histories/child-failure-caught.history.json +166 -0
- package/fixtures/histories/child-graph-by-key.history.json +138 -0
- package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
- package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
- package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
- package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
- package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
- package/fixtures/histories/details-and-context.history.json +176 -0
- package/fixtures/histories/deterministic-values.history.json +128 -0
- package/fixtures/histories/engine-builtins.history.json +172 -0
- package/fixtures/histories/gather-activities.history.json +291 -0
- package/fixtures/histories/gather-all-settled.history.json +219 -0
- package/fixtures/histories/gather-mixed.history.json +281 -0
- package/fixtures/histories/input-during-running-task.history.json +111 -0
- package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
- package/fixtures/histories/patched-deprecated.history.json +271 -0
- package/fixtures/histories/patched-new-run.history.json +270 -0
- package/fixtures/histories/patched-old-history.history.json +190 -0
- package/fixtures/histories/race-activity-wins.history.json +152 -0
- package/fixtures/histories/race-signal-beats-child.history.json +161 -0
- package/fixtures/histories/race-timeout-wins.history.json +118 -0
- package/fixtures/histories/side-effect-recorded.history.json +153 -0
- package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
- package/fixtures/histories/signal-default-handler.history.json +187 -0
- package/fixtures/histories/signal-handler.history.json +191 -0
- package/fixtures/histories/signal-parent-child-side.history.json +132 -0
- package/fixtures/histories/signal-parent.history.json +202 -0
- package/fixtures/histories/signal-run-delivered.history.json +128 -0
- package/fixtures/histories/signal-run-undelivered.history.json +134 -0
- package/fixtures/histories/signal-wait.history.json +111 -0
- package/fixtures/histories/task-failure-code-error.history.json +137 -0
- package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
- package/fixtures/histories/timer-condition-met.history.json +201 -0
- package/fixtures/histories/timer-condition-timeout.history.json +118 -0
- package/fixtures/histories/timer-sleep-once.history.json +118 -0
- package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
- package/fixtures/histories/update-accepted-completed.history.json +149 -0
- package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
- package/package.json +85 -20
- package/schema/history-file.schema.json +2544 -0
- package/schema/ir-v2.schema.json +16 -0
- package/schema/run-event.schema.json +2374 -0
- package/schema/workflow-command.schema.json +1095 -0
- package/schema/workflow-task.schema.json +3560 -0
- package/dist/chunk-265J2FCH.cjs +0 -33
- package/dist/chunk-LUXCXFOE.cjs +0 -269
- package/dist/chunk-S34NJE3A.js +0 -262
- package/dist/chunk-SRQRLWOS.js +0 -31
- package/dist/lower-DcOY8ux0.d.cts +0 -49
- package/dist/lower-Dw5grNrI.d.ts +0 -49
- package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
- package/dist/node-evaluator-RMYEWCXZ.js +0 -8
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "fluidgrids.history",
|
|
3
|
+
"formatVersion": 1,
|
|
4
|
+
"name": "task-failure-code-error",
|
|
5
|
+
"description": "A TypeError in workflow code fails the workflow task (WORKFLOW_CODE_ERROR), never the run.",
|
|
6
|
+
"source": "src/activities.ts",
|
|
7
|
+
"info": {
|
|
8
|
+
"workspaceId": "test-workspace",
|
|
9
|
+
"taskQueue": "managed",
|
|
10
|
+
"attempt": 1,
|
|
11
|
+
"startedAt": "2026-01-01T00:00:00.000Z",
|
|
12
|
+
"runStartedAt": "2026-01-01T00:00:00.000Z",
|
|
13
|
+
"runId": "run-1"
|
|
14
|
+
},
|
|
15
|
+
"nowMs": 1767225600000,
|
|
16
|
+
"workflowFn": "codeBug",
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"seq": 1,
|
|
20
|
+
"type": "WORKFLOW_STARTED",
|
|
21
|
+
"payload": {
|
|
22
|
+
"workflowFn": "codeBug",
|
|
23
|
+
"input": null,
|
|
24
|
+
"taskQueue": "managed",
|
|
25
|
+
"randomnessSeed": "run-1"
|
|
26
|
+
},
|
|
27
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"seq": 2,
|
|
31
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
32
|
+
"payload": {
|
|
33
|
+
"taskId": "run-1-task-1"
|
|
34
|
+
},
|
|
35
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"seq": 3,
|
|
39
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
40
|
+
"payload": {
|
|
41
|
+
"taskId": "run-1-task-1",
|
|
42
|
+
"attempt": 1
|
|
43
|
+
},
|
|
44
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"seq": 4,
|
|
48
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
49
|
+
"payload": {
|
|
50
|
+
"taskId": "run-1-task-1"
|
|
51
|
+
},
|
|
52
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
53
|
+
"taskId": "run-1-task-1"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"seq": 5,
|
|
57
|
+
"type": "ACTIVITY_SCHEDULED",
|
|
58
|
+
"payload": {
|
|
59
|
+
"activityId": "a1",
|
|
60
|
+
"kind": "node",
|
|
61
|
+
"nodeType": "internal:http",
|
|
62
|
+
"operation": "execute",
|
|
63
|
+
"args": {
|
|
64
|
+
"url": "https://example.test/shape"
|
|
65
|
+
},
|
|
66
|
+
"retry": {
|
|
67
|
+
"retryDelay": 1000,
|
|
68
|
+
"backoffMultiplier": 2,
|
|
69
|
+
"maxDelay": 100000
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
73
|
+
"taskId": "run-1-task-1"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"seq": 6,
|
|
77
|
+
"type": "ACTIVITY_STARTED",
|
|
78
|
+
"payload": {
|
|
79
|
+
"activityId": "a1",
|
|
80
|
+
"attempt": 1
|
|
81
|
+
},
|
|
82
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"seq": 7,
|
|
86
|
+
"type": "ACTIVITY_COMPLETED",
|
|
87
|
+
"payload": {
|
|
88
|
+
"activityId": "a1",
|
|
89
|
+
"attempt": 1,
|
|
90
|
+
"result": {
|
|
91
|
+
"status": 200,
|
|
92
|
+
"url": "https://example.test/shape"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"seq": 8,
|
|
99
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
100
|
+
"payload": {
|
|
101
|
+
"taskId": "run-1-task-2"
|
|
102
|
+
},
|
|
103
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"seq": 9,
|
|
107
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
108
|
+
"payload": {
|
|
109
|
+
"taskId": "run-1-task-2",
|
|
110
|
+
"attempt": 1
|
|
111
|
+
},
|
|
112
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"seq": 10,
|
|
116
|
+
"type": "WORKFLOW_TASK_FAILED",
|
|
117
|
+
"payload": {
|
|
118
|
+
"taskId": "run-1-task-2",
|
|
119
|
+
"attempt": 1,
|
|
120
|
+
"cause": "WORKFLOW_CODE_ERROR",
|
|
121
|
+
"message": "TypeError: the result has no \"missing\" field"
|
|
122
|
+
},
|
|
123
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"expected": {
|
|
127
|
+
"protocol": 1,
|
|
128
|
+
"outcome": "failed",
|
|
129
|
+
"commands": [],
|
|
130
|
+
"logs": [],
|
|
131
|
+
"failure": {
|
|
132
|
+
"cause": "WORKFLOW_CODE_ERROR",
|
|
133
|
+
"message": "TypeError: the result has no \"missing\" field",
|
|
134
|
+
"errorType": "TypeError"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "fluidgrids.history",
|
|
3
|
+
"formatVersion": 1,
|
|
4
|
+
"name": "task-failure-then-transient-attempt",
|
|
5
|
+
"description": "C-HIST rules 1-3: the first attempt of task 2 fails (STARTED, FAILED); the transient attempt that succeeds is recorded as STARTED{attempt 2, historyLength} right before COMPLETED.",
|
|
6
|
+
"source": "src/timers.ts",
|
|
7
|
+
"info": {
|
|
8
|
+
"workspaceId": "test-workspace",
|
|
9
|
+
"taskQueue": "managed",
|
|
10
|
+
"attempt": 1,
|
|
11
|
+
"startedAt": "2026-01-01T00:00:00.000Z",
|
|
12
|
+
"runStartedAt": "2026-01-01T00:00:00.000Z",
|
|
13
|
+
"runId": "run-1"
|
|
14
|
+
},
|
|
15
|
+
"nowMs": 1767229200000,
|
|
16
|
+
"workflowFn": "sleepOnce",
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"seq": 1,
|
|
20
|
+
"type": "WORKFLOW_STARTED",
|
|
21
|
+
"payload": {
|
|
22
|
+
"workflowFn": "sleepOnce",
|
|
23
|
+
"input": null,
|
|
24
|
+
"taskQueue": "managed",
|
|
25
|
+
"randomnessSeed": "run-1"
|
|
26
|
+
},
|
|
27
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"seq": 2,
|
|
31
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
32
|
+
"payload": {
|
|
33
|
+
"taskId": "run-1-task-1"
|
|
34
|
+
},
|
|
35
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"seq": 3,
|
|
39
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
40
|
+
"payload": {
|
|
41
|
+
"taskId": "run-1-task-1",
|
|
42
|
+
"attempt": 1
|
|
43
|
+
},
|
|
44
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"seq": 4,
|
|
48
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
49
|
+
"payload": {
|
|
50
|
+
"taskId": "run-1-task-1"
|
|
51
|
+
},
|
|
52
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
53
|
+
"taskId": "run-1-task-1"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"seq": 5,
|
|
57
|
+
"type": "TIMER_STARTED",
|
|
58
|
+
"payload": {
|
|
59
|
+
"timerId": "t1",
|
|
60
|
+
"durationMs": 3600000,
|
|
61
|
+
"fireAt": "2026-01-01T01:00:00.000Z"
|
|
62
|
+
},
|
|
63
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
64
|
+
"taskId": "run-1-task-1"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"seq": 6,
|
|
68
|
+
"type": "TIMER_FIRED",
|
|
69
|
+
"payload": {
|
|
70
|
+
"timerId": "t1"
|
|
71
|
+
},
|
|
72
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"seq": 7,
|
|
76
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
77
|
+
"payload": {
|
|
78
|
+
"taskId": "run-1-task-2"
|
|
79
|
+
},
|
|
80
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"seq": 8,
|
|
84
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
85
|
+
"payload": {
|
|
86
|
+
"taskId": "run-1-task-2",
|
|
87
|
+
"attempt": 1
|
|
88
|
+
},
|
|
89
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"seq": 9,
|
|
93
|
+
"type": "WORKFLOW_TASK_FAILED",
|
|
94
|
+
"payload": {
|
|
95
|
+
"taskId": "run-1-task-2",
|
|
96
|
+
"attempt": 1,
|
|
97
|
+
"cause": "WORKFLOW_CODE_ERROR",
|
|
98
|
+
"message": "TypeError: a bug that a hotfix removed"
|
|
99
|
+
},
|
|
100
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"seq": 10,
|
|
104
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
105
|
+
"payload": {
|
|
106
|
+
"taskId": "run-1-task-2",
|
|
107
|
+
"attempt": 2,
|
|
108
|
+
"historyLength": 9,
|
|
109
|
+
"startedAt": "2026-01-01T01:00:00.000Z"
|
|
110
|
+
},
|
|
111
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"seq": 11,
|
|
115
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
116
|
+
"payload": {
|
|
117
|
+
"taskId": "run-1-task-2"
|
|
118
|
+
},
|
|
119
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
120
|
+
"taskId": "run-1-task-2"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"seq": 12,
|
|
124
|
+
"type": "WORKFLOW_COMPLETED",
|
|
125
|
+
"payload": {
|
|
126
|
+
"output": {
|
|
127
|
+
"wokeAt": 1767229200000
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
131
|
+
"taskId": "run-1-task-2"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"expected": {
|
|
135
|
+
"protocol": 1,
|
|
136
|
+
"outcome": "commands",
|
|
137
|
+
"commands": [],
|
|
138
|
+
"logs": []
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "fluidgrids.history",
|
|
3
|
+
"formatVersion": 1,
|
|
4
|
+
"name": "timer-condition-met",
|
|
5
|
+
"description": "A signal handler makes the condition true before its one-day timeout; the timer is cancelled.",
|
|
6
|
+
"source": "src/timers.ts",
|
|
7
|
+
"info": {
|
|
8
|
+
"workspaceId": "test-workspace",
|
|
9
|
+
"taskQueue": "managed",
|
|
10
|
+
"attempt": 1,
|
|
11
|
+
"startedAt": "2026-01-01T00:00:00.000Z",
|
|
12
|
+
"runStartedAt": "2026-01-01T00:00:00.000Z",
|
|
13
|
+
"runId": "run-1"
|
|
14
|
+
},
|
|
15
|
+
"nowMs": 1767229200000,
|
|
16
|
+
"workflowFn": "conditionMet",
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"seq": 1,
|
|
20
|
+
"type": "WORKFLOW_STARTED",
|
|
21
|
+
"payload": {
|
|
22
|
+
"workflowFn": "conditionMet",
|
|
23
|
+
"input": null,
|
|
24
|
+
"taskQueue": "managed",
|
|
25
|
+
"randomnessSeed": "run-1"
|
|
26
|
+
},
|
|
27
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"seq": 2,
|
|
31
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
32
|
+
"payload": {
|
|
33
|
+
"taskId": "run-1-task-1"
|
|
34
|
+
},
|
|
35
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"seq": 3,
|
|
39
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
40
|
+
"payload": {
|
|
41
|
+
"taskId": "run-1-task-1",
|
|
42
|
+
"attempt": 1
|
|
43
|
+
},
|
|
44
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"seq": 4,
|
|
48
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
49
|
+
"payload": {
|
|
50
|
+
"taskId": "run-1-task-1"
|
|
51
|
+
},
|
|
52
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
53
|
+
"taskId": "run-1-task-1"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"seq": 5,
|
|
57
|
+
"type": "TIMER_STARTED",
|
|
58
|
+
"payload": {
|
|
59
|
+
"timerId": "t1",
|
|
60
|
+
"durationMs": 86400000,
|
|
61
|
+
"fireAt": "2026-01-02T00:00:00.000Z"
|
|
62
|
+
},
|
|
63
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
64
|
+
"taskId": "run-1-task-1"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"seq": 6,
|
|
68
|
+
"type": "SIGNAL_RECEIVED",
|
|
69
|
+
"payload": {
|
|
70
|
+
"name": "ready",
|
|
71
|
+
"payload": null,
|
|
72
|
+
"receivedAt": "2026-01-01T01:00:00.000Z"
|
|
73
|
+
},
|
|
74
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"seq": 7,
|
|
78
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
79
|
+
"payload": {
|
|
80
|
+
"taskId": "run-1-task-2"
|
|
81
|
+
},
|
|
82
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"seq": 8,
|
|
86
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
87
|
+
"payload": {
|
|
88
|
+
"taskId": "run-1-task-2",
|
|
89
|
+
"attempt": 1
|
|
90
|
+
},
|
|
91
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"seq": 9,
|
|
95
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
96
|
+
"payload": {
|
|
97
|
+
"taskId": "run-1-task-2"
|
|
98
|
+
},
|
|
99
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
100
|
+
"taskId": "run-1-task-2"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"seq": 10,
|
|
104
|
+
"type": "TIMER_CANCELLED",
|
|
105
|
+
"payload": {
|
|
106
|
+
"timerId": "t1"
|
|
107
|
+
},
|
|
108
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
109
|
+
"taskId": "run-1-task-2"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"seq": 11,
|
|
113
|
+
"type": "ACTIVITY_SCHEDULED",
|
|
114
|
+
"payload": {
|
|
115
|
+
"activityId": "a1",
|
|
116
|
+
"kind": "node",
|
|
117
|
+
"nodeType": "internal:http",
|
|
118
|
+
"operation": "execute",
|
|
119
|
+
"args": {
|
|
120
|
+
"url": "https://example.test/after"
|
|
121
|
+
},
|
|
122
|
+
"retry": {
|
|
123
|
+
"retryDelay": 1000,
|
|
124
|
+
"backoffMultiplier": 2,
|
|
125
|
+
"maxDelay": 100000
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
129
|
+
"taskId": "run-1-task-2"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"seq": 12,
|
|
133
|
+
"type": "ACTIVITY_STARTED",
|
|
134
|
+
"payload": {
|
|
135
|
+
"activityId": "a1",
|
|
136
|
+
"attempt": 1
|
|
137
|
+
},
|
|
138
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"seq": 13,
|
|
142
|
+
"type": "ACTIVITY_COMPLETED",
|
|
143
|
+
"payload": {
|
|
144
|
+
"activityId": "a1",
|
|
145
|
+
"attempt": 1,
|
|
146
|
+
"result": {
|
|
147
|
+
"status": 200,
|
|
148
|
+
"url": "https://example.test/after"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"seq": 14,
|
|
155
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
156
|
+
"payload": {
|
|
157
|
+
"taskId": "run-1-task-3"
|
|
158
|
+
},
|
|
159
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"seq": 15,
|
|
163
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
164
|
+
"payload": {
|
|
165
|
+
"taskId": "run-1-task-3",
|
|
166
|
+
"attempt": 1
|
|
167
|
+
},
|
|
168
|
+
"createdAt": "2026-01-01T01:00:00.000Z"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"seq": 16,
|
|
172
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
173
|
+
"payload": {
|
|
174
|
+
"taskId": "run-1-task-3"
|
|
175
|
+
},
|
|
176
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
177
|
+
"taskId": "run-1-task-3"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"seq": 17,
|
|
181
|
+
"type": "WORKFLOW_COMPLETED",
|
|
182
|
+
"payload": {
|
|
183
|
+
"output": {
|
|
184
|
+
"met": true,
|
|
185
|
+
"after": {
|
|
186
|
+
"status": 200,
|
|
187
|
+
"url": "https://example.test/after"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"createdAt": "2026-01-01T01:00:00.000Z",
|
|
192
|
+
"taskId": "run-1-task-3"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"expected": {
|
|
196
|
+
"protocol": 1,
|
|
197
|
+
"outcome": "commands",
|
|
198
|
+
"commands": [],
|
|
199
|
+
"logs": []
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "fluidgrids.history",
|
|
3
|
+
"formatVersion": 1,
|
|
4
|
+
"name": "timer-condition-timeout",
|
|
5
|
+
"description": "condition(() => false, 5m) resolves false when its timeout timer fires.",
|
|
6
|
+
"source": "src/timers.ts",
|
|
7
|
+
"info": {
|
|
8
|
+
"workspaceId": "test-workspace",
|
|
9
|
+
"taskQueue": "managed",
|
|
10
|
+
"attempt": 1,
|
|
11
|
+
"startedAt": "2026-01-01T00:00:00.000Z",
|
|
12
|
+
"runStartedAt": "2026-01-01T00:00:00.000Z",
|
|
13
|
+
"runId": "run-1"
|
|
14
|
+
},
|
|
15
|
+
"nowMs": 1767225900000,
|
|
16
|
+
"workflowFn": "conditionTimeout",
|
|
17
|
+
"events": [
|
|
18
|
+
{
|
|
19
|
+
"seq": 1,
|
|
20
|
+
"type": "WORKFLOW_STARTED",
|
|
21
|
+
"payload": {
|
|
22
|
+
"workflowFn": "conditionTimeout",
|
|
23
|
+
"input": null,
|
|
24
|
+
"taskQueue": "managed",
|
|
25
|
+
"randomnessSeed": "run-1"
|
|
26
|
+
},
|
|
27
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"seq": 2,
|
|
31
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
32
|
+
"payload": {
|
|
33
|
+
"taskId": "run-1-task-1"
|
|
34
|
+
},
|
|
35
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"seq": 3,
|
|
39
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
40
|
+
"payload": {
|
|
41
|
+
"taskId": "run-1-task-1",
|
|
42
|
+
"attempt": 1
|
|
43
|
+
},
|
|
44
|
+
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"seq": 4,
|
|
48
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
49
|
+
"payload": {
|
|
50
|
+
"taskId": "run-1-task-1"
|
|
51
|
+
},
|
|
52
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
53
|
+
"taskId": "run-1-task-1"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"seq": 5,
|
|
57
|
+
"type": "TIMER_STARTED",
|
|
58
|
+
"payload": {
|
|
59
|
+
"timerId": "t1",
|
|
60
|
+
"durationMs": 300000,
|
|
61
|
+
"fireAt": "2026-01-01T00:05:00.000Z"
|
|
62
|
+
},
|
|
63
|
+
"createdAt": "2026-01-01T00:00:00.000Z",
|
|
64
|
+
"taskId": "run-1-task-1"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"seq": 6,
|
|
68
|
+
"type": "TIMER_FIRED",
|
|
69
|
+
"payload": {
|
|
70
|
+
"timerId": "t1"
|
|
71
|
+
},
|
|
72
|
+
"createdAt": "2026-01-01T00:05:00.000Z"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"seq": 7,
|
|
76
|
+
"type": "WORKFLOW_TASK_SCHEDULED",
|
|
77
|
+
"payload": {
|
|
78
|
+
"taskId": "run-1-task-2"
|
|
79
|
+
},
|
|
80
|
+
"createdAt": "2026-01-01T00:05:00.000Z"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"seq": 8,
|
|
84
|
+
"type": "WORKFLOW_TASK_STARTED",
|
|
85
|
+
"payload": {
|
|
86
|
+
"taskId": "run-1-task-2",
|
|
87
|
+
"attempt": 1
|
|
88
|
+
},
|
|
89
|
+
"createdAt": "2026-01-01T00:05:00.000Z"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"seq": 9,
|
|
93
|
+
"type": "WORKFLOW_TASK_COMPLETED",
|
|
94
|
+
"payload": {
|
|
95
|
+
"taskId": "run-1-task-2"
|
|
96
|
+
},
|
|
97
|
+
"createdAt": "2026-01-01T00:05:00.000Z",
|
|
98
|
+
"taskId": "run-1-task-2"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"seq": 10,
|
|
102
|
+
"type": "WORKFLOW_COMPLETED",
|
|
103
|
+
"payload": {
|
|
104
|
+
"output": {
|
|
105
|
+
"met": false
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"createdAt": "2026-01-01T00:05:00.000Z",
|
|
109
|
+
"taskId": "run-1-task-2"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"expected": {
|
|
113
|
+
"protocol": 1,
|
|
114
|
+
"outcome": "commands",
|
|
115
|
+
"commands": [],
|
|
116
|
+
"logs": []
|
|
117
|
+
}
|
|
118
|
+
}
|