Skip to content

Delete Lite Guard-stage tests that assert spelling, slice 5 (#5833) - #5841

Merged
erikdarlingdata merged 6 commits into
devfrom
fix/5833-triage-5
Oct 15, 2026
Merged

erikdarlingdata merged 6 commits into
devfrom
fix/5833-triage-5

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Claude posting for Erik Darling.

Part of #5833.

Why

Erik's ruling on #5833: "tests should be load bearing". A Guard-stage test that fails on a correct change (a doc sentence, a SQL fragment, a constant's value, a roster, a call spelled a certain way at a line) protects nothing and costs a red run. This is slice 5 of the triage: 31 Lite.Tests files that carry [Trait("Stage", "Guard")] and read source text.

What changes

Test code only. No production code, nothing under deprecated/, no new tests.

  • Of the 31 files: 8 deleted, 10 trimmed (DarlingReadsTraitGuardTests among them), 13 kept.
  • 63 test methods removed: 38 in the deleted files, 24 in the Lite trims, and 1 in Darling.Tests/QueryStoreClutterTests (see below).
  • Helpers and rosters that only the removed tests used went with them: KnownLiteMissingMcpTools and Format (inventory pin), RepoPath/RepoRoot (AlertDeliveryChannelTests), ReadRepoFile (AzureSqlDatabaseMasterPinsTests), ToolDescription/DescriptionSpan (CrossSkuSurfaceSourceTests), InstallerNameFormats, RuntimeDemandPhrases, FrameworkRequirement, FrameworkDependentRequirements, DerivedInstallerNames, LinesMentioning (LiteRuntimePrerequisiteDocsTests), and the trait detector in DarlingReadsTraitGuardTests.
  • Dead callers outside the slice, removed rather than restoring anything:
    • Darling.Tests/QueryStoreClutterTests.TheLiteInventoryRatchet_NamesTheToolAsAPort_NotAnArchitecturalBoundary read the deleted KnownLiteMissingMcpTools roster to check the wording of a comment above one entry. Spelling, so it is deleted.
    • Darling.Tests/FinOpsHotspotRegionTests had a "Lite allow-list" row pointing at the deleted roster (which dev had just added four entries to; the merge drops them with it). The row is removed; the other three lists stay.
    • Three <see cref>s to removed tests (Lite.Tests/ServerTabCapabilityPinTests.cs line 27, Lite.Tests/ServiceBuildSurfaceTests.cs line 26, Lite.Tests/LlmsTxtCollectorCensusTests.cs line 19) became <c> text, so DocCommentHygieneTests still resolves every cref.

Per file

File Call The defect it fails on, or the spelling it asserted
AlertDeliveryChannelTests TRIM (1 of 10) Kept: the stored delivery vocabulary and its describer, tested as behavior. Removed TheLiteProducer_DeclaresItsTrayChannel: the spelling of a named argument at the call site.
AlertDeliveryModeThreadingGuardTests KEEP A Lite alert send that leaves out the delivery mode skips the aggregation cap, so one network blip costs one post per server.
AlertLegendParityTests KEEP The settings legend (both SKUs) lists Runnable Queue or Client Timeouts on a colour that AlertSeverity.ForMetric never returns, so users see the wrong colour key.
ArchivableTableBareReadSweepTests KEEP A reader that queries an archived table by its bare name, not its v_ view, silently loses history older than 7 days.
AuroraOnlySqlIsGatedTests TRIM (1 of 4) Kept: Aurora-only SQL with no gate or vanilla alternative (self-hosted PostgreSQL got no statement data, twice). Removed TheAllowListHasNoStaleEntries: a stale-entry roster check.
AzureSqlDatabaseMasterPinsTests TRIM (1 of 3) Kept: the N/A provisioning verdict for a logical server's master. Removed LogicalServerMasterEdition_MatchesTheCollectorsFormat: regexes over the collector's SQL wording.
BaselineDiscontinuityRenderCensusTests DELETE (7) Call names in tool bodies, a description sentence, chart helper call spelling, JavaScript function text, and a roster of eight tool names.
CiSelectLocalClassesGuardTests KEEP Behavior tests of ci-select.py local-classes on a throwaway repository: a changed symbol that selects no class lets a red class through to CI.
CiSelectMapSelectGuardTests KEEP Behavior tests of ci-select.py map-select: the selection must fall back to "run everything", never "run nothing". The env-drift check fails when a CI gate variable would never select its class.
CollectorViewerCoverageTests DELETE (3) A coverage roster: every collector table has a Lite reader or sits on a debt allow-list. A new store-only table, a correct change, fails it.
CredentialManagerCollection KEEP A test class that touches the real Credential Manager outside the serial collection fails intermittently with error 1168 (a measured race).
CrossAppGuardCiGateTests KEEP A path filter that does not reach a file a suite reads, so a pull request skips the suite that would fail and dev goes red after merge. A declined run must not read as green.
CrossAppMcpToolInventoryPinTests TRIM (6 of 7) Kept: DarlingMcpTools_AreASupersetOfLite_ExceptKnownNamingDrift, a Lite MCP tool with no Darling twin. Removed: the Darling-only ratchet roster, the Lite-only allow-list equality, and the tool counts in the Darling instructions, the root README (two) and llms.txt (doc wording).
CrossAppStatementFilterPinTests KEEP (wiring) If a host loses the shared statement filter, or a plan read skips the filtered seam, MCP returns unfiltered statement text. The behavior tests call the filter list directly and never go through the host builder.
CrossSkuSurfaceSourceTests TRIM (2 of 7) Kept: the field-set parity of the get_collection_health blocks across SKUs (a payload key one SKU drops), the fleet-scoped read-failure inventory, and started_at/counting_since equality. Removed: BothSkusToolDescriptions_StayByteIdentical and TheSharedDescription_DocumentsTheServiceBlock (description wording). The file is also compiled into Darling.Tests.
DailySummaryCpuBarPinTests DELETE (1) A SQL literal, a column alias and a reader ordinal, checked as text.
DarlingReadsTraitGuardTests TRIM (5 of 6) Removed: the Reads=Darling trait census and its four detector self-tests (a trait roster, the same kind the issue cites). Kept: EveryDarlingFileLiteTestsCompiles_IsInTheFullSuiteFilter. A linked Darling file missing from lite_linked_shard means editing it skips the Lite classes that run it. The class name is unchanged; its doc comment now says what is left.
DeltaFamilySeedingCensusTests TRIM (1 of 7) Kept: a delta family a host does not seed on restart stores one interval of made-up quiet after every restart, and the cache is not cleared when a server leaves. Removed TheSharedSeedReads_AreByteIdenticalAcrossTheTwoHosts (SQL text identity).
DuckDbInitializerDisposalGuardTests KEEP An undisposed DuckDbInitializer in a test leaks a whole database (threads, handles, about 15 MB) per test until the test process runs out.
EntraDeviceCodeTests KEEP 58 behavior tests, plus two source scans: a token target assigned from anything but an acquisition, and a server connection-string site that skips the Entra wrapper.
FinOpsFirstVisitAndBaselineTests TRIM (1 of 24) Kept: the reload policy and the badges (behavior), the baseline SQL run against DuckDB, and the WPF tab reload wiring (KEEP (wiring): a server switch or a collection would not reload the tab). Removed TheGrid_ShowsNaAndTheNoteOnTheBaselineCells (XAML binding format strings).
FinOpsSizeGridReloadPinTests KEEP (wiring) A server added while the FinOps tab is open never loads its Database Sizes and Storage Growth grids. No test can run the WPF tab.
FindingsRetentionHorizonPinTests DELETE (4) A constant's value (30 days), the call chain naming that constant, and a "no literal 30" spelling scan.
GridPayloadColumnOrderPinTests DELETE (4) Display column order in XAML grids: a layout choice, which a correct reorder breaks.
GridTimeColumnSortMemberTests KEEP (wiring) A time column that sorts by its text or by a display-zone DateTime puts the repeated autumn hour out of order. The behavior tests show the bug; the XAML checks keep each grid on its UTC sort member, which no WPF test can reach.
GuardStageCensusTests DELETE (12) The Stage=Guard trait roster and its exemption list, with the detector self-tests.
HostHeaderGuardTests KEEP (wiring) Without the Host-header guard as the MCP host's first middleware, a DNS-rebound browser page can call every tool. No behavior test goes through Lite's host pipeline; McpJsonPostGuardTests reads the same source.
LiteRuntimePrerequisiteDocsTests TRIM (4 of 9) Kept: every shipped Lite artifact is published self-contained, Setup.exe and the ZIP come from the right publish, the nightly ZIP has the release shape, the lock file covers every published RID, and the notice ships beside the exe (each one, if broken, ships an artifact that needs a runtime or will not restore). Removed: the runtime-download sentences in the README and docs, and the runtimeconfig translation table that served them (doc wording).
LockTimeoutYieldTests TRIM (2 of 7) Kept: the yield and health-streak behavior, the SET LOCK_TIMEOUT guard in both query variants (a snapshot read that blocks on a monitored server), and the runner's 1222 catch (KEEP (wiring): a yield would count as a collection failure). Removed QuerySnapshots_Is_The_Only_Flagged_Collector (a one-name roster) and DailySummary_Error_Count_Stays_ExactMatch_On_ERROR (SQL predicate wording).
LogTailOverlapThresholdPinTests DELETE (4) Numbers and claims inside prose comments about log-tail overlap.
McpDescriptionTruthPinTests DELETE (3) MCP tool description sentences.

Undecided (kept; the coordinator rules)

  • CrossAppGuardCiGateTests.TheTimingSourceListing_IsTriedThreeTimes_AndAPageIsTakenOnlyWhenItsNewestPushRunIsFresh: it pins a retry count of three and the shell text of the freshness check, which is spelling. It also checks that artifact retention outlasts the freshness window, which is a real consistency rule.
  • CrossAppGuardCiGateTests.ExactlyOneConsumerReadsAnotherRunsArtifacts_TheLiteShardPackersDownload: it keeps true a claim that build.yml's cancel-in-progress comment rests on.
  • EntraDeviceCodeTests.TheDarlingViewerDoesNotOfferTheMode: a check that a UI option is absent (the Darling Viewer must not offer interactive device-code auth).
  • CredentialManagerCollection's census class: a collection-membership roster, but a missing member is a real intermittent failure, so it stays as KEEP.

Shared helpers left in place

ParitySource, CSharpSourceWalker, GuardStageScanner (Darling.Tests, linked into Lite.Tests; Darling's own GuardStageCensusTests in another slice still uses it) and CrossAppGuardCiGateTests.LiteFilterFilePatterns/ReadLiteShardScript are all still used by surviving tests.

Production code left unused

None found: no removed test was the only reader of a production member. Production comments still name the deleted KnownLiteMissingMcpTools roster: Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingMcpQueryStoreClutterTools.cs line 74, Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingMcpStoreHostTools.cs line 33 and Darling/PerformanceMonitor.Darling.Viewer/ViewerServerTab.Queries.cs line 60, plus the test comment Darling.Tests/McpToolGuideHeads.PgB.cs line 194. They are comments only, and the brief rules out production edits, so they are left for a follow-up.

Test plan

  • dotnet build Lite.Tests -c Debug and dotnet build Darling/Darling.Tests -c Debug: 0 Warning(s), 0 Error(s).
  • Gate (pre-push.sh), Guard stage, dev at the brief versus this branch:
    • dev (brief): Darling.Tests Total: 4601, Lite.Tests Total: 1281
    • this branch: Darling.Tests Total: 4607, Errors: 0, Failed: 0 and Lite.Tests Total: 1181, Errors: 0, Failed: 0. Lite has 100 fewer Guard cases. Dev's Darling count moved after the brief's figure; on Darling, this branch removes 1 method, the Darling-compiled copies of the 2 CrossSku methods, and 1 theory row.
  • Gate classes: line: classes: darling 2882, lite 779 (symbols: 183 candidates)
  • GATE GREEN: guard stage of both suites and 2882+779 selected classes passed, run after merging origin/dev. The merge had one conflict: dev had added four entries to the deleted Darling-only roster, and the conflict was resolved by dropping the roster.
  • Full suites: not run on the laptop (brief rule). CI decides.

SECTION: Changed
ENTRY: - Guard-stage spelling tests deleted, slice 5 ([#PR]) - 63 test methods in 19 files that asserted how code is spelled, not what it does.

Censuses and pins on doc wording, SQL fragments, constants, grid column order, trait rosters and coverage allow-lists. Part of #5833.
…#5833 slice 5)

The behavior and defect checks in each file stay. Part of #5833.
QueryStoreClutterTests read the deleted Darling-only roster for a comment's wording; three doc comments named removed tests by cref. Part of #5833.
# Conflicts:
#	Lite.Tests/CrossAppMcpToolInventoryPinTests.cs
@erikdarlingdata erikdarlingdata added the merge-train In a merge train: its CI ran on the train PR label Oct 15, 2026
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 15, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-train In a merge train: its CI ran on the train PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant