Skip to content

Delete Guard-stage tests that assert spelling, slice 3 (#5833) - #5839

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

erikdarlingdata merged 15 commits into
devfrom
fix/5833-triage-3

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Claude posting for Erik Darling.

Part of #5833.

Why

The ruling on #5833: "tests should be load bearing." This is slice 3 of the Guard-stage triage: 37 Darling test files that carry [Trait("Stage", "Guard")] and read source text. Each test method was judged on its own. It stays if it fails on a real defect. It goes if it fails on a correct change: a signature or call at a line, SQL or comment wording, a roster, a doc-comment figure, or a file convention. Nothing was moved, skipped or replaced, and no test was added. No production code changed.

What changes

Counts: 8 files deleted, 15 trimmed, 14 kept; 86 test methods removed (101 Guard test cases, counting Theory rows).

File Call The defect it fails on, or the spelling it asserted
PgServerConfigScopeRungTests TRIM Removed 6: migration DDL text, V102 create text, the rung's doc block, collector UNION wording, the source literal, the tool's serializer lines. Kept: the dense migration ladder, the probe mapping a V138 store to 138 (by Invoke), the reader census (an unscoped read of pg_server_config shadows settings by name), and the file-settings query parity.
PlanForceActionDetailCensusTests KEEP Redaction census: a raw read of plan_force_actions.detail outside the scrub leaks unsanitized detail text (masking family). See Undecided.
PlanSync4535RuleNumberCensusTests TRIM Removed 2 source scans (every new PlanWarning spells RuleNumber =; IsRuleDisabled(7/29) text). Kept the runtime censuses: every analyzer finding carries a rule number, and disabling every rule leaves zero analyzer findings (a guard not wired to config).
PlanViewerCapabilityPinTests KEEP (wiring) WPF paste paths: a bare Clipboard.GetText crashes the app when another process holds the clipboard; the re-entrancy guard and its span stop a held Ctrl+V opening several tabs; the selection handler subscribed once. No behavior test can reach a WPF window. See Not done for PlanViewerCapabilities_NoneDisappeared.
PostgresFaultOutcomeTests TRIM Removed 6 source scans of DarlingWorker/connector call arguments ("ERROR", 0, 0, 0, runClock.ElapsedMilliseconds slots, database stamping) and their ReadSource helper. 43 behavior tests stay.
PowerShellStartInfoCensusTests DELETE Test-harness convention. A test that starts powershell.exe without the helper already fails on CI by itself, so the census adds nothing; the second test pinned the helper's own text.
ProcedureStatsTotalsTests TRIM Removed 8: gap-fill, upsert and DDL wording, the V176 registration line, runner and gap-fill code ordering, retention call text, the trend tools' call text. Kept: the prune never scans procedure_stats and the floor is an index probe, not a global min() (query shapes with a known cost), DatabaseNamesOf, and the tier-clock routing behavior.
ProductVersionDeclarationTests KEEP One version declaration and every workflow read resolving to it: a release whose artifacts carry a version other than the one gated, or an empty read that names an artifact PerformanceMonitorLite-.zip.
ProvisionRolesAclDriftTests KEEP Parity between the shipped provision-roles.sql and the C# column ACL: a BYO viewer seat gets 42501, or a role is granted a secret column.
QueryStoreIntervalConvergenceLiveTests TRIM Removed the Guard class QueryStoreIntervalConvergencePinTests (5 source pins; its own summary says the live tests in the same file prove the behavior) and the now-unused ProductSource reader. The live class is untouched.
QueryStoreIntervalLatestRungTests TRIM Removed the DDL-wording test. Kept the dense ladder, the probe mapping (by Invoke), and the raw-row writer census (see Undecided).
QueryStoreIntervalRetentionPinTests DELETE Source pins on RowCappedDeleteSql(table.Legacy and drop ordering; its own summary names QueryStoreIntervalRetentionLiveTests as the behavior proof.
QueryStoreIntervalWideHistoryNoteTests TRIM Removed "the purge-edge reason is spelled once across product source". Seven behavior tests on the note text stay.
QueryStoreStatePruneTests TRIM Removed the prune SQL wording test and the Lite key-shape spelling test. Kept: the Lite twin carries the same two guards (parity), every per-database key prefix is accounted for (reflection), and both hosts prune on the Query Store cycle, KEEP (wiring): losing it leaves orphaned per-database state unpruned.
QueryStoreTouchGuardSingleSourceTests TRIM Removed the two source scans (no site spells its own width; the guarded-file roster) with their roster constants. Kept: every guard site in the shipped SQL carries the one width (map and dimension rows age out together), and the width derivation.
QueryStoreWriteFencePinTests TRIM Removed 3 code-ordering pins on CopyBatchOnceAsync, plus their helpers. Kept the two behavior tests of the fence (a failed write poisons the server until a clean write ends).
QueryStoreWriterSetPinTests DELETE A roster of the source files that write query_store_stats.
RdsEndpointVerifierTests.Login TRIM Removed "the runner shares one verifier" (call text). Kept: no service file names the test skip switch or builds a verifier that skips the endpoint check (a production path that skips verification), and the worker clears verdicts on a changed definition, KEEP (wiring).
ReadAdmissionCoverageCensusTests KEEP Every MCP/web read passes admission: a read that bypasses it is unbounded under load (the deadline/admission family). The skip roster and the filter order stay with it; the filter order is host-builder wiring.
ReadmeDerivedCountPinTests DELETE README prose figures (collector, table, hypertable counts). Also removed the csproj item that copied Darling/README.md beside the test binary; nothing else read it.
RefreshCeilingProvenancePinTests DELETE Doc-comment derivation prose checked against a constant (2,574 lines, 16 tests).
RepoFileAdoptionTests DELETE Test-harness convention: one RepoFile reader, and the LF-reading pins rostered.
RepoFileResolutionEquivalenceTests DELETE Test-harness equivalence of 34 retired path resolvers, and a pins-sit-beside-the-reader rule.
RollupCoverageRoutingTests KEEP Every routing caller passes coverage, and no reader builds an hourly or daily relation outside the builder: a read routed to a tier that lacks the window returns gaps.
RuntimePreconditionMissTests KEEP Guard class RuntimePreconditionReadWiringTests: capability is asked before precondition (KEEP (wiring): the order decides which status a read returns), every wired read names a real collector, and both products wire the same reads (parity).
ScratchDatabaseDisposalCensusTests KEEP See Undecided (test-harness: a leaked scratch database).
ScratchPostgresQuiesceTests TRIM Removed the workflow-YAML wording test. Kept the force-drop census and its control (see Undecided).
SerialLoopStoreSizeSourceTests KEEP pg_database_size on the serial loop scales with the store and overran its 5 s deadline on a large store; the census holds it to budgeted callers.
ServerLocalReadFrameDisciplineTests KEEP default_trace_events.event_time is the server's local clock; a read that does not de-skew it returns wrong times.
ServerTabColumnGroupsPinTests KEEP Web grid column groups: a listed group that marks no column, or a column group missing from the list, is a broken toggle on the page.
SlowClassCensusTests DELETE A Cost=Slow trait roster and the CI wiring text that acts on it.
StaThreadCensusTests KEEP See Undecided (test-harness: a test that owns its STA thread).
StatementAnalysisReadCutPinTests KEEP Statement text cut in SQL before analysis judges it lets text past the cut escape the judge.
StatementColumnCensusTests TRIM Removed "every entry carries its reason, row and lane" (roster bookkeeping). Kept the statement-filter column census: a new statement or plan column reaching the store without the filter (masking family).
StatementCutSourceScanTests TRIM Removed "the scan's doc comment names its blind spots". Kept the cut-before-judge scan and its controls (masking family).
StatementFilterPlanReaderSourceScanTests TRIM Removed the public plan-read roster and its live-test planting check. Kept: no MCP file reads a plan column except the stored-plan reader (an unfiltered plan read), and the reflection test that every public plan read answers through the filter.
StatementScrubViewerPlanWithheldTests KEEP (wiring) Every plan save site refuses the withheld marker first; losing it writes a withheld marker out as a .sqlplan file. The WPF save dialog has no behavior test.

Other edits the deletions required: a stale CommentFilterAdoptionTests roster entry for the deleted RefreshCeilingProvenancePinTests.cs (it failed the Guard run until removed; the class summary's count of doc-run collectors went from eight to seven with it), and five <see cref> references to deleted classes or methods turned into <c> text in PgExtensionDependencyContractTests, QueryStoreDatabaseWatermarkWiringPinTests, RefreshCeilingStalenessTests, RepoFile.cs, QueryStoreStatePruneTests and QueryStoreTouchGuardSingleSourceTests.

Shared helpers left in place: RepoFile, CSharpSourceWalker and WindowsPowerShellStartInfo are used by files outside this slice. No production code is left unused by these deletions.

Undecided (kept; the coordinator rules)

  • PlanForceActionDetailCensusTests: the defect is real (a raw detail read leaks), but the mechanism is an exact per-file count of literals naming both words, so a correct second reader also fails it.
  • PgServerConfigScopeRungTests.EveryProductReadOfTheConfigTable_... and QueryStoreIntervalLatestRungTests.RawQueryStoreRows_EnterTheStoreOnlyThroughTheWriterThatAppliesThem: real defects (a duplicate-name read; a write that bypasses the applier), but both carry an exact count or a named-exception roster.
  • The rung "probe maps" tests (TheProbeMapsAStoreStoppedHereToThisRung, two files): the Invoke assertions are behavior, but the same methods also assert reader.GetBoolean(<n>) text and that a comment block exists. A trim inside the method would leave the behavior half.
  • ScratchDatabaseDisposalCensusTests, ScratchPostgresQuiesceCensusTests, StaThreadCensusTests: test-harness rules (leaked scratch databases slow every run; an unquiesced force drop crashed a TimescaleDB worker on CI; an owned STA thread overlaps the shared one). None is a product defect, and none fails on its own when broken.

Not done

  • PlanViewerCapabilityPinTests.PlanViewerCapabilities_NoneDisappeared should be deleted (a probe-table baseline ratchet with a regen switch); I found it after the gate run and left it rather than push it ungated.
  • Non-Guard classes that share a file with a Guard class were not judged (CollectorRuntimePreconditionTests in RuntimePreconditionMissTests.cs, the live classes).
  • .github/scripts/darling-shard-weights.json still lists Darling.Tests.RepoFileResolutionEquivalenceTests (0.23). It is a table, and the brief said not to touch the shard scripts; darling-shard-pack.py should warn on a weight for a class that no longer exists rather than carry it.
  • Prose mentions (not crefs) of the deleted classes remain in comments of other test files, for example RepoFileAdoptionTests in eight files.

Test plan

  • dotnet build Darling/Darling.Tests -c Debug: 0 Warning(s), 0 Error(s). No Lite file changed.
  • Gate (pre-push.sh), first run, before the CommentFilterAdoptionTests roster fix:
    • [guard-darling] Darling.Tests Total: 4500, Errors: 0, Failed: 1 (the stale roster entry; dev: 4601)
    • [guard-lite] Lite.Tests Total: 1281, Errors: 0, Failed: 0 (dev: 1281)
    • classes: darling 258, lite 35; classes-darling 2807 passed + 1857 with the same one failure; classes-lite 622 passed.
  • Gate, second run, after that fix: [guard-darling] Total: 4500, Failed: 2 (CommentFilterAdoptionTests.TheCensusSummary_CountsTheMapItDescribes and TheCensusSummaryPin_ReportsDriftFromEitherSide: the class summary said "Eight collect a doc run", now seven); [guard-lite] Total: 1281, Failed: 0; classes-darling 2807 passed, 1857 with the same two; classes-lite 622 passed. GATE RED on those two only.
  • After changing the summary to "Seven": build 0 warnings; Darling.Tests.exe -class *CommentFilterAdoptionTests -class *DocCommentHygiene*: Total: 82, Failed: 0.
  • A third full gate run was not done (wall clock). The last two commits touch only CommentFilterAdoptionTests.cs, and the first commits were pushed before the second gate run finished. CI decides.
  • Guard before/after: Darling 4601 on dev, 4500 here (101 Guard cases removed); Lite 1281 on dev, 1281 here (no Lite file in this slice).

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

CommandDeadlineScannerAdoptionTests and CommentFilterAdoptionTests are rosters
of which test pins use which helper; CollectionLogWebRowPreservesFullTextPinTests
pins one call's argument text. None fails on a product defect.
Deletes the methods that assert a call's text, a signature, a SQL fragment,
a description's wording or a roster, and the private helpers only they used.
Censuses that fail on a real defect (a missing deadline, a leaked statement,
an alert past the master switch, a Lite/Darling drift) stay.
Three doc crefs in test files and two in DarlingCloudIdentityProbe named
deleted tests; CrossAppGuardCiGateTests exempted four Lite.Tests reads that
only the deleted CommentFilterAdoptionTests and NeitherFixHasALiteTwinToDriftFrom made.
… census and keep LockedModeRestoreCoverageTests on the LF roster (#5833 slice 2)
@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
McpToolsListBudgetTests.cs: the slice removed the tools/list byte ratchet, so dev's TotalCeilingBytes raise (#5819) goes with it; the served-shape checks stay.
CommentFilterAdoptionTests.cs: deleted by slice 1, trimmed by slice 2 (its DocCommentHygieneTests entry). The deletion stands.
CommentFilterAdoptionTests.cs: deleted by slice 1, trimmed by slice 3 (its RefreshCeilingProvenancePinTests entry and census summary). The deletion stands.

RepoFileAdoptionTests.cs: deleted by slice 3, trimmed by slice 2 (DocCommentHygieneTests entry, LF roster). The deletion stands.
…ys deleted (the roster is gone; dev's change to it was an entry)
@erikdarlingdata
erikdarlingdata merged commit c0b0848 into dev Oct 15, 2026
16 of 19 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/5833-triage-3 branch October 15, 2026 09:23
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