Skip to content

Add 3 Tier-2 issue-classification arms to the shared FactScorer#1517

Merged
erikdarlingdata merged 4 commits into
devfrom
feature/tier2-analysis-arms-batch1
Jul 14, 2026
Merged

Add 3 Tier-2 issue-classification arms to the shared FactScorer#1517
erikdarlingdata merged 4 commits into
devfrom
feature/tier2-analysis-arms-batch1

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

What

Restores three problem classifications the deprecated Dashboard's report.* / config.critical_issues SQL made but the ported shared analysis engine (PerformanceMonitor.Analysis, one code path for Lite + Dashboard + Darling) had dropped. All three are pure FactScorer additions over facts the collectors already emit — no collector, schema, or install/*.sql change — so they light up in all three apps' recommendations at once. Every threshold cites its source Dashboard SQL line in a code comment.

Arm 1 — Query Store disabled (INFO)

ScoreDatabaseConfigFact: query_store_on_count < database_count (user DBs only; system DBs excluded from both counts by the collectors) → low 0.3 base folded into the existing DB_CONFIG finding, which roots at any positive severity (a ConfigAdvisoryRootKey). INFO band (< 0.75) matches the Dashboard.
Source: install/50_configuration_issues_analyzer.sql:83 (severity = N'INFO').

Arm 2 — Security-cache (TokenAndPermUserStore) growth (WARNING)

ScoreMemoryFact: reads the USERSTORE_TOKENPERM clerk size (MB) from the otherwise context-only MEMORY_CLERKS fact (the fact carries each top-clerk's MB keyed by clerk_type, and MemoryClerksCollector stores clerk_type = sys.dm_os_memory_clerks.type). Flat WARNING (0.9) at >= 1 GB, matching the Dashboard's single WARNING tier with no size escalation.
Source: install/50_configuration_issues_analyzer.sql:562 (WARNING), :583 (pages_kb / 1024 / 1024 >= 1.0).

Arm 3 — Runnable-queue / worker pressure (STANDALONE)

ScoreCpuFact: a standalone arm rooting the collected cpu_scheduler_stats snapshot on total_runnable_tasks_count, tiered > 50 → 1.0, > 20 → 0.75, > 10 → 0.5, plus the collector's runnable_tasks_warning (SUM(runnable) >= cpu_count) small-box HIGH fallback. Additive to and distinct from the #1494 THREADPOOL runnable-queue amplifier, which is unchanged and still fires independently. Base maxes at 1.0 (WARNING) like every base fact — the CRITICAL band is reached only via amplifier corroboration (the runnable-queue → THREADPOOL escalation).
Source: install/47_create_reporting_views.sql:1839-1844 (report.cpu_scheduler_pressure pressure_level CASE).

Advice wiring

So the new/expanded root keys don't render contentless cards, advice is wired (sourced from the Dashboard's own message / recommendation SQL): new static MEMORY_CLERKS + RUNNABLE_TASKS blocks in FactAdvice, and Query Store folded into ComposeDbConfig (lists "N with Query Store off" + enable-QS remediation).

Collector changes

None. All three arms read facts/metadata the three collector families already emit identically (DB_CONFIG.query_store_on_count/database_count, MEMORY_CLERKS[USERSTORE_TOKENPERM], RUNNABLE_TASKS.total_runnable_tasks_count/runnable_tasks_warning). No fact-key-inventory pin is affected (no new fact keys).

Tests

  • New FactScorer tests in both Lite.Tests and Dashboard.Tests (mirrored, Recs Stage B (severity): cap tuning-class CXPACKET, escalate meltdowns through THREADPOOL #1494 style): every tier fires at the right band, stays silent below the bar, and a co-present worse DB_CONFIG issue is left unchanged.
  • The Lite clean-server seeder (TestDataSeeder.SeedDatabaseConfigAsync) now defaults Query Store ON (the healthy value, like the rcsi-on / CHECKSUM defaults beside it) so the QS-off arm stays dormant in fixtures not exercising it; the arm itself is covered directly with hand-built facts.
  • Green: Lite.Tests FactScorer + Inference + Scenario + Collector + AnalysisService = 173 passed; Dashboard.Tests FactScorer + FactAdvice + Inference = 170 passed. Darling analysis project builds. No Installer/live-server tests run.

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits July 13, 2026 21:10
Restore three classifications the deprecated Dashboard's report.* /
config.critical_issues SQL made but the ported shared analysis engine had
dropped. All three are pure FactScorer additions over facts the collectors
already emit (no collector/schema/install change), so they light up in Lite,
the Dashboard, and Darling recommendations at once; each cites its source
SQL line in a code comment.

- Query Store disabled: INFO advisory folded into DB_CONFIG, detected as
  query_store_on_count < database_count (install/50:83).
- Security-cache (TokenAndPermUserStore) growth: flat WARNING when the
  USERSTORE_TOKENPERM clerk >= 1 GB, off the context-only MEMORY_CLERKS fact
  (install/50:562,583).
- Runnable-queue / worker pressure: standalone ScoreCpuFact arm on
  total_runnable_tasks_count tiered > 50/20/10 plus the small-box
  runnable_tasks_warning fallback (install/47:1839-1844); additive to and
  distinct from the #1494 THREADPOOL amplifier, which is unchanged.

Advice wired for the new/expanded root keys (MEMORY_CLERKS + RUNNABLE_TASKS
blocks; Query Store folded into ComposeDbConfig) so the cards are not
contentless, sourced from the Dashboard's own message/recommendation text.

FactScorer tests added in both Lite.Tests and Dashboard.Tests (tiers fire at
the right band, stay silent below the bar, existing arms unchanged). The Lite
clean-server seeder now defaults Query Store ON (the healthy value) so the
QS-off arm stays dormant in fixtures not exercising it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant