(
status: 'completed' | 'error' | 'paused',
error: string | null
)
| 255 | } |
| 256 | |
| 257 | const writeCellTerminal = async ( |
| 258 | status: 'completed' | 'error' | 'paused', |
| 259 | error: string | null |
| 260 | ) => { |
| 261 | terminalWritten = true |
| 262 | await writeChain.catch(() => {}) |
| 263 | // Paused → keep `pending` + sentinel jobId so eligibility predicates |
| 264 | // continue treating the row as in-flight while we wait on another |
| 265 | // pause. Mirrors the initial cell-task pause branch. |
| 266 | const terminal: RowExecutionMetadata = |
| 267 | status === 'paused' |
| 268 | ? { |
| 269 | status: 'pending', |
| 270 | executionId: parentExecutionId, |
| 271 | jobId: `paused-${parentExecutionId}`, |
| 272 | workflowId: cellContext.workflowId, |
| 273 | error: null, |
| 274 | blockErrors, |
| 275 | } |
| 276 | : { |
| 277 | status, |
| 278 | executionId: parentExecutionId, |
| 279 | jobId: null, |
| 280 | workflowId: cellContext.workflowId, |
| 281 | error, |
| 282 | runningBlockIds: [], |
| 283 | blockErrors, |
| 284 | } |
| 285 | await writeWorkflowGroupState(writeCtx, { |
| 286 | executionState: terminal, |
| 287 | dataPatch: accumulatedData, |
| 288 | }) |
| 289 | } |
| 290 | |
| 291 | return { cellOnBlockComplete, writeCellTerminal } |
| 292 | } |
nothing calls this directly
no test coverage detected