Skip to content

Commit aaf572e

Browse files
committed
fix(louvain): demote native-path parity warning to debug
Warning fired on every communities computation because DEFAULTS.community in config.ts always populates maxLevels/maxLocalPasses/refinementTheta, so the != null guard never gated anything in practice. The message is an informational parity note (Leiden knobs ignored by native Louvain), not user-actionable — debug is the right level. docs check acknowledged: no language/architecture/feature changes. Impact: 1 functions changed, 10 affected
1 parent 725d61d commit aaf572e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/graph/algorithms/louvain.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* JS fallback: Leiden algorithm via `detectClusters` (always undirected, `directed: false`).
77
*/
88

9-
import { warn } from '../../infrastructure/logger.js';
9+
import { debug } from '../../infrastructure/logger.js';
1010
import { loadNative } from '../../infrastructure/native.js';
1111
import type { CodeGraph } from '../model.js';
1212
import type { DetectClustersResult } from './leiden/index.js';
@@ -36,10 +36,8 @@ export function louvainCommunities(graph: CodeGraph, opts: LouvainOptions = {}):
3636

3737
const native = loadNative();
3838
if (native?.louvainCommunities) {
39-
// maxLevels, maxLocalPasses, and refinementTheta are Leiden-specific tuning knobs
40-
// not supported by the Rust Louvain implementation. Warn callers who set them.
4139
if (opts.maxLevels != null || opts.maxLocalPasses != null || opts.refinementTheta != null) {
42-
warn(
40+
debug(
4341
'louvainCommunities: maxLevels/maxLocalPasses/refinementTheta are ignored by the native Rust path',
4442
);
4543
}

0 commit comments

Comments
 (0)