{"record":{"id":"fbdf839cadbd7801","repo":"abhigyanpatwari/GitNexus","slug":"source-branch-name-is-too-long-max-branch-m","errorCode":null,"errorMessage":"${source}: branch name is too long (max ${BRANCH_MAX_LENGTH}).","messagePattern":"(.+?): branch name is too long \\(max (.+?)\\)\\.","errorType":"validation","errorClass":"GitNexusRcError","httpStatus":null,"severity":"warning","filePath":"gitnexus/src/cli/analyze-config.ts","lineNumber":169,"sourceCode":"      throw new GitNexusRcError(\n        `${source}: value contains control or hidden/bidirectional characters, which are not allowed.`,\n      );\n    }\n  }\n};\n\n/**\n * Validate a user-supplied branch name (from CLI or `.gitnexusrc`). Returns the\n * trimmed name or throws {@link GitNexusRcError}. Conservative but accepts the\n * shapes real branches use (`feature/foo-bar`, `release/1.2`, `develop`).\n */\nexport function validateBranchName(value: string, source: string): string {\n  const trimmed = value.trim();\n  if (!trimmed) {\n    throw new GitNexusRcError(`${source}: branch name must not be empty.`);\n  }\n  if (trimmed.length > BRANCH_MAX_LENGTH) {\n    throw new GitNexusRcError(`${source}: branch name is too long (max ${BRANCH_MAX_LENGTH}).`);\n  }\n  assertNoHiddenChars(trimmed, source);\n  if (/\\s/.test(trimmed)) {\n    throw new GitNexusRcError(`${source}: branch name must not contain whitespace.`);\n  }\n  // git ref-name rules (subset): reject characters git itself forbids in refs.\n  if (/[~^:?*[\\\\]/.test(trimmed)) {\n    throw new GitNexusRcError(\n      `${source}: branch name contains characters not allowed in a git ref (~ ^ : ? * [ \\\\).`,\n    );\n  }\n  if (trimmed.startsWith('-')) {\n    throw new GitNexusRcError(`${source}: branch name must not start with \"-\".`);\n  }\n  if (trimmed.includes('..')) {\n    throw new GitNexusRcError(`${source}: branch name must not contain \"..\".`);\n  }\n  // Git permits a backtick in a ref, but the branch is embedded inside a","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/52924ef12c2290ceee4612526a828ec4cdf2047f/gitnexus/src/cli/analyze-config.ts#L151-L187","documentation":"During the bulk COPY of relationship CSVs into LadybugDB, the buffer pool (poolLabel) was exhausted and the pair failed over to the row-by-row fallback with retry. The remedy is logged via logger.warn exactly once per bulk load (poolRemedyIssued, issue #2631) instead of once per pair, because exhaustion repeats for every remaining pair once it starts — and the returned warnings array has no consumer at any call site, so a push alone would be invisible.","triggerScenarios":"copyCsvWithRetry fails with a buffer-pool-exhaustion message (detected by bufferPoolExhaustionRemedy) while bulk-loading a large relationship batch — total edge working set exceeds the pool ceiling (default 2 GiB; GITNEXUS_LBUG_BUFFER_POOL_SIZE caps it, 0 restores LadybugDB's native 80%-of-RAM default).","commonSituations":"Monorepo-scale graphs with tens of millions of relationships loaded in one analyze; CI runners with modest RAM where the 2 GiB default ceiling is the constraint; setting a pool size in bytes incorrectly (e.g. assuming MB).","solutions":["Raise the pool: GITNEXUS_LBUG_BUFFER_POOL_SIZE=4294967296 (4 GiB) for large repos","Or restore the native default sizing: GITNEXUS_LBUG_BUFFER_POOL_SIZE=0 (80% of RAM)","Verify the value is in BYTES — 4294967296, not 4","Expect slower load even after the fix if disk-bound; the row-by-row fallback path is much slower than COPY, so prefer fixing the pool size"],"exampleFix":"# before\nexport GITNEXUS_LBUG_BUFFER_POOL_SIZE=4   # 4 BYTES, not 4 GiB — pool starved\n\n# after\nexport GITNEXUS_LBUG_BUFFER_POOL_SIZE=4294967296   # 4 GiB in bytes\n# or: export GITNEXUS_LBUG_BUFFER_POOL_SIZE=0       # native 80%-of-RAM default","handlingStrategy":"fallback","validationCode":"// before a large bulk load: validate the env early instead of relying on the soft fallback\nconst raw = process.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE;\nif (raw !== undefined && raw.trim() !== '') {\n  const n = Number(raw);\n  if (!Number.isInteger(n) || n < 0) delete process.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE; // drop malformed value\n}\n// size for the workload: large repos want 4 GiB+\nprocess.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE ??= String(4 * 1024 * 1024 * 1024);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always specify the pool size in raw bytes, never with unit suffixes","Watch stderr for the remedy warn — the returned warnings array has no consumer, so logs are the only signal","For monorepo-scale edge counts, pre-set 4 GiB or 0 (native) rather than absorbing the slow row-by-row fallback"],"tags":["ladybugdb","buffer-pool","bulk-load","memory"],"backgroundTag":"buffer-pool-exhausted","analyzedSha":"52924ef12c2290ceee4612526a828ec4cdf2047f","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}