ruvnet/ruflo · error

[graph-backend]

Error message

[graph-backend] ${message}

What it means

warnGraphInit is a generic reporting helper, not a thrower: it emits a console warning prefixed `[graph-backend]` for any problem detected while opening the RuVector graph database. Callers (openGraphDb, getGraphDb) pass messages for conditions such as: the `@ruvector/graph-node` native module failed to require (graphBackendAvailable is memoized false and getGraphDb returns null), or the opened handle is not actually persistent at the requested storage path (isPersistentAt false — the silent in-memory downgrade where @ruvector/graph-node 2.1.0 accepts a bare path string, reports isPersistent()===false and getStoragePath()===null, and loses all data at exit). There is no dedup flag because the open runs once per process via the memoized promise.

Solutions

  1. If the message reports the module failed to load, install or rebuild @ruvector/graph-node (native/NAPI) for the current platform and Node version.
  2. If it reports a non-persistent handle, confirm the open call passes the options object (not a bare path string) so the 2.1.0 in-memory trap is avoided.
  3. Check disk writability and permissions for the requested storage path.
  4. Treat the warning as degraded-mode signal: the CLI continues without the graph backend; fix before relying on graph persistence across restarts.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/@claude-flow/cli/src/ruvector/graph-backend.ts:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@9c61c86f06 (2026-09-22). Data as JSON: /api/errors/58df724fc8806869. Report an issue: GitHub.

Appendix: source

Thrown at v3/@claude-flow/cli/src/ruvector/graph-backend.ts:62

        return mod;
      } catch {
        graphBackendAvailable = false;
        return null;
      }
    })();
  }
  return graphNodeModulePromise;
}

/**
 * Report a graph-backend problem.
 *
 * No "already warned" flag: the open runs once per process because
 * `getGraphDb` memoizes the promise, and a second flag would only hide it if
 * that ever stopped being true.
 */
function warnGraphInit(message: string): void {
  console.warn(`[graph-backend] ${message}`);
}

/**
 * Whether this handle is actually backed by the file we asked for.
 *
 * `@ruvector/graph-node` 2.1.0 accepts a bare path STRING without throwing
 * and hands back a volatile in-memory instance -- `isPersistent() === false`,
 * `getStoragePath() === null`. Nothing downstream notices: writes succeed,
 * reads succeed, and the graph is gone at exit. Passing the options object
 * fixes that, and this check is what makes the fix self-reporting instead of
 * something a future signature change can quietly undo.
 *
 * A build that exposes neither accessor cannot be interrogated, so it is
 * accepted rather than refused -- this guards against a silent downgrade, not
 * against an unfamiliar version.
 */
function isPersistentAt(db: any, storagePath: string): boolean {
  const canReport =

View on GitHub (pinned to 9c61c86f06)