Port ErikAI analysis engine to Dashboard (#590)#615
Conversation
Full SQL Server port of the Lite analysis engine. Dashboard now has the same inference engine, scoring, anomaly detection, drill-downs, and 6 MCP analysis tools as Lite. Portable files (copied from Lite, namespace updated): - AnalysisModels.cs, IFactCollector.cs, IPlanFetcher.cs - InferenceEngine.cs, RelationshipGraph.cs, FactScorer.cs SQL Server implementations (new): - SqlServerFactCollector.cs — 23 fact collectors querying collect.* tables - SqlServerFindingStore.cs — persists findings, auto-creates config.analysis_* tables - SqlServerAnomalyDetector.cs — CPU/wait/blocking/IO anomaly detection - SqlServerDrillDownCollector.cs — 11 drill-down categories - SqlServerPlanFetcher.cs — on-demand plan fetch via sys.dm_exec_query_plan - AnalysisService.cs — orchestrates pipeline with SQL Server backend MCP tools (6 new): - analyze_server, get_analysis_facts, compare_analysis - audit_config, get_analysis_findings, mute_analysis_finding Dashboard now has 63 total MCP tools (was 57). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThis PR ports the ErikAI analysis engine from Lite to Dashboard by implementing SQL Server-specific components: fact collection, anomaly detection, drill-down enrichment, and persistence. Eight new service classes query Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes The diff exhibits high complexity across multiple dimensions: SqlServerFactCollector (1,687 lines) with extensive parameterized SQL and fact aggregation, FactScorer (867 lines) with specialized per-metric scoring methods and amplifier logic, SqlServerAnomalyDetector (543 lines) with baseline-driven multi-metric anomaly detection, and orchestration logic spread across AnalysisService, InferenceEngine, and RelationshipGraph. Changes are heterogeneous—each SQL Server component requires independent reasoning about correctness of metric calculations, threshold logic, and data transformations. Graph-based inference and amplifier evaluation add domain-specific complexity. However, substantial portions follow repetitive patterns (fact emission, error handling, result mapping), which somewhat offsets cognitive load. Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
Summary
Full SQL Server port of the Lite ErikAI analysis engine. Dashboard now has the same inference engine, scoring, anomaly detection, self-sufficient drill-downs, and 6 MCP analysis tools.
Architecture
Key differences from Lite
collect.*tables instead of DuckDBv_*viewsserver_idfiltering (each PerformanceMonitor database = one server)SqlServerFindingStoreauto-createsconfig.analysis_findingsandconfig.analysis_mutedtablesDatabaseServiceRegistryfor server resolutionTest plan
dotnet build— 0 errorsanalyze_servervia MCPCloses #590
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation