Skip to content

chore: prune unnecessary code (automated weekly cleanup)#172

Open
Miyamura80 wants to merge 1 commit into
mainfrom
fix/remove-dead-code-8989103767425016250
Open

chore: prune unnecessary code (automated weekly cleanup)#172
Miyamura80 wants to merge 1 commit into
mainfrom
fix/remove-dead-code-8989103767425016250

Conversation

@Miyamura80

@Miyamura80 Miyamura80 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Scanned the codebase to identify unnecessary dead code.

Found an orphaned block of commented-out python code in utils/llm/dspy_langfuse.py (specifically, a status_message string interpolation calculation block) which fell under the definition of removable code in UNNECESSARY_CODE_GUIDELINE.md.

Other seemingly unused functions or methods identified by tools like vulture or pylint (e.g. setup_logging, Pydantic Settings methods like get_field_value or to_dict in configuration classes) were found to be either:

  • Part of protected config model classes
  • Used indirectly via tests (test_logging_thread_safety.py)
  • Used for dynamic reflection
    These were preserved as per the repository's strict instruction to favor false negatives over false positives.

PR created automatically by Jules for task 8989103767425016250 started by @Miyamura80


Summary by cubic

Removed an orphaned, commented-out status_message calculation in utils/llm/dspy_langfuse.py to reduce noise and comply with UNNECESSARY_CODE_GUIDELINE.md.
Reviewed other linter-flagged items and kept them because they’re used via tests or reflection.

Written for commit 8fcc85f. Summary will update on new commits.

Review in cubic

- `utils/llm/dspy_langfuse.py`: Removed unused/commented out `status_message` definition block in `LangFuseDSPYCallback` logic.
Evidence: It was an orphaned snippet of commented-out python code, matching the definition of unnecessary code in `UNNECESSARY_CODE_GUIDELINE.md`.

Other code items highlighted by linters (e.g., `setup_logging` in `src/utils/logging_config.py` and some Pydantic methods in `common/global_config.py`) were verified as protected patterns or actively used via reflection/tests, and were therefore preserved according to the repository's strict conservative removal rules.

Co-authored-by: Miyamura80 <38335479+Miyamura80@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

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.

1 participant