Skip to content

refactor: remove #[cfg(test)] type aliases for old config types#133

Open
stephenleo wants to merge 3 commits intostory-3-1-v2from
story-3-4-v2
Open

refactor: remove #[cfg(test)] type aliases for old config types#133
stephenleo wants to merge 3 commits intostory-3-1-v2from
story-3-4-v2

Conversation

@stephenleo
Copy link
Copy Markdown
Owner

Summary

  • Removes #[cfg(test)] type aliases CostSubfieldConfig and ContextWindowSubfieldConfig from src/config.rs.
  • Removes the now-unused impl_has_threshold_style! macro.
  • Updates all test files to use SubfieldConfig directly.

Re-submission of PR #128 after revert. Depends on PR #132.

Test plan

  • cargo build exits 0 with no errors
  • cargo test passes all tests with no regressions
  • cargo clippy -- -D warnings exits 0 (no new warnings introduced)
  • Confirm CostSubfieldConfig and ContextWindowSubfieldConfig type aliases are fully removed

🤖 Generated with Claude Code

stephenleo and others added 3 commits March 27, 2026 21:02
… and ContextWindowSubfieldConfig

Replace all test usages with SubfieldConfig directly so test code honestly reflects the real type
and future type divergence is not masked by silent-compiling aliases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the dead `impl_has_threshold_style!` macro (defined but never
invoked) from config.rs and relocate the `#[cfg(test)] use SubfieldConfig`
import in cost.rs from file-top to inside the test module where it belongs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 27, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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