abhigyanpatwari/GitNexus · warning · Error
optional icebug engine currently requires deterministic thre
Error message
optional icebug engine currently requires deterministic threads=1
What it means
Thrown by runIcebugWorker (community-processor.ts) when the optional icebug community-detection engine is requested but options.icebug.threads is not exactly the integer 1. The deterministic-output guarantee that GitNexus relies on (community IDs feed generated context) requires single-threaded execution; multi-threaded Leiden produces non-reproducible partitions. icebug is an optional native engine — the default engine is Graphology (pure JS Leiden).
Source
Thrown at gitnexus/src/core/ingestion/community-processor.ts:535
engineRequested,
};
};
const isIntegerPartition = (partition: ArrayLike<number>): boolean => {
for (let index = 0; index < partition.length; index++) {
if (!Number.isSafeInteger(partition[index])) return false;
}
return true;
};
const runIcebugWorker = (
nodeCount: number,
csr: CommunityCsr,
options: CommunityDetectionOptions,
): Promise<IcebugWorkerSuccess> => {
const threads = options.icebug?.threads ?? 1;
if (!Number.isSafeInteger(threads) || threads !== 1) {
throw new Error('optional icebug engine currently requires deterministic threads=1');
}
if (options.icebug?.randomize === true) {
throw new Error('optional icebug engine currently requires randomize=false');
}
const worker = new Worker(ICEBUG_WORKER_SOURCE, {
eval: true,
workerData: {
nodeCount,
indices: csr.indices,
indptr: csr.indptr,
threads,
seed: options.icebug?.seed ?? LEIDEN_SEED,
iterations: options.icebug?.iterations ?? 4,
gamma: options.icebug?.gamma ?? 1.0,
randomize: options.icebug?.randomize ?? false,
},
});View on GitHub (pinned to d540b00184)
Solutions
- Set icebug.threads to 1 (or omit it — the default is 1) when using the icebug engine.
- If you need multi-threaded community detection and don't require reproducibility, note this engine intentionally forbids it — use the default Graphology engine instead, or accept that icebug is gated to threads=1.
- Do not retry with the same threads value — this is a deterministic guard, not a transient failure.
Example fix
// before — threads > 1 trips the determinism guard
runIcebugWorker(n, csr, { icebug: { threads: 4, seed: 42 } });
// after — single-threaded, deterministic
runIcebugWorker(n, csr, { icebug: { threads: 1, seed: 42 } }); Defensive patterns
Strategy: validation
Validate before calling
function isDeterministicIcebugConfig(opts: { icebug?: { threads?: unknown } }): boolean {
const t = opts.icebug?.threads ?? 1;
return Number.isSafeInteger(t) && t === 1;
}
// before calling community detection with engine:'icebug':
if (!isDeterministicIcebugConfig(options)) {
throw new Error('icebug requires threads=1; refusing non-deterministic config');
} Type guard
function isIcebugThreads1(v: unknown): v is 1 {
return Number.isSafeInteger(v) && v === 1;
} Prevention
- Omit icebug.threads (default 1) or set it explicitly to 1.
- Do not attempt multi-threaded icebug — the determinism gate is intentional and will not be relaxed.
- Use the default Graphology engine if you don't need icebug's specific behavior.
When it happens
Trigger: Configuring community detection with engine: 'icebug' and icebug.threads set to 2 or more; threads set to a non-integer (e.g. 1.5); threads set to 0 or a negative number.
Common situations: Operator copied an icebug config from docs/examples that suggested threads > 1 for speed; a config file left threads unset incorrectly via a non-integer; experimenting with the optional engine without reading the determinism constraint.
Related errors
- optional icebug engine currently requires randomize=false
- optional icebug build predates the deterministic thread/seed
- OpenAI API key is required but was not provided
- OpenRouter API key is required but was not provided
- MiniMax API key is required but was not provided
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/f4bd7e5d5125c42d.
Report an issue: GitHub.