chore(intel): remove dead _logCandidateStats from FunctionCandidateManager#49
Conversation
…nager _logCandidateStats() has no callers (grep src/ tests/) and silently contained a latent bug — the third list comprehension counted scores == 2 again instead of == 0, so the dead-code stats would have been wrong if anyone wired it in. Each list comprehension also called getScore() once per candidate and ran five separate passes over candidates.values(), so reviving it would be performance-hostile. Removed the method outright. The reraise_non_operational_exception import is still used elsewhere in the file, so the import stays. Validation: - pytest tests/test* -> 111 passed, 79 subtests passed - ruff check + format --check clean
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Summary
Removes
FunctionCandidateManager._logCandidateStats. It has no callers (grep src/ tests/) and contained a latent bug — the third counter recountedgetScore() == 2instead of== 0, so the unused stats would have been wrong if anyone wired it in. Each of its list comprehensions calledgetScore()once per candidate and ran five separate passes overcandidates.values(), so reviving it would also be perf-hostile.The
reraise_non_operational_exceptionimport is still used elsewhere in the file, so the import stays.Behavior compatibility
FunctionCandidateManagerunchanged.Test plan
python -m pytest tests/test*— 111 passed, 79 subtests passedpython -m ruff check .— cleanpython -m ruff format --check .— cleanhttps://claude.ai/code/session_01C8CcS2k1g59ByLKYdEcaxR
Generated by Claude Code