MCPcopy Create free account
hub / github.com/Ark0N/Codeman / wouldCreateCycle

Method wouldCreateCycle

src/task-queue.ts:161–178  ·  view source on GitHub ↗

* Detect if adding a dependency would create a cycle. * Uses DFS to check if there's a path from depId back to taskId. * * @param taskId - The task that would have the new dependency * @param depId - The dependency being added * @param visited - Set of already visited nodes (for DFS)

(taskId: string, depId: string, visited: Set<string> = new Set())

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

validateDependenciesMethod · 0.95
task-queue.test.tsFile · 0.80

Calls 3

hasMethod · 0.45
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected