MCPcopy Create free account
hub / github.com/EvoMap/evolver / buildRuns

Function buildRuns

src/webui/observer/runs.js:89–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89function buildRuns() {
90 const paths = getObserverPaths();
91 const cycle = readJsonSafe(paths.cycleProgressPath, null);
92 const solidify = readJsonSafe(paths.solidifyStatePath, null);
93 const events = readJsonl(paths.eventsPath).map(redactValue);
94 const assetCalls = readJsonl(paths.assetCallLogPath).map(redactValue);
95 const pipelineEvents = readPipelineEvents();
96 const runs = new Map();
97
98 addCycleRun(runs, cycle, solidify);
99 for (const event of events) mergeRun(runs, summaryFromEvent(event));
100 for (const call of assetCalls) mergeRun(runs, summaryFromAssetCall(call));
101 for (const event of pipelineEvents) mergeRun(runs, summaryFromPipelineEvent(event));
102
103 const now = Date.now();
104 return Array.from(runs.values()).map((run) => ({
105 ...run,
106 status: maybeAbandon(run, now),
107 requiresConfirmation: Boolean(run.requiresConfirmation),
108 }));
109}
110
111function maybeAbandon(run, now) {
112 if (run.status !== 'running' || run.finishedAt) return run.status;

Callers 2

listRunsFunction · 0.85
getRunFunction · 0.85

Calls 10

getObserverPathsFunction · 0.85
readPipelineEventsFunction · 0.85
addCycleRunFunction · 0.85
mergeRunFunction · 0.85
summaryFromEventFunction · 0.85
summaryFromAssetCallFunction · 0.85
summaryFromPipelineEventFunction · 0.85
maybeAbandonFunction · 0.85
readJsonSafeFunction · 0.70
readJsonlFunction · 0.70

Tested by

no test coverage detected