MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / observedRuns

Function observedRuns

graph-ui/src/traces/bug-paths.ts:350–372  ·  view source on GitHub ↗
(path: readonly { name: string; filePath?: string; observed?: ObservedRecord }[])

Source from the content-addressed store, hash-verified

348 * recorded.
349 */
350export function observedRuns(path: readonly { name: string; filePath?: string; observed?: ObservedRecord }[]): BugPathNode[][] {
351 const runs: BugPathNode[][] = [];
352 let current: BugPathNode[] = [];
353 for (let at = 1; at < path.length; at++) {
354 const step = path[at];
355 if (step.observed === undefined) {
356 if (current.length >= 2) {
357 runs.push(current);
358 }
359 current = [];
360 continue;
361 }
362 if (current.length === 0) {
363 const previous = path[at - 1];
364 current.push({ name: previous.name, filePath: previous.filePath });
365 }
366 current.push({ name: step.name, filePath: step.filePath, observed: step.observed });
367 }
368 if (current.length >= 2) {
369 runs.push(current);
370 }
371 return runs;
372}
373
374/** Every observed call one flow answer reports, as ordered pairs. */
375export function flowObservations(flow: FlowDetail): { from: BugPathNode; to: BugPathNode; observed: ObservedRecord }[] {

Callers 2

bug-paths.test.tsFile · 0.90
bugPathsFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected