{"record":{"id":"76baed7789909771","repo":"ruvnet/ruflo","slug":"force-removing-name-breaking-dependents-joi","errorCode":null,"errorMessage":"Force removing ${name}, breaking: ${dependents.join(', ')}","messagePattern":"Force removing (.+?), breaking: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts","lineNumber":368,"sourceCode":"    if (!entry) {\n      throw new Error(`Plugin ${name} not found`);\n    }\n\n    // Check dependents\n    const dependents = this.dependencyGraph.getDependents(name);\n\n    if (dependents.length > 0) {\n      if (options?.cascade) {\n        // Unload dependents first (in reverse order)\n        const order = this.dependencyGraph.getRemovalOrder(name);\n        for (const dep of order) {\n          if (dep !== name) {\n            await this.shutdownPlugin(dep);\n            this.removePluginFromGraph(dep);\n          }\n        }\n      } else if (options?.force) {\n        this.logger.warn(`Force removing ${name}, breaking: ${dependents.join(', ')}`);\n      } else {\n        throw new Error(`Cannot remove ${name}: required by ${dependents.join(', ')}`);\n      }\n    }\n\n    // Shutdown and remove\n    await this.shutdownPlugin(name);\n    this.removePluginFromGraph(name);\n\n    this.logger.info(`Plugin unregistered: ${name}`);\n  }\n\n  // =========================================================================\n  // Initialization\n  // =========================================================================\n\n  /**\n   * Initialize all registered plugins.","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts#L350-L386","documentation":"Warning in unregister(): force removal of a plugin was requested while other plugins still depend on it. Unlike cascade mode, dependents are NOT shut down first — they are left with a missing dependency, which is why the warning lists them.","triggerScenarios":"Thrown at v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts:368 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the dependents can tolerate the removal; otherwise remove or update the dependent plugins first instead of force-removing."],"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-14T05:17:10.506Z"}