(runId: string, run: WorkflowRunRecord)
| 998 | } |
| 999 | |
| 1000 | private async writeRunFile(runId: string, run: WorkflowRunRecord): Promise<void> { |
| 1001 | const runForDisk = WorkflowRunRecordSchema.parse(run); |
| 1002 | await writeJsonAtomic(this.runFile(runId), runForDisk); |
| 1003 | // Notify live subscribers (workflows.subscribe) after the durable write. The hub is a |
| 1004 | // module-level bus, so any store instance — regardless of which flow constructed it — |
| 1005 | // feeds the same stream. Persist-before-notify keeps disk and observers consistent. |
| 1006 | workflowRunStreamHub.notifyRunPersisted(runForDisk); |
| 1007 | } |
| 1008 | |
| 1009 | getStepArtifactsDir(runId: string, stepId: string, inputHash: string): string { |
| 1010 | assertValidWorkflowRunId(runId); |
no test coverage detected