{"record":{"id":"7e8afb86fe21494d","repo":"abhigyanpatwari/GitNexus","slug":"skipped-skippedlarge-large-files-maxfiles","errorCode":null,"errorMessage":"  Skipped ${skippedLarge} large files (>${maxFileSizeBytes / 1024}KB${suffix})","messagePattern":"  Skipped (.+?) large files \\(>(.+?)KB(.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gitnexus/src/core/ingestion/filesystem-walker.ts","lineNumber":54,"sourceCode":"    declarationPath.endsWith(declaration),\n  );\n  if (!companion) return false;\n\n  // Keep standalone declarations. Only suppress declaration output that sits\n  // beside an implementation with the corresponding module suffix.\n  const stem = declarationPath.slice(0, -companion.declaration.length);\n  return companion.implementations.some((suffix) => scannedPaths.has(`${stem}${suffix}`));\n};\n\nconst warnLargeFileSkip = (message: string): void => {\n  if (process.env[ANALYZE_PROGRESS_ACTIVE_ENV] === '1') {\n    // analyze.ts routes console.warn through the progress bar logger while\n    // the bar is active. Emitting the operator-facing large-file notice there\n    // avoids raw pino NDJSON corrupting the one-line progress display in the\n    // heap-respawn child, whose stderr is intentionally piped for crash\n    // classification.\n    // eslint-disable-next-line no-console -- intentionally routed by analyze progress UI\n    console.warn(message);\n    return;\n  }\n  logger.warn(message);\n};\n\nexport interface WalkRepositoryOptions {\n  /**\n   * Suppress the operator-facing large-file notice. Set by read-only callers\n   * such as `status`, which reuse this scan purely to learn which files the\n   * index covers and must not emit analyze's progress commentary.\n   */\n  quiet?: boolean;\n  /**\n   * Override the large-file cap. `status` replays the bytes recorded at\n   * analyze time so `--max-file-size` / `GITNEXUS_MAX_FILE_SIZE` cannot\n   * silently drop a file that the index actually covers.\n   */\n  maxFileSizeBytes?: number;","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/52924ef12c2290ceee4612526a828ec4cdf2047f/gitnexus/src/core/ingestion/filesystem-walker.ts#L36-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Raise the cap: export GITNEXUS_MAX_FILE_SIZE=2048 (KB) — values above the tree-sitter ceiling are clamped","Add ignore rules for generated/minified files that do not need indexing","Split genuinely-source files that exceed the cap"],"exampleFix":"# before — default 512KB cap; bundle.js (4MB) skipped\n\n# after\nexport GITNEXUS_MAX_FILE_SIZE=4096\nnode .gitnexus/run.cjs analyze --index-only","handlingStrategy":"validation","validationCode":"import { readdirSync, statSync } from 'node:fs';\n\nconst capBytes = (parseInt(process.env.GITNEXUS_MAX_FILE_SIZE ?? '', 10) || 512) * 1024;\nconst oversized: string[] = [];\nfor (const f of readdirSync(repoRoot, { recursive: true })) {\n  const p = `${repoRoot}/${f}`;\n  try {\n    if (statSync(p).isFile() && statSync(p).size > capBytes) oversized.push(p);\n  } catch { /* unreadable */ }\n}\nif (oversized.length > 0) {\n  // decide per file: raise the cap, ignore it, or split it\n  console.warn(`files over ${capBytes} bytes will be skipped:`, oversized);\n}","typeGuard":"function isWithinFileCap(sizeBytes: number, capBytes = 512 * 1024): boolean {\n  return sizeBytes <= capBytes;\n}","tryCatchPattern":null,"preventionTips":["Keep minified bundles, generated data, and vendored artifacts out of the repo or under ignore rules","Set GITNEXUS_MAX_FILE_SIZE=<KB> deliberately (it clamps to the tree-sitter ceiling) instead of retrying blind","Audit the post-analyze skip notice — files named there are absent from the index"],"tags":["filesystem","file-size","progress-bar","analyze","env-var"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"52924ef12c2290ceee4612526a828ec4cdf2047f","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}