{"record":{"id":"f6b1b170cb1e53c2","repo":"abhigyanpatwari/GitNexus","slug":"source-must-be-a-boolean-true-false","errorCode":null,"errorMessage":"${source} must be a boolean (true/false).","messagePattern":"(.+?) must be a boolean \\(true/false\\)\\.","errorType":"validation","errorClass":"GitNexusRcError","httpStatus":null,"severity":"warning","filePath":"gitnexus/src/cli/analyze-config.ts","lineNumber":194,"sourceCode":" * Best-effort validation for an auto-detected branch (from git). Never throws —\n * returns `undefined` for anything unusable so the resolver falls back to the\n * next precedence tier.\n */\nexport function sanitizeDetectedBranch(value: string | null | undefined): string | undefined {\n  if (!value) return undefined;\n  try {\n    return validateBranchName(value, 'detected branch');\n  } catch {\n    return undefined;\n  }\n}\n\nconst normalizeValue = (kind: ValueKind, value: unknown, key: string): unknown => {\n  const source = `${GITNEXUS_RC_FILENAME} \"${key}\"`;\n  switch (kind) {\n    case 'boolean':\n      if (typeof value !== 'boolean') {\n        throw new GitNexusRcError(`${source} must be a boolean (true/false).`);\n      }\n      return value;\n    case 'boolean-negate':\n      if (typeof value !== 'boolean') {\n        throw new GitNexusRcError(`${source} must be a boolean (true/false).`);\n      }\n      return !value;\n    case 'branch':\n      if (typeof value !== 'string') {\n        throw new GitNexusRcError(`${source} must be a string branch name.`);\n      }\n      return validateBranchName(value, source);\n    case 'path': {\n      if (typeof value !== 'string') {\n        throw new GitNexusRcError(`${source} must be a file or directory path.`);\n      }\n      const trimmed = value.trim();\n      if (!trimmed) {","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/cli/analyze-config.ts#L176-L212","documentation":"GITNEXUS_LBUG_BUFFER_POOL_SIZE was set to a non-empty value that parseBufferPoolSize rejects (must be an integer >= 0 bytes; 0 is the pass-through sentinel restoring LadybugDB's native 80%-of-RAM default). GitNexus warns and falls back to the platform default pool size, mirroring the WAL-threshold env behavior.","triggerScenarios":"The env var holds a non-integer, negative, or unit-suffixed value (e.g. \"4G\", \"2 GiB\", \"-1\", \"1e9\") while no valid bufferPoolSizeHint is applied — resolveBufferManagerSize then returns defaultBufferPoolSize() with this warn.","commonSituations":"Operators writing human-style sizes (4G) instead of raw bytes; shell scripts copying values from documentation of other tools; CI env matrices where the var is templated to an empty-but-quoted or malformed string.","solutions":["Set the value as an integer number of BYTES: GITNEXUS_LBUG_BUFFER_POOL_SIZE=4294967296 (4 GiB)","Use 0 explicitly to opt into LadybugDB's native 80%-of-RAM sizing","Unset the variable to use the platform default (2 GiB ceiling on constrained boxes)","Confirm with `gitnexus doctor`, which prints the pool size the next open would get (#2631)"],"exampleFix":"# before\nexport GITNEXUS_LBUG_BUFFER_POOL_SIZE=4G   # unparseable -> platform default\n\n# after\nexport GITNEXUS_LBUG_BUFFER_POOL_SIZE=4294967296   # 4 GiB in bytes","handlingStrategy":"validation","validationCode":"const 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) {\n    throw new Error(\n      `GITNEXUS_LBUG_BUFFER_POOL_SIZE must be an integer >= 0 (bytes; 0 = native default), got: ${raw}`,\n    );\n  }\n}","typeGuard":"const isValidBufferPoolSize = (raw: string | undefined): boolean => {\n  if (raw === undefined || raw.trim() === '') return true;\n  const n = Number(raw);\n  return Number.isInteger(n) && n >= 0;\n};","tryCatchPattern":null,"preventionTips":["Convert human sizes to bytes at the point you set the var (4 GiB -> 4294967296)","Confirm effective sizing with `gitnexus doctor`, which prints the pool size the next open would get","Remember 0 is the deliberate sentinel for the native 80%-of-RAM default, not a mistake"],"tags":["env-var","memory","configuration","ladybugdb"],"backgroundTag":"invalid-env-var-value","analyzedSha":"ac9a4e9abd8fd3058c070b72c23402a4f887929a","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}