MCPcopy Index your code
hub / github.com/coder/mux / writeRunFile

Method writeRunFile

src/node/services/workflows/WorkflowRunStore.ts:1000–1007  ·  view source on GitHub ↗
(runId: string, run: WorkflowRunRecord)

Source from the content-addressed store, hash-verified

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);

Callers 8

createRunMethod · 0.95
createRunIfAbsentMethod · 0.95
setAttentionPolicyMethod · 0.95
appendEventUnlockedMethod · 0.95

Calls 4

runFileMethod · 0.95
writeJsonAtomicFunction · 0.85
notifyRunPersistedMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected