codebase-memory-mcp icon indicating copy to clipboard operation
codebase-memory-mcp copied to clipboard

`max_nodes` truncation ignores node importance

Open avigdorsky opened this issue 2 months ago • 2 comments

Severity: medium.

GET /api/layout?max_nodes=5000 returns 514 edges out of ~179 000. Nodes appear to be selected in id order rather than ranked, so the budget is spent on leaves. Before excluding generated JSON it was 164 edges; removing ~4 600 noise nodes moved it only to 514 — so ranking, not noise, is the binding constraint.

Ask: rank by (non-builtin) degree and status (entry, exported) when truncating.


Observed on v0.10.8 (build 996bad5fe6fb), macOS arm64, Python monorepo (~36k nodes / ~179k edges). Happy to provide a minimal reproduction repo if useful.

avigdorsky avatar Sep 09 '26 07:09 avigdorsky

Thank you for the before/after edge counts and for separating node-selection quality from generated-node noise. The ranking policy under max_nodes needs a maintainer decision; I have no new layout change to report yet.

DeusData avatar Oct 19 '26 22:10 DeusData

Thank you for separating node selection from generated-node noise. Ranking under the layout node budget still needs a maintainer decision. Sorry for the delay; I’ll follow up soon.

DeusData avatar Oct 25 '26 17:10 DeusData