You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eliminate the intermediate optimizer.Config type and ConfigFromVMCPConfig
conversion function to use config.OptimizerConfig directly throughout the
optimizer package. This addresses maintainability concerns by establishing
a single source of truth for optimizer configuration.
Changes:
- Delete pkg/vmcp/optimizer/config.go containing the duplicate config type
- Update optimizer.Factory and EmbeddingOptimizer to use *config.OptimizerConfig
- Flatten embedding config in ingestion.Config (individual fields vs nested)
- Add type aliases (Config, OptimizerIntegration) for test compatibility
- Add test helper methods (OnRegisterSession, RegisterTools, IngestToolsForTesting)
- Update all test files to use flattened config structure
- Handle HybridSearchRatio as pointer with default value (70)
Benefits:
- Single source of truth (no config duplication)
- No synchronization burden between config types
- Eliminates risk of translation bugs
- Clearer code flow without intermediate transformations
Closes review comment in PR #3440 requesting removal of translation layers.
0 commit comments