ruvnet/ruflo · error · QEMemoryError

Failed to get coverage gaps

Error message

Failed to get coverage gaps

What it means

QEMemoryBridge.getCoverageGaps() failed to query the coverage-data namespace or the results could not be parsed. The catch logs the file path and wraps in QEMemoryError, so no gap list is returned for the file.

Source

Thrown at v3/plugins/agentic-qe/src/bridges/QEMemoryBridge.ts:335

      const results = await this.memory.query({
        namespace: QE_NAMESPACES.coverageData.name,
        filters: { filePath: file },
        limit: 100,
      });

      const gaps = results.map((result) => {
        try {
          return JSON.parse(result.content) as CoverageGap;
        } catch {
          return null;
        }
      }).filter((g): g is CoverageGap => g !== null);

      this.logger.debug(`Found ${gaps.length} coverage gaps for ${file}`);
      return gaps;
    } catch (error) {
      this.logger.error(`Failed to get coverage gaps for ${file}`, error);
      throw new QEMemoryError('Failed to get coverage gaps', error as Error);
    }
  }

  /**
   * Get prioritized coverage gaps
   */
  async getPrioritizedGaps(limit: number = 20): Promise<CoverageGap[]> {
    this.ensureInitialized();

    try {
      this.logger.debug(`Getting prioritized coverage gaps, limit: ${limit}`);

      // Query all gaps and sort by priority and risk score
      const results = await this.memory.query({
        namespace: QE_NAMESPACES.coverageData.name,
        limit: limit * 2, // Fetch more to allow for filtering
      });

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Ensure memory namespaces are initialized before querying gaps.
  2. Inspect the underlying retrieval error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/plugins/agentic-qe/src/bridges/QEMemoryBridge.ts:335 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/294f642e3ab673df. Report an issue: GitHub.