@fluidgrids/workflows 2026.1029.1 → 2026.1030.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 +112 -4
  2. package/dist/{activation-CESehfYi.d.cts → activation-DqUfpHzk.d.cts} +1 -1
  3. package/dist/{activation-BnVQMv9y.d.ts → activation-xpx1oWuo.d.ts} +1 -1
  4. package/dist/{chunk-MJ5TGYVG.js → chunk-2D3MYIIF.js} +969 -153
  5. package/dist/{chunk-2B37XAFQ.cjs → chunk-3U2NU7YC.cjs} +24 -11
  6. package/dist/{chunk-NEIUQASE.cjs → chunk-4QKB4ARC.cjs} +3 -3
  7. package/dist/{chunk-GBQ33SIZ.cjs → chunk-54FLQNUM.cjs} +12 -1
  8. package/dist/{chunk-2DDULZFM.js → chunk-5HIVIV53.js} +86 -75
  9. package/dist/chunk-5MFVJM76.js +1222 -0
  10. package/dist/{chunk-EWYADREB.cjs → chunk-672KMMBK.cjs} +2 -2
  11. package/dist/{chunk-KXJDRQ6G.js → chunk-6A2FGSUS.js} +22 -2
  12. package/dist/{chunk-OIX4O6UR.js → chunk-6OLN6BMB.js} +16 -3
  13. package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
  14. package/dist/chunk-A5SXCA62.cjs +93 -0
  15. package/dist/chunk-AC6ZEXVR.js +85 -0
  16. package/dist/{chunk-FWBRQWRX.js → chunk-AE5Q6ZAJ.js} +167 -10
  17. package/dist/{chunk-7ILGCUI6.js → chunk-C4F5KJTI.js} +142 -3
  18. package/dist/{chunk-WXXNCHUY.js → chunk-G5H32GIG.js} +1 -1
  19. package/dist/{chunk-OMY3CKUZ.cjs → chunk-GEQDGUGB.cjs} +1042 -226
  20. package/dist/{chunk-25BKWR2O.js → chunk-HCM7ZC7Q.js} +1 -1
  21. package/dist/{chunk-I47EENR4.cjs → chunk-HMZUGSMU.cjs} +673 -156
  22. package/dist/{chunk-NXFBVDOI.cjs → chunk-IQPXHQQQ.cjs} +8 -4
  23. package/dist/{chunk-RUQIMTN5.cjs → chunk-ISOIA7NV.cjs} +178 -15
  24. package/dist/chunk-JSC75O5C.cjs +167 -0
  25. package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
  26. package/dist/chunk-ODZ2IAR2.cjs +1247 -0
  27. package/dist/{chunk-FQSJI5NV.js → chunk-SR7TR5KX.js} +6 -2
  28. package/dist/{chunk-OKX3FYIM.cjs → chunk-TCTE7DX5.cjs} +3 -3
  29. package/dist/{chunk-3FIDHONL.cjs → chunk-TYF56RGB.cjs} +99 -80
  30. package/dist/{chunk-J3PYFGKA.cjs → chunk-VA4OFR72.cjs} +162 -4
  31. package/dist/chunk-VU5S5A7V.js +150 -0
  32. package/dist/{chunk-A36CCOWS.js → chunk-YEHR4NNE.js} +633 -128
  33. package/dist/{chunk-ELL2RBML.cjs → chunk-ZCGKGDCL.cjs} +23 -1
  34. package/dist/codegen/index.d.cts +2 -2
  35. package/dist/codegen/index.d.ts +2 -2
  36. package/dist/{collect-BTHjQaSp.d.ts → collect-6NIEufHd.d.ts} +20 -3
  37. package/dist/{collect-CSyOg5XC.d.cts → collect-CcTCKqx6.d.cts} +20 -3
  38. package/dist/{file-cgL9l9l8.d.cts → file-BxYpwjRQ.d.cts} +250 -15
  39. package/dist/{file-olQudcx5.d.ts → file-CFdPQJI9.d.ts} +250 -15
  40. package/dist/history/index.cjs +283 -106
  41. package/dist/history/index.d.cts +549 -10
  42. package/dist/history/index.d.ts +549 -10
  43. package/dist/history/index.js +5 -4
  44. package/dist/index.cjs +146 -53
  45. package/dist/index.d.cts +38 -14
  46. package/dist/index.d.ts +38 -14
  47. package/dist/index.js +6 -5
  48. package/dist/interceptors-CNcr2dlk.d.ts +159 -0
  49. package/dist/interceptors-CqkNZVfI.d.cts +159 -0
  50. package/dist/ir/index.cjs +339 -36
  51. package/dist/ir/index.d.cts +244 -8
  52. package/dist/ir/index.d.ts +244 -8
  53. package/dist/ir/index.js +306 -21
  54. package/dist/{lower-3S6PsqjJ.d.cts → lower-BtRfIW2A.d.cts} +23 -9
  55. package/dist/{lower-DmZpQ8hJ.d.ts → lower-CpsMFOFX.d.ts} +23 -9
  56. package/dist/{manifest-BJjrQt77.d.ts → manifest-D-I_twys.d.ts} +1 -1
  57. package/dist/{manifest-gRI2Q5Fj.d.cts → manifest-DahBQVM8.d.cts} +1 -1
  58. package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
  59. package/dist/node-evaluator-LEEVD7H7.js +14 -0
  60. package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
  61. package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
  62. package/dist/quickjs/index.cjs +27 -27
  63. package/dist/quickjs/index.d.cts +6 -6
  64. package/dist/quickjs/index.d.ts +6 -6
  65. package/dist/quickjs/index.js +9 -9
  66. package/dist/roundtrip/index.cjs +72 -66
  67. package/dist/roundtrip/index.d.cts +25 -11
  68. package/dist/roundtrip/index.d.ts +25 -11
  69. package/dist/roundtrip/index.js +13 -11
  70. package/dist/runtime/index.cjs +19 -19
  71. package/dist/runtime/index.d.cts +139 -12
  72. package/dist/runtime/index.d.ts +139 -12
  73. package/dist/runtime/index.js +6 -6
  74. package/dist/testing/index.cjs +688 -121
  75. package/dist/testing/index.d.cts +174 -10
  76. package/dist/testing/index.d.ts +174 -10
  77. package/dist/testing/index.js +646 -82
  78. package/dist/{types-CnIOinoz.d.ts → types-Bv2i4cBX.d.cts} +126 -23
  79. package/dist/{types-CQKOhPTa.d.cts → types-DGx-b9eq.d.ts} +126 -23
  80. package/dist/{types-Bb2wRnJ5.d.cts → types-V7jEEUaL.d.cts} +1 -1
  81. package/dist/{types-Bb2wRnJ5.d.ts → types-V7jEEUaL.d.ts} +1 -1
  82. package/dist/{workflow-8uRU9rhL.d.ts → workflow-B18OeF7g.d.ts} +2 -2
  83. package/dist/{workflow-DWTPHFbt.d.ts → workflow-BGnv8SS6.d.ts} +261 -14
  84. package/dist/{workflow-CZOXUlQ5.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
  85. package/dist/{workflow-O6e64ZcG.d.cts → workflow-DS32Gtws.d.cts} +261 -14
  86. package/fixtures/histories/activity-options-updated.history.json +159 -0
  87. package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
  88. package/fixtures/histories/codec-opaque.history.json +229 -0
  89. package/fixtures/histories/dynamic-workflow.history.json +150 -0
  90. package/fixtures/histories/interceptor-headers.history.json +339 -0
  91. package/fixtures/histories/query-custom.history.json +213 -0
  92. package/fixtures/histories/query-default-handler.history.json +120 -0
  93. package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
  94. package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
  95. package/fixtures/histories/search-attributes-upserted.history.json +177 -0
  96. package/fixtures/histories/update-accepted-completed.history.json +45 -30
  97. package/fixtures/histories/update-default-handler.history.json +246 -0
  98. package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
  99. package/fixtures/histories/update-not-handled.history.json +138 -0
  100. package/fixtures/histories/update-rejected-no-event.history.json +190 -0
  101. package/fixtures/histories/update-with-start-admitted.history.json +150 -0
  102. package/fixtures/histories/user-activity-cancel.history.json +149 -0
  103. package/fixtures/histories/user-activity-retry.history.json +143 -0
  104. package/fixtures/histories/user-activity.history.json +149 -0
  105. package/package.json +1 -1
  106. package/schema/bridge-v2.schema.json +1062 -0
  107. package/schema/history-file.schema.json +255 -81
  108. package/schema/ir-v2.schema.json +246 -1
  109. package/schema/payload-fields.json +162 -0
  110. package/schema/run-event.schema.json +239 -80
  111. package/schema/workflow-command.schema.json +210 -84
  112. package/schema/workflow-task.schema.json +532 -167
  113. package/dist/chunk-6QPOJZT6.cjs +0 -1180
  114. package/dist/chunk-A2OHX3UQ.js +0 -1156
  115. package/dist/chunk-PWIUEWC3.js +0 -81
  116. package/dist/chunk-YHBVMOMK.cjs +0 -87
  117. package/dist/node-evaluator-SOADN23V.js +0 -14
  118. package/dist/node-evaluator-YGDEXK4U.cjs +0 -24
@@ -2,24 +2,27 @@
2
2
  "format": "fluidgrids.history",
3
3
  "formatVersion": 1,
4
4
  "name": "update-accepted-completed",
5
- "description": "Phase C: an update accepted and completed by a handler (UPDATE_ACCEPTED, UPDATE_COMPLETED). Parsed and projected, not replayed.",
6
- "source": "src/signals.ts",
7
- "replay": false,
5
+ "description": "An update accepted and completed by its handler (UPDATE_ACCEPTED carries the request, UPDATE_COMPLETED the result); a signal then ends the run. Replayable from C-R1: replay re-delivers the accepted update without its validator.",
6
+ "source": "src/phase-c-updates.ts",
8
7
  "info": {
9
- "runId": "run-1",
10
8
  "workspaceId": "test-workspace",
11
- "taskQueue": "managed"
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"
12
14
  },
13
15
  "nowMs": 1767225900000,
14
- "workflowFn": "waitForApproval",
16
+ "workflowFn": "addressBook",
15
17
  "events": [
16
18
  {
17
19
  "seq": 1,
18
20
  "type": "WORKFLOW_STARTED",
19
21
  "payload": {
20
- "workflowFn": "waitForApproval",
22
+ "workflowFn": "addressBook",
21
23
  "input": null,
22
- "taskQueue": "managed"
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1"
23
26
  },
24
27
  "createdAt": "2026-01-01T00:00:00.000Z"
25
28
  },
@@ -27,7 +30,7 @@
27
30
  "seq": 2,
28
31
  "type": "WORKFLOW_TASK_SCHEDULED",
29
32
  "payload": {
30
- "taskId": "t1"
33
+ "taskId": "run-1-task-1"
31
34
  },
32
35
  "createdAt": "2026-01-01T00:00:00.000Z"
33
36
  },
@@ -35,7 +38,7 @@
35
38
  "seq": 3,
36
39
  "type": "WORKFLOW_TASK_STARTED",
37
40
  "payload": {
38
- "taskId": "t1",
41
+ "taskId": "run-1-task-1",
39
42
  "attempt": 1
40
43
  },
41
44
  "createdAt": "2026-01-01T00:00:00.000Z"
@@ -44,15 +47,16 @@
44
47
  "seq": 4,
45
48
  "type": "WORKFLOW_TASK_COMPLETED",
46
49
  "payload": {
47
- "taskId": "t1"
50
+ "taskId": "run-1-task-1"
48
51
  },
49
- "createdAt": "2026-01-01T00:00:00.000Z"
52
+ "createdAt": "2026-01-01T00:00:00.000Z",
53
+ "taskId": "run-1-task-1"
50
54
  },
51
55
  {
52
56
  "seq": 5,
53
57
  "type": "WORKFLOW_TASK_SCHEDULED",
54
58
  "payload": {
55
- "taskId": "t2"
59
+ "taskId": "run-1-task-2"
56
60
  },
57
61
  "createdAt": "2026-01-01T00:05:00.000Z"
58
62
  },
@@ -60,7 +64,7 @@
60
64
  "seq": 6,
61
65
  "type": "WORKFLOW_TASK_STARTED",
62
66
  "payload": {
63
- "taskId": "t2",
67
+ "taskId": "run-1-task-2",
64
68
  "attempt": 1
65
69
  },
66
70
  "createdAt": "2026-01-01T00:05:00.000Z"
@@ -69,14 +73,14 @@
69
73
  "seq": 7,
70
74
  "type": "WORKFLOW_TASK_COMPLETED",
71
75
  "payload": {
72
- "taskId": "t2"
76
+ "taskId": "run-1-task-2"
73
77
  },
74
- "createdAt": "2026-01-01T00:05:00.000Z"
78
+ "createdAt": "2026-01-01T00:05:00.000Z",
79
+ "taskId": "run-1-task-2"
75
80
  },
76
81
  {
77
82
  "seq": 8,
78
83
  "type": "UPDATE_ACCEPTED",
79
- "taskId": "t2",
80
84
  "payload": {
81
85
  "updateId": "u1",
82
86
  "name": "changeAddress",
@@ -84,19 +88,21 @@
84
88
  "address": "1 Main St"
85
89
  }
86
90
  },
87
- "createdAt": "2026-01-01T00:05:00.000Z"
91
+ "createdAt": "2026-01-01T00:05:00.000Z",
92
+ "taskId": "run-1-task-2"
88
93
  },
89
94
  {
90
95
  "seq": 9,
91
96
  "type": "UPDATE_COMPLETED",
92
- "taskId": "t2",
93
97
  "payload": {
94
98
  "updateId": "u1",
95
99
  "result": {
96
- "accepted": true
100
+ "accepted": true,
101
+ "address": "1 Main St"
97
102
  }
98
103
  },
99
- "createdAt": "2026-01-01T00:05:00.000Z"
104
+ "createdAt": "2026-01-01T00:05:00.000Z",
105
+ "taskId": "run-1-task-2"
100
106
  },
101
107
  {
102
108
  "seq": 10,
@@ -105,7 +111,8 @@
105
111
  "name": "approve",
106
112
  "payload": {
107
113
  "by": "dee"
108
- }
114
+ },
115
+ "receivedAt": "2026-01-01T00:05:00.000Z"
109
116
  },
110
117
  "createdAt": "2026-01-01T00:05:00.000Z"
111
118
  },
@@ -113,7 +120,7 @@
113
120
  "seq": 11,
114
121
  "type": "WORKFLOW_TASK_SCHEDULED",
115
122
  "payload": {
116
- "taskId": "t3"
123
+ "taskId": "run-1-task-3"
117
124
  },
118
125
  "createdAt": "2026-01-01T00:05:00.000Z"
119
126
  },
@@ -121,7 +128,7 @@
121
128
  "seq": 12,
122
129
  "type": "WORKFLOW_TASK_STARTED",
123
130
  "payload": {
124
- "taskId": "t3",
131
+ "taskId": "run-1-task-3",
125
132
  "attempt": 1
126
133
  },
127
134
  "createdAt": "2026-01-01T00:05:00.000Z"
@@ -130,20 +137,28 @@
130
137
  "seq": 13,
131
138
  "type": "WORKFLOW_TASK_COMPLETED",
132
139
  "payload": {
133
- "taskId": "t3"
140
+ "taskId": "run-1-task-3"
134
141
  },
135
- "createdAt": "2026-01-01T00:05:00.000Z"
142
+ "createdAt": "2026-01-01T00:05:00.000Z",
143
+ "taskId": "run-1-task-3"
136
144
  },
137
145
  {
138
146
  "seq": 14,
139
147
  "type": "WORKFLOW_COMPLETED",
140
- "taskId": "t3",
141
148
  "payload": {
142
149
  "output": {
143
- "approvedBy": "dee"
150
+ "approvedBy": "dee",
151
+ "address": "1 Main St"
144
152
  }
145
153
  },
146
- "createdAt": "2026-01-01T00:05:00.000Z"
154
+ "createdAt": "2026-01-01T00:05:00.000Z",
155
+ "taskId": "run-1-task-3"
147
156
  }
148
- ]
157
+ ],
158
+ "expected": {
159
+ "protocol": 1,
160
+ "outcome": "commands",
161
+ "commands": [],
162
+ "logs": []
163
+ }
149
164
  }
@@ -0,0 +1,246 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "update-default-handler",
5
+ "description": "setDefaultUpdateHandler takes names the workflow does not declare; its validator rejects one (no event).",
6
+ "source": "src/phase-c-updates.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": "anyUpdate",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "anyUpdate",
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": "WORKFLOW_TASK_SCHEDULED",
58
+ "payload": {
59
+ "taskId": "run-1-task-2"
60
+ },
61
+ "createdAt": "2026-01-01T00:00:00.000Z"
62
+ },
63
+ {
64
+ "seq": 6,
65
+ "type": "WORKFLOW_TASK_STARTED",
66
+ "payload": {
67
+ "taskId": "run-1-task-2",
68
+ "attempt": 1
69
+ },
70
+ "createdAt": "2026-01-01T00:00:00.000Z"
71
+ },
72
+ {
73
+ "seq": 7,
74
+ "type": "WORKFLOW_TASK_COMPLETED",
75
+ "payload": {
76
+ "taskId": "run-1-task-2"
77
+ },
78
+ "createdAt": "2026-01-01T00:00:00.000Z",
79
+ "taskId": "run-1-task-2"
80
+ },
81
+ {
82
+ "seq": 8,
83
+ "type": "UPDATE_ACCEPTED",
84
+ "payload": {
85
+ "updateId": "u1",
86
+ "name": "setColour",
87
+ "args": {
88
+ "colour": "teal"
89
+ }
90
+ },
91
+ "createdAt": "2026-01-01T00:00:00.000Z",
92
+ "taskId": "run-1-task-2"
93
+ },
94
+ {
95
+ "seq": 9,
96
+ "type": "UPDATE_COMPLETED",
97
+ "payload": {
98
+ "updateId": "u1",
99
+ "result": {
100
+ "name": "setColour",
101
+ "args": {
102
+ "colour": "teal"
103
+ }
104
+ }
105
+ },
106
+ "createdAt": "2026-01-01T00:00:00.000Z",
107
+ "taskId": "run-1-task-2"
108
+ },
109
+ {
110
+ "seq": 10,
111
+ "type": "WORKFLOW_TASK_SCHEDULED",
112
+ "payload": {
113
+ "taskId": "run-1-task-3"
114
+ },
115
+ "createdAt": "2026-01-01T00:00:00.000Z"
116
+ },
117
+ {
118
+ "seq": 11,
119
+ "type": "WORKFLOW_TASK_STARTED",
120
+ "payload": {
121
+ "taskId": "run-1-task-3",
122
+ "attempt": 1
123
+ },
124
+ "createdAt": "2026-01-01T00:00:00.000Z"
125
+ },
126
+ {
127
+ "seq": 12,
128
+ "type": "WORKFLOW_TASK_COMPLETED",
129
+ "payload": {
130
+ "taskId": "run-1-task-3"
131
+ },
132
+ "createdAt": "2026-01-01T00:00:00.000Z",
133
+ "taskId": "run-1-task-3"
134
+ },
135
+ {
136
+ "seq": 13,
137
+ "type": "WORKFLOW_TASK_SCHEDULED",
138
+ "payload": {
139
+ "taskId": "run-1-task-4"
140
+ },
141
+ "createdAt": "2026-01-01T00:00:00.000Z"
142
+ },
143
+ {
144
+ "seq": 14,
145
+ "type": "WORKFLOW_TASK_STARTED",
146
+ "payload": {
147
+ "taskId": "run-1-task-4",
148
+ "attempt": 1
149
+ },
150
+ "createdAt": "2026-01-01T00:00:00.000Z"
151
+ },
152
+ {
153
+ "seq": 15,
154
+ "type": "WORKFLOW_TASK_COMPLETED",
155
+ "payload": {
156
+ "taskId": "run-1-task-4"
157
+ },
158
+ "createdAt": "2026-01-01T00:00:00.000Z",
159
+ "taskId": "run-1-task-4"
160
+ },
161
+ {
162
+ "seq": 16,
163
+ "type": "UPDATE_ACCEPTED",
164
+ "payload": {
165
+ "updateId": "u3",
166
+ "name": "setSize",
167
+ "args": {
168
+ "size": 3
169
+ }
170
+ },
171
+ "createdAt": "2026-01-01T00:00:00.000Z",
172
+ "taskId": "run-1-task-4"
173
+ },
174
+ {
175
+ "seq": 17,
176
+ "type": "UPDATE_COMPLETED",
177
+ "payload": {
178
+ "updateId": "u3",
179
+ "result": {
180
+ "name": "setSize",
181
+ "args": {
182
+ "size": 3
183
+ }
184
+ }
185
+ },
186
+ "createdAt": "2026-01-01T00:00:00.000Z",
187
+ "taskId": "run-1-task-4"
188
+ },
189
+ {
190
+ "seq": 18,
191
+ "type": "SIGNAL_RECEIVED",
192
+ "payload": {
193
+ "name": "stop",
194
+ "payload": null,
195
+ "receivedAt": "2026-01-01T00:00:00.000Z"
196
+ },
197
+ "createdAt": "2026-01-01T00:00:00.000Z"
198
+ },
199
+ {
200
+ "seq": 19,
201
+ "type": "WORKFLOW_TASK_SCHEDULED",
202
+ "payload": {
203
+ "taskId": "run-1-task-5"
204
+ },
205
+ "createdAt": "2026-01-01T00:00:00.000Z"
206
+ },
207
+ {
208
+ "seq": 20,
209
+ "type": "WORKFLOW_TASK_STARTED",
210
+ "payload": {
211
+ "taskId": "run-1-task-5",
212
+ "attempt": 1
213
+ },
214
+ "createdAt": "2026-01-01T00:00:00.000Z"
215
+ },
216
+ {
217
+ "seq": 21,
218
+ "type": "WORKFLOW_TASK_COMPLETED",
219
+ "payload": {
220
+ "taskId": "run-1-task-5"
221
+ },
222
+ "createdAt": "2026-01-01T00:00:00.000Z",
223
+ "taskId": "run-1-task-5"
224
+ },
225
+ {
226
+ "seq": 22,
227
+ "type": "WORKFLOW_COMPLETED",
228
+ "payload": {
229
+ "output": {
230
+ "seen": [
231
+ "setColour",
232
+ "setSize"
233
+ ]
234
+ }
235
+ },
236
+ "createdAt": "2026-01-01T00:00:00.000Z",
237
+ "taskId": "run-1-task-5"
238
+ }
239
+ ],
240
+ "expected": {
241
+ "protocol": 1,
242
+ "outcome": "commands",
243
+ "commands": [],
244
+ "logs": []
245
+ }
246
+ }
@@ -0,0 +1,196 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "update-handler-awaits-activity",
5
+ "description": "The update handler awaits an activity: UPDATE_ACCEPTED in the delivering task, UPDATE_COMPLETED in the task after ACTIVITY_COMPLETED; the run waits for its handlers.",
6
+ "source": "src/phase-c-updates.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": "slowUpdate",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "slowUpdate",
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": "WORKFLOW_TASK_SCHEDULED",
58
+ "payload": {
59
+ "taskId": "run-1-task-2"
60
+ },
61
+ "createdAt": "2026-01-01T00:00:00.000Z"
62
+ },
63
+ {
64
+ "seq": 6,
65
+ "type": "WORKFLOW_TASK_STARTED",
66
+ "payload": {
67
+ "taskId": "run-1-task-2",
68
+ "attempt": 1
69
+ },
70
+ "createdAt": "2026-01-01T00:00:00.000Z"
71
+ },
72
+ {
73
+ "seq": 7,
74
+ "type": "WORKFLOW_TASK_COMPLETED",
75
+ "payload": {
76
+ "taskId": "run-1-task-2"
77
+ },
78
+ "createdAt": "2026-01-01T00:00:00.000Z",
79
+ "taskId": "run-1-task-2"
80
+ },
81
+ {
82
+ "seq": 8,
83
+ "type": "UPDATE_ACCEPTED",
84
+ "payload": {
85
+ "updateId": "u1",
86
+ "name": "lookup",
87
+ "args": {
88
+ "id": "i-9"
89
+ }
90
+ },
91
+ "createdAt": "2026-01-01T00:00:00.000Z",
92
+ "taskId": "run-1-task-2"
93
+ },
94
+ {
95
+ "seq": 9,
96
+ "type": "ACTIVITY_SCHEDULED",
97
+ "payload": {
98
+ "activityId": "a1",
99
+ "kind": "node",
100
+ "nodeType": "internal:http",
101
+ "operation": "execute",
102
+ "args": {
103
+ "url": "https://example.test/items/i-9"
104
+ },
105
+ "retry": {
106
+ "retryDelay": 1000,
107
+ "backoffMultiplier": 2,
108
+ "maxDelay": 100000
109
+ }
110
+ },
111
+ "createdAt": "2026-01-01T00:00:00.000Z",
112
+ "taskId": "run-1-task-2"
113
+ },
114
+ {
115
+ "seq": 10,
116
+ "type": "ACTIVITY_STARTED",
117
+ "payload": {
118
+ "activityId": "a1",
119
+ "attempt": 1
120
+ },
121
+ "createdAt": "2026-01-01T00:00:00.000Z"
122
+ },
123
+ {
124
+ "seq": 11,
125
+ "type": "ACTIVITY_COMPLETED",
126
+ "payload": {
127
+ "activityId": "a1",
128
+ "attempt": 1,
129
+ "result": {
130
+ "status": 200,
131
+ "url": "https://example.test/items/i-9"
132
+ }
133
+ },
134
+ "createdAt": "2026-01-01T00:00:00.000Z"
135
+ },
136
+ {
137
+ "seq": 12,
138
+ "type": "WORKFLOW_TASK_SCHEDULED",
139
+ "payload": {
140
+ "taskId": "run-1-task-3"
141
+ },
142
+ "createdAt": "2026-01-01T00:00:00.000Z"
143
+ },
144
+ {
145
+ "seq": 13,
146
+ "type": "WORKFLOW_TASK_STARTED",
147
+ "payload": {
148
+ "taskId": "run-1-task-3",
149
+ "attempt": 1
150
+ },
151
+ "createdAt": "2026-01-01T00:00:00.000Z"
152
+ },
153
+ {
154
+ "seq": 14,
155
+ "type": "WORKFLOW_TASK_COMPLETED",
156
+ "payload": {
157
+ "taskId": "run-1-task-3"
158
+ },
159
+ "createdAt": "2026-01-01T00:00:00.000Z",
160
+ "taskId": "run-1-task-3"
161
+ },
162
+ {
163
+ "seq": 15,
164
+ "type": "UPDATE_COMPLETED",
165
+ "payload": {
166
+ "updateId": "u1",
167
+ "result": {
168
+ "id": "i-9",
169
+ "response": {
170
+ "status": 200,
171
+ "url": "https://example.test/items/i-9"
172
+ }
173
+ }
174
+ },
175
+ "createdAt": "2026-01-01T00:00:00.000Z",
176
+ "taskId": "run-1-task-3"
177
+ },
178
+ {
179
+ "seq": 16,
180
+ "type": "WORKFLOW_COMPLETED",
181
+ "payload": {
182
+ "output": {
183
+ "done": true
184
+ }
185
+ },
186
+ "createdAt": "2026-01-01T00:00:00.000Z",
187
+ "taskId": "run-1-task-3"
188
+ }
189
+ ],
190
+ "expected": {
191
+ "protocol": 1,
192
+ "outcome": "commands",
193
+ "commands": [],
194
+ "logs": []
195
+ }
196
+ }