---
title: config_analyzer | CodeWeaver Docs
description: API reference for codeweaver.engine.services.config_analyzer
url: "https://docs.knitli.com/api/engine/services/config_analyzer"
type: static
generatedAt: "2026-04-17T17:21:08.559Z"
---

# config_analyzer
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/engine/services/config_analyzer.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F&text=config_analyzer)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F&text=config_analyzer)[Share on Bluesky](https://bsky.app/intent/compose?text=config_analyzer%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F&title=config_analyzer)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F&t=config_analyzer)[Share on Email](mailto:?subject=config_analyzer&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F)[Share on WhatsApp](https://wa.me/?text=config_analyzer%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fengine%2Fservices%2Fconfig_analyzer%2F&text=config_analyzer)
# `codeweaver.engine.services.config_analyzer`
[Section titled “codeweaver.engine.services.config_analyzer”](#codeweaverengineservicesconfig_analyzer)
Configuration change analysis service.

This service analyzes configuration changes for compatibility and impact. ARCHITECTURE: Plain class with no DI in constructor (factory handles DI).

## Class: `ConfigChangeAnalysis`
[Section titled “Class: ConfigChangeAnalysis”](#class-configchangeanalysis)
Results of configuration change analysis.

## Class: `ConfigChangeAnalyzer`
[Section titled “Class: ConfigChangeAnalyzer”](#class-configchangeanalyzer)
Analyzes configuration changes for compatibility with policy enforcement.

Integrates with the collection policy system to enforce configuration change restrictions before analyzing compatibility. Policy validation happens before technical compatibility checks.

ARCHITECTURE NOTE: This is a PLAIN CLASS with no DI in constructor. Factory function in engine/dependencies.py handles DI integration.

### Method: `analyze_config_change`
[Section titled “Method: analyze_config_change”](#method-analyze_config_change)

**

```
analyze_config_change()
```

Comprehensive config change analysis with policy enforcement and impact classification.

Validates configuration changes against collection policy before performing technical compatibility analysis. Policy enforcement happens first to ensure changes are allowed before analyzing their technical impact.

Args: old_fingerprint: Existing checkpoint fingerprint new_config: New embedding configuration vector_count: Number of vectors in collection

Returns: Detailed analysis with impact classification and recommendations

Note: Policy validation occurs before compatibility checks. A STRICT policy may block changes that would otherwise be technically compatible.

### Method: `analyze_current_config`
[Section titled “Method: analyze_current_config”](#method-analyze_current_config)

**

```
analyze_current_config()
```

Analyze current config against existing collection.

Returns: Analysis result, or None if no collection exists yet.

### Method: `validate_config_change`
[Section titled “Method: validate_config_change”](#method-validate_config_change)

**

```
validate_config_change()
```

Validate config change before applying (proactive validation).

Called by `cw config set` command for early warning.

Args: key: Configuration key being changed (e.g., “provider.embedding.dimension”) value: New value for the key

Returns: Analysis result if change affects index validity, None otherwise

## Class: `TransformationDetails`
[Section titled “Class: TransformationDetails”](#class-transformationdetails)
Strongly typed transformation metadata (not dict!).