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
{{ message }}
Repository navigation
Commit aabbaa2
Browse filesBrowse the repository at this point in the historyBrowse files
Strip AI-drafted wait stat content + legacy marker + drop Rule 21 (#215 D3) (#266)
* Strip AI-drafted wait-stat descriptions + legacy marker + remove Rule 21 (#215 D3, framework marker, Joe's categorization refinements)
D3: WaitStatsKnowledge Description / HowToFix text was AI-drafted without
expert review. Joe flagged the SOS_SCHEDULER_YIELD fix text as misleading
and asked that creative copy come from SQL Server experts, not AI. Stripped
all Description and HowToFix content; kept the file structure and the
ShowEffectiveLatency flag (structural, not creative). Entries are still
emitted but the warning message now shows only the wait name, observed ms
and wait count, and — for PAGEIOLATCH_* — effective latency. Erik / Joe
fill in content over time; the pipeline is ready to render it when they do.
BenefitScorer.EmitWaitStatWarnings now omits the description separator and
sets ActionableFix to null when the entry has no HowToFix, so the renderers
don't print empty "Fix:" prefixes.
Framework marker (option a, flipped): PlanWarning + WarningResult grow an
IsLegacy bool. Joe's preference: tag old rules so new ones don't need
re-tagging when the rest get migrated. A LegacyWarningTypes set in
PlanAnalyzer lists rules that haven't been folded into the benefit-scoring
framework yet; MarkLegacyWarnings post-pass sets IsLegacy = true on matches.
Renderers (web strip, HTML export, Avalonia plan + node warnings,
TextFormatter statement + grouped operator paths) all show a "legacy" badge
or " [legacy]" tag when set.
Rule 21 (CTE referenced multiple times) removed per Joe's feedback —
actual plans already show where time goes; statement-text pattern matching
on CTE references is guessing. Removed the rule, its regex, the rule map
entry, and DetectMultiReferenceCte helper.
TextFormatter operator-warning benefit % now also uses the N1-except-100
formatter so grouped operator output is consistent with the rest of the UI.
Version bump 1.7.6 -> 1.7.7.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Restore CRLF line endings in PlanViewerControl.axaml.cs
Prior commit's Python patch script wrote LF line endings. This file is
checked in with CRLF; restoring. No code change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop Rule 21 test — rule was removed in prior commit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sb.AppendLine("<span class=\"warn-legacy\" title=\"Legacy rule — predates the benefit-scoring framework\">legacy</span>");
463
466
if(w.MaxBenefitPercent.HasValue)
464
467
sb.AppendLine($"<span class=\"warn-benefit\">up to {(w.MaxBenefitPercent.Value>=100?w.MaxBenefitPercent.Value.ToString("N0"):w.MaxBenefitPercent.Value.ToString("N1"))}% benefit</span>");
// Count references as FROM/JOIN targets after the CTE definition
1466
-
varrefPattern=newRegex(
1467
-
$@"\b(FROM|JOIN)\s+{Regex.Escape(cteName)}\b",
1468
-
RegexOptions.IgnoreCase);
1469
-
varrefCount=refPattern.Matches(text).Count;
1470
-
1471
-
if(refCount>1)
1472
-
{
1473
-
stmt.PlanWarnings.Add(newPlanWarning
1474
-
{
1475
-
WarningType="CTE Multiple References",
1476
-
Message=$"CTE \"{cteName}\" is referenced {refCount} times. SQL Server re-executes the entire CTE each time — it does not materialize the results. Materialize into a #temp table instead.",
1477
-
Severity=PlanWarningSeverity.Warning
1478
-
});
1479
-
}
1480
-
}
1481
-
}
1482
-
1483
1496
/// <summary>
1484
1497
/// Verifies the OR expansion chain walking up from a Concatenation node:
0 commit comments