Add plan-regression and parameter-sensitivity triage detectors (Lite)#975
Open
erikdarlingdata wants to merge 1 commit into
Open
Add plan-regression and parameter-sensitivity triage detectors (Lite)#975erikdarlingdata wants to merge 1 commit into
erikdarlingdata wants to merge 1 commit into
Conversation
Adds two automated-triage facts to the Lite analysis engine: - PARAMETER_SENSITIVITY: detects a single cached plan whose per-execution worker time varies wildly (classic parameter sniffing), sourced from v_query_stats. - PLAN_REGRESSION: detects a query whose current plan is materially worse than a better plan it previously used, sourced from Query Store (v_query_store_stats). Both emit one aggregate fact scored by magnitude (a lone catastrophic offender scores high on its own), join the inference graph with forward and reverse edges so CPU/memory stories reach them as leaf causes, and have drill-down enrichment plus TestDataSeeder scenarios. Stage 1 of 2 (detect + triage). Wiring AnalysisFindings into the notification channels is the committed follow-on workstream. 266/266 Lite tests pass (260 existing + 6 new scenario tests). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two automated-triage detectors to the Lite analysis engine, closing a gap where parameter sensitivity and plan regression were not detected at all — even though every column needed was already collected.
PARAMETER_SENSITIVITY— detects a single cached plan whose per-execution worker time varies wildly (classic parameter sniffing), sourced fromv_query_stats.PLAN_REGRESSION— detects a query whose current plan is materially worse than a better plan it previously used, sourced from Query Store (v_query_store_stats).Both emit one aggregate fact scored by magnitude (a lone catastrophic offender scores high on its own), join the inference graph with forward + reverse edges so CPU/memory stories reach them as leaf causes, and have drill-down enrichment plus
TestDataSeederscenarios.Purely additive — new switch arms, new
AddEdgecalls, new collector methods. No existing code modified, no schema changes.This is stage 1 of 2 (detect + triage). Wiring
AnalysisFindings into the notification channels is the committed follow-on workstream.Plan & review
Designed in a plan file and revised across two adversarial code-grounded review rounds (3 blocking fixes in round 1, 0 blocking in round 2).
Test plan
dotnet build Lite— clean, 0 warnings / 0 errors.dotnet test Lite.Tests— 266/266 pass (260 pre-existing, no regressions; 6 new end-to-end scenario tests covering both detectors through the full pipeline).🤖 Generated with Claude Code