Skip to content

Tests: the four censuses #3762 woke and merged past - straggler site count, live-teardown ratchet, credential-builder count (#3752 follow-up) - #3768

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/3752-census-followup
Sep 19, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
fix/3752-census-followup

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

What this is

#3762 (the --enable-collector / --disable-collector verbs, #3752) merged to dev at 17:48Z, three minutes after it opened and before its first CI run finished. That run compiled clean and then woke exactly four censuses — structural pins that count sites and ask a person to confirm a new one belongs — and answered none of them, because the merge landed first. dev's build and Darling PostgreSQL tests jobs are red on those four until this lands. No product behavior changes here; one command site is rewritten in a shape the census can certify, at the same deadline.

The four, and each answer

  1. StragglerCommandTimeoutTests.EveryStragglerCommand_SetsAnExplicitDeadline(regime: 2) and EveryStragglerSite_AlsoPassesTheSharedDeadlineScanner(regime: 2) — expected 3 command sites in DarlingCliCommands.cs, found 4. The fourth is the verb's schedule read-back (ReadCollectorScheduleRowsAsync), and it already carried ServiceCommandDeadlines.CliStoreReadSeconds — the relational check listed no offender, only the count moved. The census's own doc says what a count move means: "a fourth site added to any of these files fails on the count and asks a person whether it shares the budget." It does — a CLI store read on the CLI store-read deadline — so the row becomes ("DarlingCliCommands.cs", Hop.Store, 4, …) and the prose's "thirteen sites" becomes fourteen. This is the one file outside [BUG] No headless way to enable a collector: long_query_completions ships opt-in but only the WPF Viewer can opt in #3752's named fence, and it is the edit that file exists to receive.

    The site itself is rewritten from postgres.CreateCommand(sql); command.CommandTimeout = …; to the shape every other site in the file uses — new NpgsqlCommand(sql, connection) { CommandTimeout = ServiceCommandDeadlines.CliStoreReadSeconds } on an explicitly opened connection — because once the census expects four, NoDeadlineInScope_IsBorrowedFromANeighbouringConstruction re-runs the scan with a ONE-statement window and would not have seen a deadline assigned on the following statement. Same constant, same value; a comment at the site says why the shape matters.

  2. LiveCleanupConversionRatchetTests.NoLiveTestCleansUpOnItsOwnBodysConnection — "29 live-test teardown(s) do not go through LiveStoreCleanup". The ratchet scans every FILE that applies [Collection("live-postgres")], and CLI: --enable-collector / --disable-collector - the one opt-in collector had no headless opt-in; two verbs that run the executor's own plan (#3752) #3762 put its one live class inside DarlingCliCommandsTests.cs, whose twenty-nine pre-existing finally blocks (temp-folder teardown for the network-wizard and viewer-export pins) had never been in scope and were now all reported. The collection's hygiene test prescribes the fix in its own failure text — "If the class is mostly pure with one live test, prefer SPLITTING the live test into its own ...LivePostgresTests class" — so the live class moves to DarlingCollectorToggleVerbLivePostgresTests.cs, and its teardown becomes LiveStoreCleanup.RunAsync(connectionString, bodySucceeded, CleanupAsync) with bodySucceeded = true as the last statement of the try: the The other ~124 live-test finally blocks still clean up on the body's connection, so a failing test can still report its teardown's error #1902 shape, on its own connection, so a body failure that closed the test's connection cannot become a throw-from-finally that replaces the real exception. The three usings only the live class needed leave the pure file with it. Test content is otherwise unchanged (fleet enable in the wrong case → one canonical row; per-server enable by display name preserves frequency_minutes = 5; fleet disable leaves the per-server row; unknown --server refused with nothing written).

  3. DarlingMissingCredentialMessageTests.NoVerbStillCarriesItsOwnFirstRunAdvice — expected 5 callers of DarlingStoreBootstrapEvidence.MissingStoreCredentialMessage(, found 6. Its comment: "the count grows with each new store verb, and growing it is the point — a verb that grew its OWN copy of the advice instead would fail the two DoesNotContain assertions above." The verb went through the shared builder, so 5 → 6, with the comment naming which verb became the sixth.

What it does NOT do

Verified

Cherry-picked onto dev at c1816f606 (three merges after #3762) and re-run on this Mac through a Darling.Tests-named net10.0 harness inside the worktree: StragglerCommandTimeoutTests, LiveCleanupConversionRatchetTests, DarlingMissingCredentialMessageTests all green, alongside DarlingCollectorToggleVerbTests (32/32), DarlingStartupArgsTests, DarlingCliCommandsTests, DocCommentHygieneTests, LivePostgresCollectionHygieneTests, StoreSqlClockDisciplineTests, FleetIdentifierScrubTests — 267 green, the live class skipping here (no local store). Service builds -c Release -p:EnableWindowsTargeting=true with 0 warnings.

Follow-up to #3762; #3752 is already closed by that merge.

- StragglerCommandTimeoutTests: DarlingCliCommands.cs now holds FOUR CLI store-command sites, not
  three - the schedule read-back is the fourth and shares the CliStoreReadSeconds budget. The census
  exists to make a person say so; said (3 -> 4, prose thirteen -> fourteen). The read-back site is
  rewritten in the initializer-on-construction shape every other site in the file uses, so the
  one-statement-window variant certifies it too.
- LiveCleanupConversionRatchetTests: the live end-to-end moves to its own file
  (DarlingCollectorToggleVerbLivePostgresTests.cs) - applying [Collection("live-postgres")] inside
  DarlingCliCommandsTests.cs pulled that whole file's 29 file-teardown finally blocks into the #1902
  ratchet. Its teardown now runs through LiveStoreCleanup.RunAsync on its own connection with
  bodySucceeded set last in the try, the shape the ratchet accepts.
- DarlingMissingCredentialMessageTests: the shared MissingStoreCredentialMessage builder has a sixth
  caller (5 -> 6), which is the growth that pin is designed to record.
@erikdarlingdata
erikdarlingdata merged commit 4c8a474 into dev Sep 19, 2026
4 of 7 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/3752-census-followup branch September 19, 2026 18:13
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