Bootstrap Dashboard.Tests project source (plan 3)#1001
Merged
Conversation
Populates the previously scaffold-only Dashboard.Tests folder with the pure-algorithm subset of Lite.Tests — the slice that exercises shared analysis code with no DuckDB or SQL Server dependency. SQL-touching tests (collectors, finding stores, anomaly detector, baseline provider DB paths) are deferred to a follow-up workstream that picks a fixture strategy (TestContainers recommended in the plan). Files added: - Dashboard.Tests/Dashboard.Tests.csproj — mirrors Lite.Tests.csproj (net10.0-windows, xunit.v3 3.2.2, ProjectReference to Dashboard.csproj) - Dashboard.Tests/FactScorerTests.cs — 12 cases (10 ApplyThresholdFormula InlineData rows, Score_UnknownWaitType, Amplifier_SeverityCappedAt2) - Dashboard.Tests/InferenceEngineTests.cs — 3 cases (RelationshipGraph.GetActiveEdges edge predicates) - Dashboard.Tests/BaselineBucketTests.cs — 3 cases (BaselineBucket.EffectiveStdDev floor / zero-activity / pass-through; renamed from Lite's BaselineProviderTests because only the value-type tests are ported) Files modified: - Dashboard/Dashboard.csproj — adds <InternalsVisibleTo Include="Dashboard.Tests" /> so the ported ApplyThresholdFormula_ReturnsExpected Theory can call the internal static method. - PerformanceMonitor.sln — adds Dashboard.Tests project block and per-config build mappings. Deferred: - BlockingChainReconstructorTests — Dashboard side is on dev, but Lite's matching test file is still on the unmerged Lite Stage 3 worktree. The parity port rides in the same PR that brings Lite Stage 3's reconstructor tests to dev, not this bootstrap. - All SQL-touching ports (FactCollector, FindingStore, AnomalyDetector, SqlServerBaselineProvider DB paths, full AnalysisService/Scenario pipelines). Tracked under §10 of the plan. Verification: - dotnet build Dashboard.Tests/Dashboard.Tests.csproj -c Debug: 0 warnings, 0 errors. - dotnet test Dashboard.Tests/Dashboard.Tests.csproj: 18 passed, 0 failed, 0 skipped (~1s). - dotnet build PerformanceMonitor.sln -c Debug: 0 warnings, 0 errors. - Lite.Tests unchanged: 260 passed, 0 failed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
erikdarlingdata
added a commit
that referenced
this pull request
May 27, 2026
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
Populates the previously scaffold-only
Dashboard.Tests/folder with the pure-algorithm subset ofLite.Tests— every test that exercises shared analysis code without a DuckDB or SQL Server dependency. Three ported files, 18 cases, ~1s wall time.What changed
Dashboard.Tests/Dashboard.Tests.csproj— mirrorsLite.Tests/Lite.Tests.csprojbyte-for-byte modulo the project reference (net10.0-windows, xunit.v3 3.2.2,Microsoft.NET.Test.Sdk18.5.1, sameNoWarnset,UseWPF=true).Dashboard.Tests/FactScorerTests.cs— 12 cases: 10ApplyThresholdFormula[InlineData]rows,Score_UnknownWaitType_GetsSeverityZero,Amplifier_SeverityCappedAt2.Dashboard.Tests/InferenceEngineTests.cs— 3 cases:Graph_NoEdgesForUnknownFact,Graph_CxPacketEdgeFires_WhenSosIsHigh,Graph_CxPacketEdgeDoesNotFire_WhenSosIsLow.Dashboard.Tests/BaselineBucketTests.cs— 3 cases onBaselineBucket.EffectiveStdDev(proportional floor, zero-activity, pass-through). Renamed from Lite'sBaselineProviderTestsbecause only the value-type cases port; the provider-level DuckDB cases are deferred.using DuckDB.NET.Data;stripped.Dashboard/Dashboard.csproj— adds<InternalsVisibleTo Include="Dashboard.Tests" />.FactScorer.ApplyThresholdFormulaisinternal static, so the Theory port would not compile without this.PerformanceMonitor.sln— addsDashboard.Testsproject block + per-config Debug/Release build mappings under a fresh GUID.Test bodies,
[InlineData]rows, and assertions are byte-identical to the Lite originals — the shared algorithms are byte-identical between Lite and Dashboard, so the ported tests pass without behavior change.Out of scope (intentionally deferred)
BlockingChainReconstructorTests—Dashboard/Analysis/BlockingChainReconstructor.csis ondev, but Lite's matching test file lives only on the unmerged Lite Stage 3 worktree. The parity port rides in the same PR that brings Lite Stage 3's reconstructor tests to dev, not this bootstrap — keeping Lite and Dashboard symmetrical.SqlServerFactCollector,SqlServerFindingStore,SqlServerAnomalyDetector, the database paths ofSqlServerBaselineProvider, fullAnalysisService/Scenariopipelines. The plan documents these under §10 and recommends TestContainers as the fixture surface; that decision is its own PR.FinOpsHealthCalculator/HighImpactScorerparity — Dashboard FinOps has no pure scoring class to mirror Lite's; structurally different surface, gets bespoke tests later.UseWPF=truein the test project is for type loading only.Test plan
dotnet build Dashboard.Tests/Dashboard.Tests.csproj -c Debug— 0 warnings, 0 errors.dotnet test Dashboard.Tests/Dashboard.Tests.csproj— 18 passed, 0 failed, 0 skipped (~1s).dotnet build PerformanceMonitor.sln -c Debug— full-solution build clean, 0 warnings, 0 errors.dotnet test Lite.Tests/Lite.Tests.csproj— Lite.Tests still passes (260/260), confirming tests were COPIED + renamed, not moved.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com