Skip to content

chore(intel): remove dead _logCandidateStats from FunctionCandidateManager#49

Merged
r0ny123 merged 1 commit into
masterfrom
claude/perf-sweep-20260526-fcm-dead-stats
May 26, 2026
Merged

chore(intel): remove dead _logCandidateStats from FunctionCandidateManager#49
r0ny123 merged 1 commit into
masterfrom
claude/perf-sweep-20260526-fcm-dead-stats

Conversation

@r0ny123

@r0ny123 r0ny123 commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

Removes FunctionCandidateManager._logCandidateStats. It has no callers (grep src/ tests/) and contained a latent bug — the third counter recounted getScore() == 2 instead of == 0, so the unused stats would have been wrong if anyone wired it in. Each of its list comprehensions called getScore() once per candidate and ran five separate passes over candidates.values(), so reviving it would also be perf-hostile.

The reraise_non_operational_exception import is still used elsewhere in the file, so the import stays.

Behavior compatibility

  • Dead method; removing it has no observable effect.
  • Public API of FunctionCandidateManager unchanged.

Test plan

  • python -m pytest tests/test* — 111 passed, 79 subtests passed
  • python -m ruff check . — clean
  • python -m ruff format --check . — clean

https://claude.ai/code/session_01C8CcS2k1g59ByLKYdEcaxR


Generated by Claude Code

…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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the unused private method _logCandidateStats from the FunctionCandidateManager class, which simplifies the codebase by removing dead code. There are no review comments, and I have no additional feedback to provide.

@r0ny123 r0ny123 marked this pull request as ready for review May 26, 2026 18:41
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbit in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d6f07976-d41a-40b3-91ae-ffb972e884fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@r0ny123 r0ny123 merged commit 20b4e85 into master May 26, 2026
45 checks passed
@r0ny123 r0ny123 deleted the claude/perf-sweep-20260526-fcm-dead-stats branch May 28, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants