Skip to content

Clean up dead code: unused evaluation APIs, chunk_by_paragraphs, bundled channel installer, reasoning safety field #648

@ilblackdragon

Description

@ilblackdragon

Problem / Motivation

Several pieces of code are declared but never called outside tests, accumulating dead code with #[allow(dead_code)] annotations. These should either be wired up or deleted.

Items

1. Evaluation module unused APIs

File: src/evaluation/success.rs

  • RuleBasedEvaluator::with_min_success_rate() (line 85) — never called
  • RuleBasedEvaluator::with_max_failures() (line 92) — never called
  • LlmEvaluator::new() (line 208) — never called

Decision needed: Are these planned features or dead weight? If planned, add a tracking TODO. If dead, delete them.

2. chunk_by_paragraphs() unused alternative

File: src/workspace/chunker.rs (line 120)

Alternative chunking strategy. Has tests (lines 259, 287) but zero callers in production code. Only chunk_document() is used.

Decision needed: Delete if the token-window chunker is the permanent choice. Keep if paragraph chunking is planned for a future indexing mode.

3. install_bundled_channel_from_artifacts() dead code

File: src/extensions/manager.rs (line 1173)

Marked "Used by upcoming hot-activation flow" but not called anywhere. If hot-activation is no longer planned, delete it.

4. Reasoning::safety field unused

File: src/llm/reasoning.rs (line 206)

Marked "Will be used for sanitizing tool outputs" but the safety field is never read. Tool output sanitization happens in the worker (src/agent/worker.rs), not in the Reasoning struct. If sanitization belongs in the worker, remove this field. If it should move to Reasoning, wire it.

Acceptance Criteria

  • Each item is either deleted (if dead) or wired up (if needed), with #[allow(dead_code)] removed
  • No new #[allow(dead_code)] annotations added
  • All existing tests pass (delete the chunk_by_paragraphs tests if the function is deleted)
  • Zero clippy warnings

Non-Goals

  • Does NOT refactor the evaluation or chunking systems
  • Does NOT change behavior of any live code paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrisk: lowChanges to docs, tests, or low-risk modulessize: S10-49 changed lines

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions