mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-10 09:13:53 +08:00
Add rank_refresh=eager|stale_on_exact with eager as the default. The opt-in stale_on_exact policy skips synchronous PageRank/LinkRank/node_degree recompute only after exact incremental graph publishes when dependency indexing did not run and rank-derived views are already marked stale. The stale metadata check is deliberate: if rank views are missing, complete, or otherwise not explicitly stale, the helper falls back to eager recompute so stale scores are not served as fresh. Existing search/trace paths already omit stale rank and warn through derived-view freshness state. Validation: make -j8 -f Makefile.cbm build/c/test-runner; CBM_ONLY_SUITE=pagerank ./build/c/test-runner; CBM_ONLY_SUITE=pipeline ./build/c/test-runner; CBM_ONLY_SUITE=mcp ./build/c/test-runner; CBM_ONLY_SUITE=cli ./build/c/test-runner; bash scripts/check-source-safety.sh; bash scripts/test-source-safety.sh; git diff --check; make -j8 -f Makefile.cbm cbm; isolated CLI smoke with incremental_reindex=always and rank_refresh=stale_on_exact showed incremental.exact.done files=2 and pagerank.defer without pagerank.done on the second exact-delta run. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>