Summary
Remove legacy token-only pricing helpers that are no longer used by production cost accounting.
Evidence
crates/tui/src/pricing.rs:246 calculate_turn_cost, :256 calculate_turn_cost_estimate, and :271 calculate_turn_cost_with_pricing are only used by pricing tests.
- Production cost accounting uses
calculate_turn_cost_from_usage, calculate_turn_cost_estimate_from_usage, and token_usage_for_pricing to honor cache-hit/cache-miss fields.
crates/tui/src/pricing.rs:363 format_cost has no callers; production uses currency-aware formatters.
Suggested Change
Delete token-only/USD-only legacy helpers and update or remove tests that only preserve the legacy API. Keep usage-aware cost helpers and currency-aware display helpers.
Risk & Confidence
Confidence: high. Risk: low-medium; pricing is user-visible, so tests should cover the usage-aware path after deletion.
Verification Checklist
Summary
Remove legacy token-only pricing helpers that are no longer used by production cost accounting.
Evidence
crates/tui/src/pricing.rs:246calculate_turn_cost,:256calculate_turn_cost_estimate, and:271calculate_turn_cost_with_pricingare only used by pricing tests.calculate_turn_cost_from_usage,calculate_turn_cost_estimate_from_usage, andtoken_usage_for_pricingto honor cache-hit/cache-miss fields.crates/tui/src/pricing.rs:363format_costhas no callers; production uses currency-aware formatters.Suggested Change
Delete token-only/USD-only legacy helpers and update or remove tests that only preserve the legacy API. Keep usage-aware cost helpers and currency-aware display helpers.
Risk & Confidence
Confidence: high. Risk: low-medium; pricing is user-visible, so tests should cover the usage-aware path after deletion.
Verification Checklist
cargo test -p codewhale-tui pricing cost_status scorecard -- --nocapture.cargo check -p codewhale-tui --all-targets.rg "calculate_turn_cost\(|calculate_turn_cost_estimate\(|format_cost\(" crates/tui/src crates/tui/testsonly finds active intended APIs.