{"record":{"id":"6ccb3731d7671337","repo":"ruvnet/ruflo","slug":"circular-dependency-detected-name","errorCode":null,"errorMessage":"Circular dependency detected: ${name}","messagePattern":"Circular dependency detected: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/registry/plugin-registry.ts","lineNumber":337,"sourceCode":"    this.initialized = false;\n  }\n\n  // =========================================================================\n  // Dependency Resolution\n  // =========================================================================\n\n  /**\n   * Resolve dependencies and return load order.\n   */\n  private resolveDependencies(): string[] {\n    const visited = new Set<string>();\n    const visiting = new Set<string>();\n    const order: string[] = [];\n\n    const visit = (name: string): void => {\n      if (visited.has(name)) return;\n      if (visiting.has(name)) {\n        throw new Error(`Circular dependency detected: ${name}`);\n      }\n\n      const entry = this.plugins.get(name);\n      if (!entry) {\n        throw new Error(`Missing dependency: ${name}`);\n      }\n\n      visiting.add(name);\n\n      const deps = entry.plugin.metadata.dependencies ?? [];\n      for (const dep of deps) {\n        visit(dep);\n      }\n\n      visiting.delete(name);\n      visited.add(name);\n      order.push(name);\n    };","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/registry/plugin-registry.ts#L319-L355","documentation":"During dependency resolution the DFS visit() found the plugin name already on the visiting stack, proving a cycle in the plugin dependency graph (A depends on B depends on ... depends on A). No valid load order exists, so the name is reported as the node where the cycle closed.","triggerScenarios":"Dependency resolution detects a cycle involving the named plugin.","commonSituations":"Plugin A depends on B which (transitively) depends back on A.","solutions":["Break the cycle by removing or inverting one of the declared dependencies.","Extract the shared functionality into a third plugin both can depend on."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}