abhigyanpatwari/GitNexus · warning

Skipped ${skippedLarge} large files (>${maxFileSizeBytes /

Error message

  Skipped ${skippedLarge} large files (>${maxFileSizeBytes / 1024}KB${suffix})

What it means

The walker's post-scan large-file notice, routed through console.warn because the analyze progress bar is active (GITNEXUS_ANALYZE_PROGRESS_ACTIVE=1): N files were skipped because each exceeded the max file size (default 512 KiB; GITNEXUS_MAX_FILE_SIZE in KB, clamped to the tree-sitter buffer ceiling). The console routing exists so raw pino NDJSON does not corrupt the one-line progress display in the heap-respawn child.

Source

Thrown at gitnexus/src/core/ingestion/filesystem-walker.ts:54

    declarationPath.endsWith(declaration),
  );
  if (!companion) return false;

  // Keep standalone declarations. Only suppress declaration output that sits
  // beside an implementation with the corresponding module suffix.
  const stem = declarationPath.slice(0, -companion.declaration.length);
  return companion.implementations.some((suffix) => scannedPaths.has(`${stem}${suffix}`));
};

const warnLargeFileSkip = (message: string): void => {
  if (process.env[ANALYZE_PROGRESS_ACTIVE_ENV] === '1') {
    // analyze.ts routes console.warn through the progress bar logger while
    // the bar is active. Emitting the operator-facing large-file notice there
    // avoids raw pino NDJSON corrupting the one-line progress display in the
    // heap-respawn child, whose stderr is intentionally piped for crash
    // classification.
    // eslint-disable-next-line no-console -- intentionally routed by analyze progress UI
    console.warn(message);
    return;
  }
  logger.warn(message);
};

export interface WalkRepositoryOptions {
  /**
   * Suppress the operator-facing large-file notice. Set by read-only callers
   * such as `status`, which reuse this scan purely to learn which files the
   * index covers and must not emit analyze's progress commentary.
   */
  quiet?: boolean;
  /**
   * Override the large-file cap. `status` replays the bytes recorded at
   * analyze time so `--max-file-size` / `GITNEXUS_MAX_FILE_SIZE` cannot
   * silently drop a file that the index actually covers.
   */
  maxFileSizeBytes?: number;

View on GitHub (pinned to 52924ef12c)

Solutions

  1. Raise the cap: export GITNEXUS_MAX_FILE_SIZE=2048 (KB) — values above the tree-sitter ceiling are clamped
  2. Add ignore rules for generated/minified files that do not need indexing
  3. Split genuinely-source files that exceed the cap

Example fix

# before — default 512KB cap; bundle.js (4MB) skipped

# after
export GITNEXUS_MAX_FILE_SIZE=4096
node .gitnexus/run.cjs analyze --index-only
Defensive patterns

Strategy: validation

Validate before calling

import { readdirSync, statSync } from 'node:fs';

const capBytes = (parseInt(process.env.GITNEXUS_MAX_FILE_SIZE ?? '', 10) || 512) * 1024;
const oversized: string[] = [];
for (const f of readdirSync(repoRoot, { recursive: true })) {
  const p = `${repoRoot}/${f}`;
  try {
    if (statSync(p).isFile() && statSync(p).size > capBytes) oversized.push(p);
  } catch { /* unreadable */ }
}
if (oversized.length > 0) {
  // decide per file: raise the cap, ignore it, or split it
  console.warn(`files over ${capBytes} bytes will be skipped:`, oversized);
}

Type guard

function isWithinFileCap(sizeBytes: number, capBytes = 512 * 1024): boolean {
  return sizeBytes <= capBytes;
}

Prevention

When it happens

Trigger: The repository contains files larger than the cap — minified JS bundles, generated data files, lockfiles, model artifacts — while `analyze` is running with its progress bar active.

Common situations: First analyze of a repo with committed dist/ or vendor bundles; later noticing that a large generated file is missing from the index and tracing it back to this notice.

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


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