Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Code review on PR #20612 (head b16a10e): approve. Read only; I didn't run the tests. A named source now reads only its own |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
Thinking Path
#20513's first rule is that a request for one source never gets another's result. Two reads broke it even with a source named: when a source had no stats document of its own, they read the global
codebase_statsdocument, which describes a different tree. This takes those two out; requiring a source on routes comes later and needs its callers checked first.What Changed
endpoints/sources.py:_get_last_indexedreads only the source's own document, so a source with none reports no last-indexed time instead of another tree's.api/analytics_quality.py:_get_problems_from_chromadbreads the source's document when one is named, and the global one only when none is. A source with no document gets empty stats.analytics_quality_test.pypinned the fallback from bug(quality): _get_problems_from_chromadb reads only "codebase_stats" — misses per-source "codebase_stats_{source_id}" #6670, so that test now asserts the opposite.analytics_quality.pylowered from 1729 to 1718.Verification
Not checked: a real index, or how the pages look with no stats.
Risks
/hardcodesmemory fallback lives instats.py, which fix(analytics): panels tell a failed read, an unindexed source and an empty result apart (#17651) #20543 holds, and it comes later.Model Used
Claude Opus 5.5
Issue Link
Refs #20513
🤖 Generated with Claude Code