mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-03 08:03:38 +08:00
Compute each edge's LinkRank value once and reuse it for both the persisted linkrank row and node_degree.linkrank_in accumulation. This keeps ranking linear in edges but removes the duplicate edge scan and duplicate formula evaluation in the post-PageRank phase. The node_degree path still works independently if the linkrank insert statement cannot be prepared. Add a regression test that compares node_degree.linkrank_in with the sum of incoming persisted LinkRank rows. Validation: git diff --check; bash scripts/check-source-safety.sh; make -j8 -f Makefile.cbm build/c/test-runner; CBM_ONLY_SUITE=pagerank ./build/c/test-runner. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>