{"record":{"id":"0a05163b52b1f9ef","repo":"ruvnet/ruflo","slug":"failed-to-wait-for-task","errorCode":null,"errorMessage":"Failed to wait for task","messagePattern":"Failed to wait for task","errorType":"exception","errorClass":"QECoreError","httpStatus":null,"severity":"error","filePath":"v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts","lineNumber":547,"sourceCode":"  }\n\n  async wait(): Promise<TaskResult> {\n    try {\n      this.logger.debug(`Waiting for task completion: ${this.id}`);\n      const result = await this.taskService.waitForCompletion(this.id);\n\n      this._status = result.success ? 'completed' : 'failed';\n\n      return {\n        taskId: this.id,\n        success: result.success,\n        data: result.data,\n        error: result.error,\n        durationMs: result.durationMs,\n      };\n    } catch (error) {\n      this.logger.error(`Failed to wait for task: ${this.id}`, error);\n      throw new QECoreError('Failed to wait for task', error as Error);\n    }\n  }\n\n  async cancel(): Promise<void> {\n    try {\n      this.logger.debug(`Cancelling task: ${this.id}`);\n      await this.taskService.cancel(this.id);\n      this._status = 'cancelled';\n    } catch (error) {\n      this.logger.error(`Failed to cancel task: ${this.id}`, error);\n      throw new QECoreError('Failed to cancel task', error as Error);\n    }\n  }\n\n  async getProgress(): Promise<TaskProgress> {\n    try {\n      const status = await this.taskService.getStatus(this.id);\n      this._status = status.status;","sourceCodeStart":529,"sourceCodeEnd":565,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts#L529-L565","documentation":"Wraps any failure of taskService.waitForCompletion (backend unavailable, task crashed, lost task) into a QECoreError so callers get a uniform bridge error with the original cause attached; the task handle's status is left unchanged.","triggerScenarios":"Thrown at v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts:547 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the task id and that the task is still tracked.","Handle task timeout separately from transport failure."],"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"}