@fluidgrids/workflows 2026.1028.2 → 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 (154) hide show
  1. package/README.md +181 -11
  2. package/dist/{activation-BBh1p82z.d.cts → activation-DqUfpHzk.d.cts} +1 -1
  3. package/dist/{activation-DnhG7SmF.d.ts → activation-xpx1oWuo.d.ts} +1 -1
  4. package/dist/{chunk-VRHHBPT6.js → chunk-2D3MYIIF.js} +1212 -128
  5. package/dist/chunk-3U2NU7YC.cjs +124 -0
  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-5HIVIV53.js +330 -0
  9. package/dist/chunk-5MFVJM76.js +1222 -0
  10. package/dist/{chunk-JD2VQIDZ.cjs → chunk-672KMMBK.cjs} +2 -2
  11. package/dist/{chunk-C5OLWZ42.js → chunk-6A2FGSUS.js} +22 -14
  12. package/dist/{chunk-XKJA7KX3.js → chunk-6OLN6BMB.js} +52 -3
  13. package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
  14. package/dist/{chunk-2J6TF7YI.cjs → chunk-A5SXCA62.cjs} +10 -3
  15. package/dist/{chunk-BO6OVILK.js → chunk-AC6ZEXVR.js} +10 -4
  16. package/dist/{chunk-ABFZWYHT.js → chunk-AE5Q6ZAJ.js} +315 -50
  17. package/dist/chunk-C4F5KJTI.js +293 -0
  18. package/dist/{chunk-IISBRUWJ.js → chunk-G5H32GIG.js} +1 -1
  19. package/dist/chunk-GEQDGUGB.cjs +2719 -0
  20. package/dist/{chunk-XHXIDVEC.js → chunk-HCM7ZC7Q.js} +1 -1
  21. package/dist/chunk-HMZUGSMU.cjs +1554 -0
  22. package/dist/{chunk-SAOBPYYJ.cjs → chunk-IQPXHQQQ.cjs} +8 -4
  23. package/dist/{chunk-P6TA5EZT.cjs → chunk-ISOIA7NV.cjs} +335 -58
  24. package/dist/chunk-JSC75O5C.cjs +167 -0
  25. package/dist/chunk-M272AHEX.js +25 -0
  26. package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
  27. package/dist/chunk-ODZ2IAR2.cjs +1247 -0
  28. package/dist/chunk-Q4MWQNJK.cjs +28 -0
  29. package/dist/{chunk-HWJZVOG7.js → chunk-SR7TR5KX.js} +6 -2
  30. package/dist/{chunk-FEW3JBYA.cjs → chunk-TCTE7DX5.cjs} +3 -3
  31. package/dist/{chunk-623FVQSN.cjs → chunk-TYF56RGB.cjs} +123 -0
  32. package/dist/chunk-VA4OFR72.cjs +324 -0
  33. package/dist/chunk-VU5S5A7V.js +150 -0
  34. package/dist/chunk-YEHR4NNE.js +1522 -0
  35. package/dist/{chunk-FMSW2HDF.cjs → chunk-ZCGKGDCL.cjs} +23 -15
  36. package/dist/codegen/index.d.cts +2 -2
  37. package/dist/codegen/index.d.ts +2 -2
  38. package/dist/collect-6NIEufHd.d.ts +103 -0
  39. package/dist/collect-CcTCKqx6.d.cts +103 -0
  40. package/dist/{file-BOoHZgoQ.d.cts → file-BxYpwjRQ.d.cts} +1007 -21
  41. package/dist/{file-yuPCFU5b.d.ts → file-CFdPQJI9.d.ts} +1007 -21
  42. package/dist/history/index.cjs +375 -86
  43. package/dist/history/index.d.cts +590 -12
  44. package/dist/history/index.d.ts +590 -12
  45. package/dist/history/index.js +50 -4
  46. package/dist/index.cjs +156 -50
  47. package/dist/index.d.cts +38 -58
  48. package/dist/index.d.ts +38 -58
  49. package/dist/index.js +6 -4
  50. package/dist/interceptors-CNcr2dlk.d.ts +159 -0
  51. package/dist/interceptors-CqkNZVfI.d.cts +159 -0
  52. package/dist/ir/index.cjs +362 -38
  53. package/dist/ir/index.d.cts +282 -7
  54. package/dist/ir/index.d.ts +282 -7
  55. package/dist/ir/index.js +329 -23
  56. package/dist/{lower-BzmUz0sq.d.cts → lower-BtRfIW2A.d.cts} +56 -8
  57. package/dist/{lower-_-iT4HYs.d.ts → lower-CpsMFOFX.d.ts} +56 -8
  58. package/dist/{manifest-C8N6HDYl.d.ts → manifest-D-I_twys.d.ts} +1 -1
  59. package/dist/{manifest-0OLw0i7k.d.cts → manifest-DahBQVM8.d.cts} +1 -1
  60. package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
  61. package/dist/node-evaluator-LEEVD7H7.js +14 -0
  62. package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
  63. package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
  64. package/dist/quickjs/index.cjs +28 -27
  65. package/dist/quickjs/index.d.cts +6 -6
  66. package/dist/quickjs/index.d.ts +6 -6
  67. package/dist/quickjs/index.js +10 -9
  68. package/dist/roundtrip/index.cjs +259 -51
  69. package/dist/roundtrip/index.d.cts +100 -9
  70. package/dist/roundtrip/index.d.ts +100 -9
  71. package/dist/roundtrip/index.js +177 -11
  72. package/dist/runtime/index.cjs +21 -20
  73. package/dist/runtime/index.d.cts +184 -15
  74. package/dist/runtime/index.d.ts +184 -15
  75. package/dist/runtime/index.js +8 -7
  76. package/dist/testing/index.cjs +1122 -115
  77. package/dist/testing/index.d.cts +294 -13
  78. package/dist/testing/index.d.ts +294 -13
  79. package/dist/testing/index.js +1086 -84
  80. package/dist/{types-DV-HX_Gt.d.ts → types-Bv2i4cBX.d.cts} +244 -33
  81. package/dist/{types-CpBBjaGX.d.cts → types-DGx-b9eq.d.ts} +244 -33
  82. package/dist/{types-BGoPzgcl.d.ts → types-V7jEEUaL.d.cts} +20 -1
  83. package/dist/{types-BGoPzgcl.d.cts → types-V7jEEUaL.d.ts} +20 -1
  84. package/dist/{workflow-Bpr3vnA_.d.ts → workflow-B18OeF7g.d.ts} +2 -2
  85. package/dist/workflow-BGnv8SS6.d.ts +803 -0
  86. package/dist/{workflow-FXUkpIBc.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
  87. package/dist/workflow-DS32Gtws.d.cts +803 -0
  88. package/fixtures/histories/activity-options-updated.history.json +159 -0
  89. package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
  90. package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
  91. package/fixtures/histories/benign-failure.history.json +146 -0
  92. package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
  93. package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
  94. package/fixtures/histories/child-options-roundtrip.history.json +192 -0
  95. package/fixtures/histories/codec-opaque.history.json +229 -0
  96. package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
  97. package/fixtures/histories/continue-as-new-options.history.json +99 -0
  98. package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
  99. package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
  100. package/fixtures/histories/dynamic-workflow.history.json +150 -0
  101. package/fixtures/histories/execution-timeout-chain.history.json +98 -0
  102. package/fixtures/histories/external-cancel-resolved.history.json +123 -0
  103. package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
  104. package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
  105. package/fixtures/histories/handler-drain-warn.history.json +222 -0
  106. package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
  107. package/fixtures/histories/interceptor-headers.history.json +339 -0
  108. package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
  109. package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
  110. package/fixtures/histories/local-activity-completed.history.json +157 -0
  111. package/fixtures/histories/local-activity-failed.history.json +93 -0
  112. package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
  113. package/fixtures/histories/query-custom.history.json +213 -0
  114. package/fixtures/histories/query-default-handler.history.json +120 -0
  115. package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
  116. package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
  117. package/fixtures/histories/run-retry-last-failure.history.json +90 -0
  118. package/fixtures/histories/run-timeout.history.json +159 -0
  119. package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
  120. package/fixtures/histories/search-attributes-upserted.history.json +177 -0
  121. package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
  122. package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
  123. package/fixtures/histories/update-accepted-completed.history.json +45 -30
  124. package/fixtures/histories/update-default-handler.history.json +246 -0
  125. package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
  126. package/fixtures/histories/update-not-handled.history.json +138 -0
  127. package/fixtures/histories/update-rejected-no-event.history.json +190 -0
  128. package/fixtures/histories/update-with-start-admitted.history.json +150 -0
  129. package/fixtures/histories/user-activity-cancel.history.json +149 -0
  130. package/fixtures/histories/user-activity-retry.history.json +143 -0
  131. package/fixtures/histories/user-activity.history.json +149 -0
  132. package/package.json +1 -1
  133. package/schema/bridge-v2.schema.json +1062 -0
  134. package/schema/history-file.schema.json +538 -83
  135. package/schema/ir-v2.schema.json +290 -0
  136. package/schema/payload-fields.json +162 -0
  137. package/schema/run-event.schema.json +503 -82
  138. package/schema/workflow-command.schema.json +372 -69
  139. package/schema/workflow-task.schema.json +924 -171
  140. package/dist/assemble-BLqQ8lSu.d.cts +0 -39
  141. package/dist/assemble-DWgaXHd-.d.ts +0 -39
  142. package/dist/chunk-DHTLALBL.cjs +0 -80
  143. package/dist/chunk-DJYMDLV5.js +0 -227
  144. package/dist/chunk-I5LR3D2K.js +0 -869
  145. package/dist/chunk-M4BBAERY.cjs +0 -1635
  146. package/dist/chunk-N23SKIG4.js +0 -73
  147. package/dist/chunk-PZCVF76Q.cjs +0 -868
  148. package/dist/chunk-QQ6ULXHI.cjs +0 -885
  149. package/dist/chunk-UK3WM7YZ.cjs +0 -75
  150. package/dist/chunk-VOKMAAJP.js +0 -848
  151. package/dist/node-evaluator-4MSDKWOG.cjs +0 -22
  152. package/dist/node-evaluator-SX4LEYQC.js +0 -12
  153. package/dist/workflow-C2a05WUJ.d.ts +0 -444
  154. package/dist/workflow-J-yYixny.d.cts +0 -444
@@ -0,0 +1,222 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "handler-drain-warn",
5
+ "description": "The workflow returns while the audit handler still runs: the open final task (its completion removed from the file) returns one warning and unfinishedHandlers; the note handler uses ABANDON and is not reported.",
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": 1767225660000,
16
+ "workflowFn": "handlerDrain",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "handlerDrain",
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": 60000,
61
+ "fireAt": "2026-01-01T00:01: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": "audit",
71
+ "payload": {
72
+ "entry": "e-1"
73
+ },
74
+ "receivedAt": "2026-01-01T00:00:00.000Z"
75
+ },
76
+ "createdAt": "2026-01-01T00:00:00.000Z"
77
+ },
78
+ {
79
+ "seq": 7,
80
+ "type": "WORKFLOW_TASK_SCHEDULED",
81
+ "payload": {
82
+ "taskId": "run-1-task-2"
83
+ },
84
+ "createdAt": "2026-01-01T00:00:00.000Z"
85
+ },
86
+ {
87
+ "seq": 8,
88
+ "type": "WORKFLOW_TASK_STARTED",
89
+ "payload": {
90
+ "taskId": "run-1-task-2",
91
+ "attempt": 1
92
+ },
93
+ "createdAt": "2026-01-01T00:00:00.000Z"
94
+ },
95
+ {
96
+ "seq": 9,
97
+ "type": "WORKFLOW_TASK_COMPLETED",
98
+ "payload": {
99
+ "taskId": "run-1-task-2"
100
+ },
101
+ "createdAt": "2026-01-01T00:00:00.000Z",
102
+ "taskId": "run-1-task-2"
103
+ },
104
+ {
105
+ "seq": 10,
106
+ "type": "TIMER_STARTED",
107
+ "payload": {
108
+ "timerId": "t2",
109
+ "durationMs": 120000,
110
+ "fireAt": "2026-01-01T00:02:00.000Z"
111
+ },
112
+ "createdAt": "2026-01-01T00:00:00.000Z",
113
+ "taskId": "run-1-task-2"
114
+ },
115
+ {
116
+ "seq": 11,
117
+ "type": "SIGNAL_RECEIVED",
118
+ "payload": {
119
+ "name": "note",
120
+ "payload": {
121
+ "text": "later"
122
+ },
123
+ "receivedAt": "2026-01-01T00:00:00.000Z"
124
+ },
125
+ "createdAt": "2026-01-01T00:00:00.000Z"
126
+ },
127
+ {
128
+ "seq": 12,
129
+ "type": "WORKFLOW_TASK_SCHEDULED",
130
+ "payload": {
131
+ "taskId": "run-1-task-3"
132
+ },
133
+ "createdAt": "2026-01-01T00:00:00.000Z"
134
+ },
135
+ {
136
+ "seq": 13,
137
+ "type": "WORKFLOW_TASK_STARTED",
138
+ "payload": {
139
+ "taskId": "run-1-task-3",
140
+ "attempt": 1
141
+ },
142
+ "createdAt": "2026-01-01T00:00:00.000Z"
143
+ },
144
+ {
145
+ "seq": 14,
146
+ "type": "WORKFLOW_TASK_COMPLETED",
147
+ "payload": {
148
+ "taskId": "run-1-task-3"
149
+ },
150
+ "createdAt": "2026-01-01T00:00:00.000Z",
151
+ "taskId": "run-1-task-3"
152
+ },
153
+ {
154
+ "seq": 15,
155
+ "type": "TIMER_STARTED",
156
+ "payload": {
157
+ "timerId": "t3",
158
+ "durationMs": 3600000,
159
+ "fireAt": "2026-01-01T01:00:00.000Z"
160
+ },
161
+ "createdAt": "2026-01-01T00:00:00.000Z",
162
+ "taskId": "run-1-task-3"
163
+ },
164
+ {
165
+ "seq": 16,
166
+ "type": "TIMER_FIRED",
167
+ "payload": {
168
+ "timerId": "t1"
169
+ },
170
+ "createdAt": "2026-01-01T00:01:00.000Z"
171
+ },
172
+ {
173
+ "seq": 17,
174
+ "type": "WORKFLOW_TASK_SCHEDULED",
175
+ "payload": {
176
+ "taskId": "run-1-task-4"
177
+ },
178
+ "createdAt": "2026-01-01T00:01:00.000Z"
179
+ },
180
+ {
181
+ "seq": 18,
182
+ "type": "WORKFLOW_TASK_STARTED",
183
+ "payload": {
184
+ "taskId": "run-1-task-4",
185
+ "attempt": 1
186
+ },
187
+ "createdAt": "2026-01-01T00:01:00.000Z"
188
+ }
189
+ ],
190
+ "expected": {
191
+ "protocol": 1,
192
+ "outcome": "commands",
193
+ "commands": [
194
+ {
195
+ "type": "COMPLETE_WORKFLOW",
196
+ "output": {
197
+ "done": true
198
+ }
199
+ }
200
+ ],
201
+ "logs": [
202
+ {
203
+ "level": "warn",
204
+ "message": "The workflow finished while 1 signal handler was still running (audit x1); await ctx.allHandlersFinished() before returning, or set unfinishedPolicy: 'ABANDON' on the handler",
205
+ "data": [
206
+ {
207
+ "kind": "signal",
208
+ "name": "audit",
209
+ "count": 1
210
+ }
211
+ ]
212
+ }
213
+ ],
214
+ "unfinishedHandlers": [
215
+ {
216
+ "kind": "signal",
217
+ "name": "audit",
218
+ "count": 1
219
+ }
220
+ ]
221
+ }
222
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "heartbeat-details-on-retry",
5
+ "description": "Attempt 1 heartbeats { page: 4 } and fails; attempt 2 receives the details and resumes at page 4. Only the final attempt leaves history.",
6
+ "source": "src/parity-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": 1767225601000,
16
+ "workflowFn": "heartbeatResume",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "heartbeatResume",
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": "store/exporter",
62
+ "operation": "exportPages",
63
+ "args": {
64
+ "pages": 10
65
+ },
66
+ "retry": {
67
+ "retryDelay": 1000,
68
+ "backoffMultiplier": 2,
69
+ "maxDelay": 100000,
70
+ "maxRetries": 3
71
+ },
72
+ "nodeVersion": "2.0.0",
73
+ "heartbeatTimeout": 30000
74
+ },
75
+ "createdAt": "2026-01-01T00:00:00.000Z",
76
+ "taskId": "run-1-task-1"
77
+ },
78
+ {
79
+ "seq": 6,
80
+ "type": "ACTIVITY_STARTED",
81
+ "payload": {
82
+ "activityId": "a1",
83
+ "attempt": 2
84
+ },
85
+ "createdAt": "2026-01-01T00:00:01.000Z"
86
+ },
87
+ {
88
+ "seq": 7,
89
+ "type": "ACTIVITY_COMPLETED",
90
+ "payload": {
91
+ "activityId": "a1",
92
+ "attempt": 2,
93
+ "result": {
94
+ "exported": 10,
95
+ "resumedFrom": 4
96
+ }
97
+ },
98
+ "createdAt": "2026-01-01T00:00:01.000Z"
99
+ },
100
+ {
101
+ "seq": 8,
102
+ "type": "WORKFLOW_TASK_SCHEDULED",
103
+ "payload": {
104
+ "taskId": "run-1-task-2"
105
+ },
106
+ "createdAt": "2026-01-01T00:00:01.000Z"
107
+ },
108
+ {
109
+ "seq": 9,
110
+ "type": "WORKFLOW_TASK_STARTED",
111
+ "payload": {
112
+ "taskId": "run-1-task-2",
113
+ "attempt": 1
114
+ },
115
+ "createdAt": "2026-01-01T00:00:01.000Z"
116
+ },
117
+ {
118
+ "seq": 10,
119
+ "type": "WORKFLOW_TASK_COMPLETED",
120
+ "payload": {
121
+ "taskId": "run-1-task-2"
122
+ },
123
+ "createdAt": "2026-01-01T00:00:01.000Z",
124
+ "taskId": "run-1-task-2"
125
+ },
126
+ {
127
+ "seq": 11,
128
+ "type": "WORKFLOW_COMPLETED",
129
+ "payload": {
130
+ "output": {
131
+ "exported": 10,
132
+ "resumedFrom": 4
133
+ }
134
+ },
135
+ "createdAt": "2026-01-01T00:00:01.000Z",
136
+ "taskId": "run-1-task-2"
137
+ }
138
+ ],
139
+ "expected": {
140
+ "protocol": 1,
141
+ "outcome": "commands",
142
+ "commands": [],
143
+ "logs": []
144
+ }
145
+ }
@@ -0,0 +1,339 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "interceptor-headers",
5
+ "description": "Exported interceptors copy the start header traceparent onto every activity and child (ACTIVITY_SCHEDULED, CHILD_RUN_INITIATED headers) and wrap signals with their sender header.",
6
+ "source": "src/phase-c-interceptors.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": "traced",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "traced",
23
+ "input": null,
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1",
26
+ "headers": {
27
+ "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
28
+ }
29
+ },
30
+ "createdAt": "2026-01-01T00:00:00.000Z"
31
+ },
32
+ {
33
+ "seq": 2,
34
+ "type": "WORKFLOW_TASK_SCHEDULED",
35
+ "payload": {
36
+ "taskId": "run-1-task-1"
37
+ },
38
+ "createdAt": "2026-01-01T00:00:00.000Z"
39
+ },
40
+ {
41
+ "seq": 3,
42
+ "type": "WORKFLOW_TASK_STARTED",
43
+ "payload": {
44
+ "taskId": "run-1-task-1",
45
+ "attempt": 1
46
+ },
47
+ "createdAt": "2026-01-01T00:00:00.000Z"
48
+ },
49
+ {
50
+ "seq": 4,
51
+ "type": "WORKFLOW_TASK_COMPLETED",
52
+ "payload": {
53
+ "taskId": "run-1-task-1"
54
+ },
55
+ "createdAt": "2026-01-01T00:00:00.000Z",
56
+ "taskId": "run-1-task-1"
57
+ },
58
+ {
59
+ "seq": 5,
60
+ "type": "ACTIVITY_SCHEDULED",
61
+ "payload": {
62
+ "activityId": "a1",
63
+ "kind": "node",
64
+ "nodeType": "internal:http",
65
+ "operation": "execute",
66
+ "args": {
67
+ "url": "https://example.test/traced"
68
+ },
69
+ "retry": {
70
+ "retryDelay": 1000,
71
+ "backoffMultiplier": 2,
72
+ "maxDelay": 100000
73
+ },
74
+ "headers": {
75
+ "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
76
+ }
77
+ },
78
+ "createdAt": "2026-01-01T00:00:00.000Z",
79
+ "taskId": "run-1-task-1"
80
+ },
81
+ {
82
+ "seq": 6,
83
+ "type": "ACTIVITY_STARTED",
84
+ "payload": {
85
+ "activityId": "a1",
86
+ "attempt": 1
87
+ },
88
+ "createdAt": "2026-01-01T00:00:00.000Z"
89
+ },
90
+ {
91
+ "seq": 7,
92
+ "type": "ACTIVITY_COMPLETED",
93
+ "payload": {
94
+ "activityId": "a1",
95
+ "attempt": 1,
96
+ "result": {
97
+ "status": 200,
98
+ "url": "https://example.test/traced"
99
+ }
100
+ },
101
+ "createdAt": "2026-01-01T00:00:00.000Z"
102
+ },
103
+ {
104
+ "seq": 8,
105
+ "type": "WORKFLOW_TASK_SCHEDULED",
106
+ "payload": {
107
+ "taskId": "run-1-task-2"
108
+ },
109
+ "createdAt": "2026-01-01T00:00:00.000Z"
110
+ },
111
+ {
112
+ "seq": 9,
113
+ "type": "WORKFLOW_TASK_STARTED",
114
+ "payload": {
115
+ "taskId": "run-1-task-2",
116
+ "attempt": 1
117
+ },
118
+ "createdAt": "2026-01-01T00:00:00.000Z"
119
+ },
120
+ {
121
+ "seq": 10,
122
+ "type": "WORKFLOW_TASK_COMPLETED",
123
+ "payload": {
124
+ "taskId": "run-1-task-2"
125
+ },
126
+ "createdAt": "2026-01-01T00:00:00.000Z",
127
+ "taskId": "run-1-task-2"
128
+ },
129
+ {
130
+ "seq": 11,
131
+ "type": "CHILD_RUN_INITIATED",
132
+ "payload": {
133
+ "childId": "c1",
134
+ "workflowKey": "graph-child",
135
+ "input": {
136
+ "n": 1
137
+ },
138
+ "options": {
139
+ "parentClosePolicy": "TERMINATE"
140
+ },
141
+ "headers": {
142
+ "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
143
+ }
144
+ },
145
+ "createdAt": "2026-01-01T00:00:00.000Z",
146
+ "taskId": "run-1-task-2"
147
+ },
148
+ {
149
+ "seq": 12,
150
+ "type": "CHILD_RUN_STARTED",
151
+ "payload": {
152
+ "childId": "c1",
153
+ "childRunId": "run-1-c1",
154
+ "executionKind": "GRAPH"
155
+ },
156
+ "createdAt": "2026-01-01T00:00:00.000Z"
157
+ },
158
+ {
159
+ "seq": 13,
160
+ "type": "WORKFLOW_TASK_SCHEDULED",
161
+ "payload": {
162
+ "taskId": "run-1-task-3"
163
+ },
164
+ "createdAt": "2026-01-01T00:00:00.000Z"
165
+ },
166
+ {
167
+ "seq": 14,
168
+ "type": "CHILD_RUN_COMPLETED",
169
+ "payload": {
170
+ "childId": "c1",
171
+ "childRunId": "run-1-c1",
172
+ "result": {
173
+ "echoed": {
174
+ "n": 1
175
+ }
176
+ }
177
+ },
178
+ "createdAt": "2026-01-01T00:00:00.000Z"
179
+ },
180
+ {
181
+ "seq": 15,
182
+ "type": "WORKFLOW_TASK_STARTED",
183
+ "payload": {
184
+ "taskId": "run-1-task-3",
185
+ "attempt": 1
186
+ },
187
+ "createdAt": "2026-01-01T00:00:00.000Z"
188
+ },
189
+ {
190
+ "seq": 16,
191
+ "type": "WORKFLOW_TASK_COMPLETED",
192
+ "payload": {
193
+ "taskId": "run-1-task-3"
194
+ },
195
+ "createdAt": "2026-01-01T00:00:00.000Z",
196
+ "taskId": "run-1-task-3"
197
+ },
198
+ {
199
+ "seq": 17,
200
+ "type": "ACTIVITY_SCHEDULED",
201
+ "payload": {
202
+ "activityId": "a2",
203
+ "kind": "user",
204
+ "activityName": "billing.charge",
205
+ "taskQueue": "payments",
206
+ "args": {
207
+ "amount": 3
208
+ },
209
+ "retry": {
210
+ "retryDelay": 1000,
211
+ "backoffMultiplier": 2,
212
+ "maxDelay": 100000
213
+ },
214
+ "headers": {
215
+ "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
216
+ }
217
+ },
218
+ "createdAt": "2026-01-01T00:00:00.000Z",
219
+ "taskId": "run-1-task-3"
220
+ },
221
+ {
222
+ "seq": 18,
223
+ "type": "ACTIVITY_STARTED",
224
+ "payload": {
225
+ "activityId": "a2",
226
+ "attempt": 1
227
+ },
228
+ "createdAt": "2026-01-01T00:00:00.000Z"
229
+ },
230
+ {
231
+ "seq": 19,
232
+ "type": "ACTIVITY_COMPLETED",
233
+ "payload": {
234
+ "activityId": "a2",
235
+ "attempt": 1,
236
+ "result": {
237
+ "chargeId": "ch_t"
238
+ }
239
+ },
240
+ "createdAt": "2026-01-01T00:00:00.000Z"
241
+ },
242
+ {
243
+ "seq": 20,
244
+ "type": "WORKFLOW_TASK_SCHEDULED",
245
+ "payload": {
246
+ "taskId": "run-1-task-4"
247
+ },
248
+ "createdAt": "2026-01-01T00:00:00.000Z"
249
+ },
250
+ {
251
+ "seq": 21,
252
+ "type": "WORKFLOW_TASK_STARTED",
253
+ "payload": {
254
+ "taskId": "run-1-task-4",
255
+ "attempt": 1
256
+ },
257
+ "createdAt": "2026-01-01T00:00:00.000Z"
258
+ },
259
+ {
260
+ "seq": 22,
261
+ "type": "WORKFLOW_TASK_COMPLETED",
262
+ "payload": {
263
+ "taskId": "run-1-task-4"
264
+ },
265
+ "createdAt": "2026-01-01T00:00:00.000Z",
266
+ "taskId": "run-1-task-4"
267
+ },
268
+ {
269
+ "seq": 23,
270
+ "type": "SIGNAL_RECEIVED",
271
+ "payload": {
272
+ "name": "note",
273
+ "payload": {
274
+ "text": "hi"
275
+ },
276
+ "receivedAt": "2026-01-01T00:00:00.000Z",
277
+ "headers": {
278
+ "sender": "ops"
279
+ }
280
+ },
281
+ "createdAt": "2026-01-01T00:00:00.000Z"
282
+ },
283
+ {
284
+ "seq": 24,
285
+ "type": "WORKFLOW_TASK_SCHEDULED",
286
+ "payload": {
287
+ "taskId": "run-1-task-5"
288
+ },
289
+ "createdAt": "2026-01-01T00:00:00.000Z"
290
+ },
291
+ {
292
+ "seq": 25,
293
+ "type": "WORKFLOW_TASK_STARTED",
294
+ "payload": {
295
+ "taskId": "run-1-task-5",
296
+ "attempt": 1
297
+ },
298
+ "createdAt": "2026-01-01T00:00:00.000Z"
299
+ },
300
+ {
301
+ "seq": 26,
302
+ "type": "WORKFLOW_TASK_COMPLETED",
303
+ "payload": {
304
+ "taskId": "run-1-task-5"
305
+ },
306
+ "createdAt": "2026-01-01T00:00:00.000Z",
307
+ "taskId": "run-1-task-5"
308
+ },
309
+ {
310
+ "seq": 27,
311
+ "type": "WORKFLOW_COMPLETED",
312
+ "payload": {
313
+ "output": {
314
+ "child": {
315
+ "echoed": {
316
+ "n": 1
317
+ }
318
+ },
319
+ "seen": [
320
+ {
321
+ "from": "ops",
322
+ "payload": {
323
+ "text": "hi"
324
+ }
325
+ }
326
+ ]
327
+ }
328
+ },
329
+ "createdAt": "2026-01-01T00:00:00.000Z",
330
+ "taskId": "run-1-task-5"
331
+ }
332
+ ],
333
+ "expected": {
334
+ "protocol": 1,
335
+ "outcome": "commands",
336
+ "commands": [],
337
+ "logs": []
338
+ }
339
+ }