abhigyanpatwari/GitNexus · error

${context}: query text is ${Math.round(bytes / 1024)} KB. A

Error message

${context}: query text is ${Math.round(bytes / 1024)} KB. A list spliced into query text grows the expression the engine has to parse and can overflow its evaluator stack (#2915) — bind the list as a parameter (WHERE x IN $list), or chunk it.

What it means

Error "${context}: query text is ${Math.round(bytes / 1024)} KB. A list spliced into query text grows the expression the engine has to parse and can overflow its evaluator stack (#2915) — bind the list as a parameter (WHERE x IN $list), or chunk it." thrown in abhigyanpatwari/GitNexus.

Source

Thrown at gitnexus/src/core/lbug/query-batch.ts:105

/**
 * Warn when a query looks like it was built by string-concatenating a
 * caller-sized list. Never throws: a long query that the engine can actually
 * run must not start failing because of a heuristic.
 */
export function warnIfQueryTextUnbounded(
  cypher: string,
  context: string,
  warn: (message: string) => void,
): void {
  // `cypher.length` counts UTF-16 code units, and what reaches the engine is
  // UTF-8 bytes — non-ASCII query text is undercounted by up to 3x. UTF-8 never
  // needs more than 3 bytes per code unit (an astral character costs 4 bytes
  // across 2 units), so a query short enough here cannot exceed the ceiling and
  // never pays for the byte count. This runs on every read query.
  if (cypher.length * 3 <= QUERY_TEXT_CEILING_BYTES) return;
  const bytes = Buffer.byteLength(cypher, 'utf8');
  if (bytes <= QUERY_TEXT_CEILING_BYTES) return;
  warn(
    `${context}: query text is ${Math.round(bytes / 1024)} KB. A list spliced into query ` +
      `text grows the expression the engine has to parse and can overflow its evaluator stack ` +
      `(#2915) — bind the list as a parameter (WHERE x IN $list), or chunk it.`,
  );
}

View on GitHub (pinned to aac7515d2a)

When it happens

Trigger: Thrown at gitnexus/src/core/lbug/query-batch.ts:105 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of abhigyanpatwari/GitNexus@aac7515d2a (2026-08-20). Data as JSON: /api/errors/f2dca37c8fddd53c. Report an issue: GitHub.