{"record":{"id":"ad1823446a9527f8","repo":"ruvnet/ruflo","slug":"task-routing-failed","errorCode":null,"errorMessage":"Task routing failed","messagePattern":"Task routing failed","errorType":"exception","errorClass":"QERoutingError","httpStatus":null,"severity":"error","filePath":"v3/plugins/agentic-qe/src/bridges/QEModelRoutingAdapter.ts","lineNumber":215,"sourceCode":"      const costEstimate = this.estimateCost(task, tier);\n\n      const result: QERouteResult = {\n        tier: agentBooster.available ? 1 : tier,\n        model: agentBooster.available ? 'haiku' : model,\n        qeCategory: task.category,\n        qeComplexity: complexity,\n        recommendedAgents,\n        costEstimate: agentBooster.available ? 0 : costEstimate,\n        agentBoosterAvailable: agentBooster.available,\n        agentBoosterIntent: agentBooster.intent,\n        explanation: this.buildExplanation(task, tier, agentBooster, v3Result),\n      };\n\n      this.logger.info(`Routed task \"${task.category}\" -> Tier ${result.tier} (${result.model})`);\n      return result;\n    } catch (error) {\n      this.logger.error('Task routing failed', error);\n      throw new QERoutingError('Task routing failed', error as Error);\n    }\n  }\n\n  /**\n   * Get complexity score for a category\n   */\n  getCategoryComplexity(category: string): number {\n    // Check exact match\n    if (CATEGORY_COMPLEXITY[category] !== undefined) {\n      return CATEGORY_COMPLEXITY[category];\n    }\n\n    // Check partial matches\n    for (const [key, value] of Object.entries(CATEGORY_COMPLEXITY)) {\n      if (category.includes(key) || key.includes(category)) {\n        return value;\n      }\n    }","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/agentic-qe/src/bridges/QEModelRoutingAdapter.ts#L197-L233","documentation":"routeQETask() hit an unexpected failure while classifying the task and selecting tier/model/agents — the routing pipeline itself threw (not the underlying model call). The catch surfaces a uniform 'Task routing failed' error; no QERouteResult is produced.","triggerScenarios":"Thrown at v3/plugins/agentic-qe/src/bridges/QEModelRoutingAdapter.ts:215 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the routing model/adapter is initialized and the task payload matches the routing schema; retry with a valid model id."],"exampleFix":null,"handlingStrategy":"try-catch","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"}