{"record":{"id":"2be48aba0a56d81f","repo":"abhigyanpatwari/GitNexus","slug":"worker-pool-parsing-cannot-be-disabled-reason","errorCode":null,"errorMessage":"Worker-pool parsing cannot be disabled (${reason}). GitNexus no longer has a sequential parser — the worker pool self-heals via quarantine + respawn, so there is no slower path to fall back to. Pass `--workers <N>` with N>=1, or omit it for an auto-sized pool.","messagePattern":"Worker-pool parsing cannot be disabled \\((.+?)\\)\\. GitNexus no longer has a sequential parser — the worker pool self-heals via quarantine \\+ respawn, so there is no slower path to fall back to\\. Pass `--workers <N>` with N>=1, or omit it for an auto-sized pool\\.","errorType":"exception","errorClass":"WorkerPoolDisabledError","httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts","lineNumber":601,"sourceCode":"    });\n  }\n\n  // Sequential parsing has been removed: the worker pool (quarantine +\n  // respawn/recycle + circuit breaker) is the sole parse path. The three\n  // channels that used to select an in-process parser are now hard errors, so\n  // an operator who set one gets an actionable message instead of a silently\n  // slower (now nonexistent) fallback. Validated before any chunk work; a\n  // zero-parseable-file repo is exempt (nothing to parse).\n  if (totalParseable > 0) {\n    const requestedPoolSize = options?.workerPoolSize;\n    const disabledByEnv = requestedPoolSize === undefined && workerPoolDisabledByEnv();\n    if (options?.skipWorkers || requestedPoolSize === 0 || disabledByEnv) {\n      const reason = options?.skipWorkers\n        ? '`skipWorkers: true` was passed'\n        : requestedPoolSize === 0\n          ? '`--workers 0` (workerPoolSize=0) was requested'\n          : '`GITNEXUS_WORKER_POOL_SIZE=0` is set';\n      throw new WorkerPoolDisabledError(\n        `Worker-pool parsing cannot be disabled (${reason}). GitNexus no longer ` +\n          `has a sequential parser — the worker pool self-heals via quarantine + ` +\n          `respawn, so there is no slower path to fall back to. Pass ` +\n          `\\`--workers <N>\\` with N>=1, or omit it for an auto-sized pool.`,\n      );\n    }\n  }\n\n  // Build byte-budget chunks. The budget is resolved per-call (U14): options\n  // first, then env, then the built-in default. Pre-U14 this was a\n  // module-load IIFE constant, which froze the env value at import time\n  // and made `PipelineOptions.chunkByteBudget` silently no-op on warm test\n  // runs. Resolving in the function body restores per-call configurability\n  // and matches the pattern used by resolveAutoPoolSize and the U1\n  // parseChunkConcurrency resolver.\n  // Effective worker count: explicit `--workers <N>` pins it; otherwise\n  // cores-based auto size is capped by source bytes / CHUNK_BYTES_PER_WORKER\n  // so a tiny repo does not spawn a full idle pool. Cache pack membership","sourceCodeStart":583,"sourceCodeEnd":619,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts#L583-L619","documentation":"WorkerPoolDisabledError from parse-impl.ts (line 557 area): analyze refuses to run when worker-pool parsing is explicitly disabled while the repo has parseable files. The sequential parser no longer exists — the pool self-heals via quarantine + respawn — so there is no slower path to fall back to. The three disabling triggers are skipWorkers: true, workerPoolSize: 0 (--workers 0), and GITNEXUS_WORKER_POOL_SIZE=0. A repo with zero parseable files is exempt.","triggerScenarios":"Running `gitnexus analyze --workers 0`; exporting GITNEXUS_WORKER_POOL_SIZE=0 in the environment; programmatic pipeline calls passing options.skipWorkers = true or options.workerPoolSize = 0 — all on a repo containing at least one parseable file.","commonSituations":"Upgrading from an older GitNexus version where disabling workers was allowed (legacy env var left in .bashrc/CI env); developers setting --workers 0 while debugging worker issues; test suites still passing skipWorkers; CI images baking in the old env var.","solutions":["Run with `--workers <N>` where N >= 1, or omit the flag entirely for an auto-sized pool","Unset GITNEXUS_WORKER_POOL_SIZE (or set it to a positive value) in your shell profile, CI environment, or .env","Remove `skipWorkers: true` / `workerPoolSize: 0` from programmatic PipelineOptions calls"],"exampleFix":"# before\n$ GITNEXUS_WORKER_POOL_SIZE=0 gitnexus analyze .\n# after\n$ unset GITNEXUS_WORKER_POOL_SIZE\ngitnexus analyze . --workers 4","handlingStrategy":"validation","validationCode":"const disabledByEnv =\n  process.env.GITNEXUS_WORKER_POOL_SIZE !== undefined &&\n  Number(process.env.GITNEXUS_WORKER_POOL_SIZE) === 0;\nif (disabledByEnv || pipelineOptions?.skipWorkers || pipelineOptions?.workerPoolSize === 0) {\n  delete process.env.GITNEXUS_WORKER_POOL_SIZE;\n  pipelineOptions = { ...pipelineOptions, skipWorkers: undefined, workerPoolSize: undefined };\n}\nawait runAnalyze(repoPath, pipelineOptions);","typeGuard":null,"tryCatchPattern":"import { WorkerPoolDisabledError } from './core/ingestion/workers/worker-pool.js';\ntry {\n  await runAnalyze(repo, opts);\n} catch (err) {\n  if (err instanceof WorkerPoolDisabledError) {\n    // config error, not transient: strip skipWorkers / zero pool size and re-run once\n  }\n  throw err;\n}","preventionTips":["Purge GITNEXUS_WORKER_POOL_SIZE=0 from shell profiles, CI variables, and .env files after upgrading GitNexus","Update tests and scripts that pass skipWorkers: true — the sequential parser no longer exists","To shrink resource use, pass --workers 1, never --workers 0"],"tags":["workers","configuration","environment-variable","version-migration","analyze"],"backgroundTag":"unsupported-configuration","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"}