abhigyanpatwari/GitNexus · warning · GitNexusRcError
must be a boolean (true/false).
Error message
${source} must be a boolean (true/false). What it means
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.
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)
Example fix
# before export GITNEXUS_LBUG_BUFFER_POOL_SIZE=4G # unparseable -> platform default # after export GITNEXUS_LBUG_BUFFER_POOL_SIZE=4294967296 # 4 GiB in bytes
Defensive patterns
Strategy: validation
Validate before calling
const raw = process.env.GITNEXUS_LBUG_BUFFER_POOL_SIZE;
if (raw !== undefined && raw.trim() !== '') {
const n = Number(raw);
if (!Number.isInteger(n) || n < 0) {
throw new Error(
`GITNEXUS_LBUG_BUFFER_POOL_SIZE must be an integer >= 0 (bytes; 0 = native default), got: ${raw}`,
);
}
} Type guard
const isValidBufferPoolSize = (raw: string | undefined): boolean => {
if (raw === undefined || raw.trim() === '') return true;
const n = Number(raw);
return Number.isInteger(n) && n >= 0;
}; Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is not a valid" / "Invalid ... value" environment variable errors: how libraries validate env vars and what to do when they reject yours — this error's family across 48 libraries.
Related errors
- AZURE_DEVOPS_URL is configured over cleartext http:// — the…
- COPY failed for : ` : ''}
- [gitnexus serve] Ignoring
- [gitnexus serve] Ignoring
- : branch name is too long (max ).
AI-assisted analysis of abhigyanpatwari/GitNexus@ac9a4e9abd (2026-08-20).
Data as JSON: /api/errors/f6b1b170cb1e53c2.
Report an issue: GitHub.
Appendix: source
Thrown at gitnexus/src/cli/analyze-config.ts:194
* Best-effort validation for an auto-detected branch (from git). Never throws —
* returns `undefined` for anything unusable so the resolver falls back to the
* next precedence tier.
*/
export function sanitizeDetectedBranch(value: string | null | undefined): string | undefined {
if (!value) return undefined;
try {
return validateBranchName(value, 'detected branch');
} catch {
return undefined;
}
}
const normalizeValue = (kind: ValueKind, value: unknown, key: string): unknown => {
const source = `${GITNEXUS_RC_FILENAME} "${key}"`;
switch (kind) {
case 'boolean':
if (typeof value !== 'boolean') {
throw new GitNexusRcError(`${source} must be a boolean (true/false).`);
}
return value;
case 'boolean-negate':
if (typeof value !== 'boolean') {
throw new GitNexusRcError(`${source} must be a boolean (true/false).`);
}
return !value;
case 'branch':
if (typeof value !== 'string') {
throw new GitNexusRcError(`${source} must be a string branch name.`);
}
return validateBranchName(value, source);
case 'path': {
if (typeof value !== 'string') {
throw new GitNexusRcError(`${source} must be a file or directory path.`);
}
const trimmed = value.trim();
if (!trimmed) {View on GitHub (pinned to ac9a4e9abd)