abhigyanpatwari/GitNexus · warning · Error
optional icebug engine currently requires randomize=false
Error message
optional icebug engine currently requires randomize=false
What it means
Thrown by runIcebugWorker when options.icebug.randomize is explicitly true. The deterministic partition contract requires randomize=false (seeded Leiden). The worker even calls icebug.setSeed(seed, false) — the second arg is the 'deterministic' flag. Allowing randomize would break reproducibility of community IDs that downstream generated context depends on.
Source
Thrown at gitnexus/src/core/ingestion/community-processor.ts:538
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,
},
});
return new Promise((resolve, reject) => {
let settled = false;View on GitHub (pinned to d540b00184)
Solutions
- Set icebug.randomize to false (or omit it — default is false).
- If you genuinely want randomized community detection, use the default Graphology engine which does not enforce this constraint, or accept the icebug engine is gated to deterministic mode.
- Control reproducibility via the seed field instead of randomize.
Example fix
// before — randomize true breaks determinism
runIcebugWorker(n, csr, { icebug: { threads: 1, randomize: true, seed: 42 } });
// after — deterministic seeded run
runIcebugWorker(n, csr, { icebug: { threads: 1, randomize: false, seed: 42 } }); Defensive patterns
Strategy: validation
Validate before calling
function isDeterministicIcebugRandomize(opts: { icebug?: { randomize?: unknown } }): boolean {
return opts.icebug?.randomize !== true;
}
if (!isDeterministicIcebugRandomize(options)) {
throw new Error('icebug requires randomize=false; refusing non-deterministic config');
} Type guard
function isIcebugRandomizeFalse(v: unknown): boolean {
return v !== true;
} Prevention
- Omit icebug.randomize (default false) or set it explicitly to false.
- Control reproducibility via icebug.seed, not randomize.
- Switch to the default Graphology engine if randomized runs are truly required.
When it happens
Trigger: Configuring engine: 'icebug' with icebug.randomize: true; copying an example config that set randomize for exploration.
Common situations: Operator experimenting with randomized Leiden for diversity; misreading the icebug API where randomize is a standard parameter; a config template that defaulted randomize to true.
Related errors
- optional icebug engine currently requires deterministic thre
- 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/88755a3042651f1a.
Report an issue: GitHub.