@fluidgrids/workflows 2026.1028.2 → 2026.1029.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.
Files changed (118) hide show
  1. package/README.md +72 -10
  2. package/dist/{activation-DnhG7SmF.d.ts → activation-BnVQMv9y.d.ts} +1 -1
  3. package/dist/{activation-BBh1p82z.d.cts → activation-CESehfYi.d.cts} +1 -1
  4. package/dist/{chunk-XHXIDVEC.js → chunk-25BKWR2O.js} +1 -1
  5. package/dist/{chunk-UK3WM7YZ.cjs → chunk-2B37XAFQ.cjs} +44 -8
  6. package/dist/{chunk-DJYMDLV5.js → chunk-2DDULZFM.js} +93 -1
  7. package/dist/{chunk-623FVQSN.cjs → chunk-3FIDHONL.cjs} +104 -0
  8. package/dist/chunk-6QPOJZT6.cjs +1180 -0
  9. package/dist/chunk-7ILGCUI6.js +154 -0
  10. package/dist/chunk-A2OHX3UQ.js +1156 -0
  11. package/dist/{chunk-VOKMAAJP.js → chunk-A36CCOWS.js} +188 -19
  12. package/dist/{chunk-FMSW2HDF.cjs → chunk-ELL2RBML.cjs} +0 -14
  13. package/dist/{chunk-JD2VQIDZ.cjs → chunk-EWYADREB.cjs} +2 -2
  14. package/dist/{chunk-HWJZVOG7.js → chunk-FQSJI5NV.js} +1 -1
  15. package/dist/{chunk-ABFZWYHT.js → chunk-FWBRQWRX.js} +156 -48
  16. package/dist/{chunk-PZCVF76Q.cjs → chunk-I47EENR4.cjs} +209 -40
  17. package/dist/chunk-J3PYFGKA.cjs +166 -0
  18. package/dist/{chunk-C5OLWZ42.js → chunk-KXJDRQ6G.js} +1 -13
  19. package/dist/chunk-M272AHEX.js +25 -0
  20. package/dist/{chunk-VRHHBPT6.js → chunk-MJ5TGYVG.js} +333 -65
  21. package/dist/{chunk-SAOBPYYJ.cjs → chunk-NXFBVDOI.cjs} +3 -3
  22. package/dist/{chunk-XKJA7KX3.js → chunk-OIX4O6UR.js} +38 -2
  23. package/dist/{chunk-FEW3JBYA.cjs → chunk-OKX3FYIM.cjs} +3 -3
  24. package/dist/{chunk-M4BBAERY.cjs → chunk-OMY3CKUZ.cjs} +404 -136
  25. package/dist/chunk-PWIUEWC3.js +81 -0
  26. package/dist/chunk-Q4MWQNJK.cjs +28 -0
  27. package/dist/{chunk-P6TA5EZT.cjs → chunk-RUQIMTN5.cjs} +171 -57
  28. package/dist/{chunk-IISBRUWJ.js → chunk-WXXNCHUY.js} +1 -1
  29. package/dist/chunk-YHBVMOMK.cjs +87 -0
  30. package/dist/codegen/index.d.cts +2 -2
  31. package/dist/codegen/index.d.ts +2 -2
  32. package/dist/collect-BTHjQaSp.d.ts +86 -0
  33. package/dist/collect-CSyOg5XC.d.cts +86 -0
  34. package/dist/{file-BOoHZgoQ.d.cts → file-cgL9l9l8.d.cts} +765 -14
  35. package/dist/{file-yuPCFU5b.d.ts → file-olQudcx5.d.ts} +765 -14
  36. package/dist/history/index.cjs +198 -86
  37. package/dist/history/index.d.cts +49 -10
  38. package/dist/history/index.d.ts +49 -10
  39. package/dist/history/index.js +49 -4
  40. package/dist/index.cjs +64 -51
  41. package/dist/index.d.cts +9 -53
  42. package/dist/index.d.ts +9 -53
  43. package/dist/index.js +5 -4
  44. package/dist/ir/index.cjs +24 -3
  45. package/dist/ir/index.d.cts +43 -4
  46. package/dist/ir/index.d.ts +43 -4
  47. package/dist/ir/index.js +24 -3
  48. package/dist/{lower-BzmUz0sq.d.cts → lower-3S6PsqjJ.d.cts} +40 -6
  49. package/dist/{lower-_-iT4HYs.d.ts → lower-DmZpQ8hJ.d.ts} +40 -6
  50. package/dist/{manifest-C8N6HDYl.d.ts → manifest-BJjrQt77.d.ts} +1 -1
  51. package/dist/{manifest-0OLw0i7k.d.cts → manifest-gRI2Q5Fj.d.cts} +1 -1
  52. package/dist/node-evaluator-SOADN23V.js +14 -0
  53. package/dist/node-evaluator-YGDEXK4U.cjs +24 -0
  54. package/dist/quickjs/index.cjs +25 -24
  55. package/dist/quickjs/index.d.cts +6 -6
  56. package/dist/quickjs/index.d.ts +6 -6
  57. package/dist/quickjs/index.js +8 -7
  58. package/dist/roundtrip/index.cjs +245 -43
  59. package/dist/roundtrip/index.d.cts +86 -9
  60. package/dist/roundtrip/index.d.ts +86 -9
  61. package/dist/roundtrip/index.js +172 -8
  62. package/dist/runtime/index.cjs +21 -20
  63. package/dist/runtime/index.d.cts +49 -7
  64. package/dist/runtime/index.d.ts +49 -7
  65. package/dist/runtime/index.js +8 -7
  66. package/dist/testing/index.cjs +514 -74
  67. package/dist/testing/index.d.cts +127 -10
  68. package/dist/testing/index.d.ts +127 -10
  69. package/dist/testing/index.js +480 -42
  70. package/dist/{types-BGoPzgcl.d.ts → types-Bb2wRnJ5.d.cts} +20 -1
  71. package/dist/{types-BGoPzgcl.d.cts → types-Bb2wRnJ5.d.ts} +20 -1
  72. package/dist/{types-DV-HX_Gt.d.ts → types-CQKOhPTa.d.cts} +122 -14
  73. package/dist/{types-CpBBjaGX.d.cts → types-CnIOinoz.d.ts} +122 -14
  74. package/dist/{workflow-Bpr3vnA_.d.ts → workflow-8uRU9rhL.d.ts} +2 -2
  75. package/dist/{workflow-FXUkpIBc.d.cts → workflow-CZOXUlQ5.d.cts} +2 -2
  76. package/dist/{workflow-C2a05WUJ.d.ts → workflow-DWTPHFbt.d.ts} +124 -12
  77. package/dist/{workflow-J-yYixny.d.cts → workflow-O6e64ZcG.d.cts} +124 -12
  78. package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
  79. package/fixtures/histories/benign-failure.history.json +146 -0
  80. package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
  81. package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
  82. package/fixtures/histories/child-options-roundtrip.history.json +192 -0
  83. package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
  84. package/fixtures/histories/continue-as-new-options.history.json +99 -0
  85. package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
  86. package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
  87. package/fixtures/histories/execution-timeout-chain.history.json +98 -0
  88. package/fixtures/histories/external-cancel-resolved.history.json +123 -0
  89. package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
  90. package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
  91. package/fixtures/histories/handler-drain-warn.history.json +222 -0
  92. package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
  93. package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
  94. package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
  95. package/fixtures/histories/local-activity-completed.history.json +157 -0
  96. package/fixtures/histories/local-activity-failed.history.json +93 -0
  97. package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
  98. package/fixtures/histories/run-retry-last-failure.history.json +90 -0
  99. package/fixtures/histories/run-timeout.history.json +159 -0
  100. package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
  101. package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
  102. package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
  103. package/package.json +1 -1
  104. package/schema/history-file.schema.json +283 -2
  105. package/schema/ir-v2.schema.json +45 -0
  106. package/schema/run-event.schema.json +264 -2
  107. package/schema/workflow-command.schema.json +178 -1
  108. package/schema/workflow-task.schema.json +392 -4
  109. package/dist/assemble-BLqQ8lSu.d.cts +0 -39
  110. package/dist/assemble-DWgaXHd-.d.ts +0 -39
  111. package/dist/chunk-2J6TF7YI.cjs +0 -86
  112. package/dist/chunk-BO6OVILK.js +0 -79
  113. package/dist/chunk-DHTLALBL.cjs +0 -80
  114. package/dist/chunk-I5LR3D2K.js +0 -869
  115. package/dist/chunk-N23SKIG4.js +0 -73
  116. package/dist/chunk-QQ6ULXHI.cjs +0 -885
  117. package/dist/node-evaluator-4MSDKWOG.cjs +0 -22
  118. package/dist/node-evaluator-SX4LEYQC.js +0 -12
@@ -0,0 +1,83 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "continue-as-new-r1-retry-options",
5
+ "description": "Phase B (R1) continue-as-new options: the activity-shaped retry with a fractional retryDelay and a backoffMultiplier below 1, as R1 wrote it. Still a valid command and a valid WORKFLOW_CONTINUED_AS_NEW.",
6
+ "source": "src/parity-chain.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": "r1CanRetry",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "r1CanRetry",
23
+ "input": {
24
+ "round": 0
25
+ },
26
+ "taskQueue": "managed",
27
+ "randomnessSeed": "run-1"
28
+ },
29
+ "createdAt": "2026-01-01T00:00:00.000Z"
30
+ },
31
+ {
32
+ "seq": 2,
33
+ "type": "WORKFLOW_TASK_SCHEDULED",
34
+ "payload": {
35
+ "taskId": "run-1-task-1"
36
+ },
37
+ "createdAt": "2026-01-01T00:00:00.000Z"
38
+ },
39
+ {
40
+ "seq": 3,
41
+ "type": "WORKFLOW_TASK_STARTED",
42
+ "payload": {
43
+ "taskId": "run-1-task-1",
44
+ "attempt": 1
45
+ },
46
+ "createdAt": "2026-01-01T00:00:00.000Z"
47
+ },
48
+ {
49
+ "seq": 4,
50
+ "type": "WORKFLOW_TASK_COMPLETED",
51
+ "payload": {
52
+ "taskId": "run-1-task-1"
53
+ },
54
+ "createdAt": "2026-01-01T00:00:00.000Z",
55
+ "taskId": "run-1-task-1"
56
+ },
57
+ {
58
+ "seq": 5,
59
+ "type": "WORKFLOW_CONTINUED_AS_NEW",
60
+ "payload": {
61
+ "input": {
62
+ "round": 1
63
+ },
64
+ "options": {
65
+ "taskQueue": "managed",
66
+ "retry": {
67
+ "retryDelay": 1500.5,
68
+ "backoffMultiplier": 0.5,
69
+ "maxDelay": 150050
70
+ }
71
+ }
72
+ },
73
+ "createdAt": "2026-01-01T00:00:00.000Z",
74
+ "taskId": "run-1-task-1"
75
+ }
76
+ ],
77
+ "expected": {
78
+ "protocol": 1,
79
+ "outcome": "commands",
80
+ "commands": [],
81
+ "logs": []
82
+ }
83
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "execution-timeout-chain",
5
+ "description": "A three-hour execution timeout bounds the chain: the second run, started at 2 h by continue-as-new, times out with WORKFLOW_EXECUTION at 3 h.",
6
+ "source": "src/parity-chain.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-2",
14
+ "continuedFromRunId": "run-1",
15
+ "firstRunId": "run-1"
16
+ },
17
+ "nowMs": 1767236400000,
18
+ "workflowFn": "executionTimeoutChain",
19
+ "events": [
20
+ {
21
+ "seq": 1,
22
+ "type": "WORKFLOW_STARTED",
23
+ "payload": {
24
+ "workflowFn": "executionTimeoutChain",
25
+ "input": {
26
+ "round": 1
27
+ },
28
+ "taskQueue": "managed",
29
+ "randomnessSeed": "run-2",
30
+ "timeouts": {
31
+ "executionTimeout": 10800000
32
+ },
33
+ "lastCompletionResult": {
34
+ "round": 1
35
+ }
36
+ },
37
+ "createdAt": "2026-01-01T02:00:00.000Z"
38
+ },
39
+ {
40
+ "seq": 2,
41
+ "type": "WORKFLOW_TASK_SCHEDULED",
42
+ "payload": {
43
+ "taskId": "run-2-task-1"
44
+ },
45
+ "createdAt": "2026-01-01T02:00:00.000Z"
46
+ },
47
+ {
48
+ "seq": 3,
49
+ "type": "WORKFLOW_TASK_STARTED",
50
+ "payload": {
51
+ "taskId": "run-2-task-1",
52
+ "attempt": 1
53
+ },
54
+ "createdAt": "2026-01-01T02:00:00.000Z"
55
+ },
56
+ {
57
+ "seq": 4,
58
+ "type": "WORKFLOW_TASK_COMPLETED",
59
+ "payload": {
60
+ "taskId": "run-2-task-1"
61
+ },
62
+ "createdAt": "2026-01-01T02:00:00.000Z",
63
+ "taskId": "run-2-task-1"
64
+ },
65
+ {
66
+ "seq": 5,
67
+ "type": "TIMER_STARTED",
68
+ "payload": {
69
+ "timerId": "t1",
70
+ "durationMs": 7200000,
71
+ "fireAt": "2026-01-01T04:00:00.000Z"
72
+ },
73
+ "createdAt": "2026-01-01T02:00:00.000Z",
74
+ "taskId": "run-2-task-1"
75
+ },
76
+ {
77
+ "seq": 6,
78
+ "type": "WORKFLOW_TIMED_OUT",
79
+ "payload": {
80
+ "timeoutType": "WORKFLOW_EXECUTION",
81
+ "failure": {
82
+ "errorType": "TIMEOUT",
83
+ "message": "The execution timeout of the chain expired",
84
+ "type": "TimeoutFailure",
85
+ "timeoutType": "WORKFLOW_EXECUTION",
86
+ "source": "engine"
87
+ }
88
+ },
89
+ "createdAt": "2026-01-01T03:00:00.000Z"
90
+ }
91
+ ],
92
+ "expected": {
93
+ "protocol": 1,
94
+ "outcome": "commands",
95
+ "commands": [],
96
+ "logs": []
97
+ }
98
+ }
@@ -0,0 +1,123 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "external-cancel-resolved",
5
+ "description": "getRunHandle(runId).cancel() resolves when EXTERNAL_RUN_CANCEL_RESOLVED { ok: true } is delivered, not when the target ends.",
6
+ "source": "src/parity-handles.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-2"
14
+ },
15
+ "nowMs": 1767225600000,
16
+ "workflowFn": "cancelOther",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "cancelOther",
23
+ "input": {
24
+ "target": "run-1"
25
+ },
26
+ "taskQueue": "managed",
27
+ "randomnessSeed": "run-2"
28
+ },
29
+ "createdAt": "2026-01-01T00:00:00.000Z"
30
+ },
31
+ {
32
+ "seq": 2,
33
+ "type": "WORKFLOW_TASK_SCHEDULED",
34
+ "payload": {
35
+ "taskId": "run-2-task-1"
36
+ },
37
+ "createdAt": "2026-01-01T00:00:00.000Z"
38
+ },
39
+ {
40
+ "seq": 3,
41
+ "type": "WORKFLOW_TASK_STARTED",
42
+ "payload": {
43
+ "taskId": "run-2-task-1",
44
+ "attempt": 1
45
+ },
46
+ "createdAt": "2026-01-01T00:00:00.000Z"
47
+ },
48
+ {
49
+ "seq": 4,
50
+ "type": "WORKFLOW_TASK_COMPLETED",
51
+ "payload": {
52
+ "taskId": "run-2-task-1"
53
+ },
54
+ "createdAt": "2026-01-01T00:00:00.000Z",
55
+ "taskId": "run-2-task-1"
56
+ },
57
+ {
58
+ "seq": 5,
59
+ "type": "EXTERNAL_RUN_CANCEL_REQUESTED",
60
+ "payload": {
61
+ "externalId": "x1",
62
+ "target": {
63
+ "runId": "run-1"
64
+ }
65
+ },
66
+ "createdAt": "2026-01-01T00:00:00.000Z",
67
+ "taskId": "run-2-task-1"
68
+ },
69
+ {
70
+ "seq": 6,
71
+ "type": "EXTERNAL_RUN_CANCEL_RESOLVED",
72
+ "payload": {
73
+ "externalId": "x1",
74
+ "ok": true,
75
+ "targetRunId": "run-1"
76
+ },
77
+ "createdAt": "2026-01-01T00:00:00.000Z"
78
+ },
79
+ {
80
+ "seq": 7,
81
+ "type": "WORKFLOW_TASK_SCHEDULED",
82
+ "payload": {
83
+ "taskId": "run-2-task-2"
84
+ },
85
+ "createdAt": "2026-01-01T00:00:00.000Z"
86
+ },
87
+ {
88
+ "seq": 8,
89
+ "type": "WORKFLOW_TASK_STARTED",
90
+ "payload": {
91
+ "taskId": "run-2-task-2",
92
+ "attempt": 1
93
+ },
94
+ "createdAt": "2026-01-01T00:00:00.000Z"
95
+ },
96
+ {
97
+ "seq": 9,
98
+ "type": "WORKFLOW_TASK_COMPLETED",
99
+ "payload": {
100
+ "taskId": "run-2-task-2"
101
+ },
102
+ "createdAt": "2026-01-01T00:00:00.000Z",
103
+ "taskId": "run-2-task-2"
104
+ },
105
+ {
106
+ "seq": 10,
107
+ "type": "WORKFLOW_COMPLETED",
108
+ "payload": {
109
+ "output": {
110
+ "delivered": true
111
+ }
112
+ },
113
+ "createdAt": "2026-01-01T00:00:00.000Z",
114
+ "taskId": "run-2-task-2"
115
+ }
116
+ ],
117
+ "expected": {
118
+ "protocol": 1,
119
+ "outcome": "commands",
120
+ "commands": [],
121
+ "logs": []
122
+ }
123
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "external-cancel-unknown-target",
5
+ "description": "A cancel aimed at a workflow id with no run resolves with { ok: false } and a failure; the awaitable rejects and the code catches it.",
6
+ "source": "src/parity-handles.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": "cancelUnknown",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "cancelUnknown",
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": "EXTERNAL_RUN_CANCEL_REQUESTED",
58
+ "payload": {
59
+ "externalId": "x1",
60
+ "target": {
61
+ "workflowKey": "cancel-target",
62
+ "workflowId": "nobody"
63
+ }
64
+ },
65
+ "createdAt": "2026-01-01T00:00:00.000Z",
66
+ "taskId": "run-1-task-1"
67
+ },
68
+ {
69
+ "seq": 6,
70
+ "type": "EXTERNAL_RUN_CANCEL_RESOLVED",
71
+ "payload": {
72
+ "externalId": "x1",
73
+ "ok": false,
74
+ "failure": {
75
+ "errorType": "VALIDATION",
76
+ "message": "The target run is not open",
77
+ "type": "ServerFailure"
78
+ }
79
+ },
80
+ "createdAt": "2026-01-01T00:00:00.000Z"
81
+ },
82
+ {
83
+ "seq": 7,
84
+ "type": "WORKFLOW_TASK_SCHEDULED",
85
+ "payload": {
86
+ "taskId": "run-1-task-2"
87
+ },
88
+ "createdAt": "2026-01-01T00:00:00.000Z"
89
+ },
90
+ {
91
+ "seq": 8,
92
+ "type": "WORKFLOW_TASK_STARTED",
93
+ "payload": {
94
+ "taskId": "run-1-task-2",
95
+ "attempt": 1
96
+ },
97
+ "createdAt": "2026-01-01T00:00:00.000Z"
98
+ },
99
+ {
100
+ "seq": 9,
101
+ "type": "WORKFLOW_TASK_COMPLETED",
102
+ "payload": {
103
+ "taskId": "run-1-task-2"
104
+ },
105
+ "createdAt": "2026-01-01T00:00:00.000Z",
106
+ "taskId": "run-1-task-2"
107
+ },
108
+ {
109
+ "seq": 10,
110
+ "type": "WORKFLOW_COMPLETED",
111
+ "payload": {
112
+ "output": {
113
+ "delivered": false,
114
+ "kind": "ServerFailure"
115
+ }
116
+ },
117
+ "createdAt": "2026-01-01T00:00:00.000Z",
118
+ "taskId": "run-1-task-2"
119
+ }
120
+ ],
121
+ "expected": {
122
+ "protocol": 1,
123
+ "outcome": "commands",
124
+ "commands": [],
125
+ "logs": []
126
+ }
127
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "failure-error-types-fails-run",
5
+ "description": "A class listed in failureErrorTypes (QuotaExceeded) fails the run with FAIL_WORKFLOW instead of failing the task.",
6
+ "source": "src/parity-handlers.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": "failureErrorTypes",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "failureErrorTypes",
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/quota"
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/quota"
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_COMPLETED",
117
+ "payload": {
118
+ "taskId": "run-1-task-2"
119
+ },
120
+ "createdAt": "2026-01-01T00:00:00.000Z",
121
+ "taskId": "run-1-task-2"
122
+ },
123
+ {
124
+ "seq": 11,
125
+ "type": "WORKFLOW_FAILED",
126
+ "payload": {
127
+ "failure": {
128
+ "errorType": "UNKNOWN",
129
+ "message": "the monthly quota is used up",
130
+ "type": "QuotaExceeded",
131
+ "source": "sdk-ts"
132
+ }
133
+ },
134
+ "createdAt": "2026-01-01T00:00:00.000Z",
135
+ "taskId": "run-1-task-2"
136
+ }
137
+ ],
138
+ "expected": {
139
+ "protocol": 1,
140
+ "outcome": "commands",
141
+ "commands": [],
142
+ "logs": []
143
+ }
144
+ }