mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-01 07:44:01 +08:00
Three bugs fixed in autotune.py: 1. CWD bug: binary uses getcwd() (not rootUri) for session_root. _send_batch now passes cwd=repo_root to subprocess so architecture queries return results for the correct project. 2. Race condition: delete_project_db() before an MCP session triggered the background autoindex thread which raced with index_repository, causing isError=true. Removed the deletion — index_repository forces a full reindex by itself. 3. CBM ground truth was wrong: used C in-degree (cbm_arena_alloc in-degree 21) but PageRank is nearly uniform for CBM's C graph (~0.000035 for all). Updated to functions verified high by PageRank: cbm_go_stdlib_register, cbm_extract_imports, cbm_levenshtein_distance, cbm_path_match_score, etc. Added exclude_ui_tests and calls_boost_excl_tests experiments. Final scores (9/30 vs 5/30 before fixes): rtk: 5/10 — tokenize, resolved_command, check_for_hook, try_route_native_command autorun: 2/10 — session_state, SessionStateManager (Path stdlib bug inflates top slots) cbm: 1-2/10 — architecture IS improved, C/Go code shown instead of TypeScript UI Signed-off-by: Andrew Hundt <ATHundt@gmail.com>