Repository navigation
Extend #2490's synthetic-slug convention to the spots it did not reach - #2900
Conversation
#2490 pinned fixture HOSTNAMES to invented placeholder slugs, and FleetIdentifierScrubTests matches only the full hostname shape, so two other kinds of reference to the same fleet stayed unpinned: - a display_name sitting beside an already-synthetic hostname on the same DarlingPeerDisclosureTests fixture row, plus the Assert.Equal that pins it - comments naming a server by its bare short name rather than a full hostname, across PerformanceMonitor.Collectors, the Darling service and Darling.Tests Thirteen locations, 14 occurrences, all now `omega` -- a slug that named no other server in any of the affected files, so no two servers collapse into one identity. Every measurement in the edited comments is unchanged: the 83 digit runs across those 13 lines hash identically before and after, and the lines differ only in the name token. Also adds pgmonitor to the allowlist. It is a role word like monitor, which is already on the list, so a legitimate reference to that host would otherwise trip the guard. Nothing depends on it today. No schema change, no behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reviewed the full diff (9 files, CHANGELOG + Darling.Tests + Darling service + shared Collectors comments). This is a documentation/fixture-only privacy scrub with no executable logic touched — no T-SQL, no runtime code paths, no schema/migration changes. Verification of the rename itself:
One non-blocking observation: No correctness, performance, or security issues found in the change as submitted. |
|
Reviewed. This is a clean, mechanical rename confined to comments, doc-comments, one test fixture/assertion pair, and CHANGELOG.md — no T-SQL, no production logic, and nothing here needed a Lite-side counterpart (Lite has no matching fixtures using the old name). Checked:
No correctness, Lite/Darling parity, security, or performance concerns found. |
…ird-party name from two comments erikdarlingdata#2490's guard matches only the full hostname SHAPE, so three references that are not hostname-shaped survived erikdarlingdata#2900's pass. CHANGELOG.md's erikdarlingdata#2699 server list carried two bare short names whose slugs are not on the allowlist. Both now read allowlisted slugs that named no other server anywhere in the tree, so neither swap merges two distinct identities: epsilon-01 (epsilon occurred exactly once before this change, in the allowlist declaration itself) and dummy-01 (dummy occurred only as the adjective - "dummy SQL", "dummy 0-columns", "dummy test data"). DarlingWorker's plan_correction note and DetachedCollectorGate's erikdarlingdata#2701 paragraph used a third-party product name as a workload descriptor. Both now read "workload-class", which keeps each signature named by its own mechanism (distinct-plan-population, decimal-parameter-instability) rather than by a vendor. Every measurement in both comments is unchanged. apex is untouched everywhere else: it is this codebase's term for a blocking chain's head blocker (~150 uses), and the fleet's "apex box"/"apex replica" superlative. Only the apex-01 in that one server list was an identifier. No schema change, no migration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…at cannot be swept erikdarlingdata#2490's FleetIdentifierScrubTests matches only the full hostname shape -- a service prefix, two middle segments, a slug, an ordinal -- so the two kinds of reference erikdarlingdata#2900 and erikdarlingdata#2903 had to fix BY HAND were never detectable. The residual risk the review on erikdarlingdata#2900 named was a future change reintroducing one against a green CI. One of the two is now a sweep of its own: a short name carrying its ordinal, without a hostname prefix in front of it. The ZERO PADDING is what makes that shape checkable -- prose writes a measurement as top-25, sev-10 or phase-2 and never pads one, while a fleet pads every ordinal. Requiring a padded ordinal rather than any number collapses the false-positive vocabulary on this tree from 114 words (985 occurrences) to 11 (103), and requiring a purely alphabetic word drops the escape-sequence and version debris with it. Those 11 are all role words, and they sit on their OWN allowlist rather than joining SyntheticSlugs, so widening the looser sweep cannot quietly widen the stricter one. Measured, not assumed: 0 offenders across 2389 scanned files. Replanting either identifier erikdarlingdata#2903 scrubbed by hand turns the new sweep red, and the apex short name trips it the moment it carries an ordinal while all ~150 bare apex uses stay green -- the ordinal is the discriminator, not the word. The other two kinds of reference are written down as OUT of reach rather than left as an open question. A bare short name in prose has no shape to match: matching capitalised prose tokens instead returns 606 hits across 102 words, every one an acronym or this codebase's own emphasis caps. An identity-bearing fixture field has none either: the tree assigns 251 distinct free-form descriptive values to ServerName/display_name, which is good test naming and worth keeping. Hashing a denylist of the real names rescues neither -- a three-letter name has 17,576 candidates, so a hash committed to a public repo publishes the name it hides, and moving the salt into a CI secret would make the guard silently no-op on every fork, which is the green-for-the-wrong-reason failure the scanned-count assert exists to catch. Those two stay a review matter; the sweeps are a tripwire, not a proof. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Extends #2490.
#2490 pinned fixture hostnames to invented placeholder slugs.
FleetIdentifierScrubTestsmatches only the full hostname shape —(prod|stage|staging|dev|qa|uat)-[a-z]+-[a-z0-9]+-(slug)-[0-9]+— so two other kinds of reference to the same fleet were never in its reach:DarlingPeerDisclosureTests'list_serversfixture row carried an already-synthetic hostname (prod-sql-use1-beta-01) with the real short name still sitting in itsdisplay_name, and anAssert.Equalpinning that same value. Both halves changed together.What changed
The bare short name becomes
omega, an allowlisted slug. 13 tracked locations, 14 occurrences:CHANGELOG.mdDarling/Darling.Tests/DarlingPeerDisclosureTests.csdisplay_name), 413 (the assertion)Darling/Darling.Tests/QueryStorePlanFetchTests.csDarling/Darling.Tests/QueryStorePlanSizeLearnTests.csDarling/Darling.Tests/StatementSplitTimingTests.csDarling/PerformanceMonitor.Darling.Service/DarlingWorker.csPerformanceMonitor.Collectors/CollectorContext.csPerformanceMonitor.Collectors/QueryStoreCollector.csPerformanceMonitor.Collectors/QueryStorePlanXmlState.csomegawas chosen because it named no other server anywhere in the tree — it appeared only insideSyntheticSlugsitself.beta,multi,alpha,gammaandmonitorall already denote other servers, andDarlingWorker.cs:4908namesmulti-03on the very line being edited, so reusing any of those would have merged two distinct servers into one identity and changed what a measurement refers to. Case and hostname shape are preserved: the old bare name →OMEGA, and its ordinal short form →omega-01.Every measurement is unchanged. Across the 13 edited lines there are 83 digit runs; the extracted sequence hashes identically before and after (
c2dbceb807baed9355544b7ec1d81f3d), and with the name token normalised out the 13 lines are byte-identical. Nothing else in any comment moved.Also adds
pgmonitortoSyntheticSlugs. It is a role word exactly likemonitor, which is already on the list, so a legitimate reference to that host would otherwise trip the guard. Nothing depends on it today — pure hardening.No schema-version change, no migration, no behaviour change.
Verification
Darling.Teststargetsnet10.0-windowsand cannot execute on macOS, so the two affected classes were compiled from their real source files into throwawaynet10.0harnesses and invoked directly:FleetIdentifierScrubTests.NoTrackedSourceFileNamesARealFleetTenant— passes on pristineorigin/dev(so it was green before this change, as expected: every hostname-shaped slug in the tree was alreadymonitor/beta/multi/alpha/gamma), and passes on this branch. Negative control: plantingprod-sql-use1-acmecorp-01in a tracked file makes it fail with(slug 'acmecorp'), so the pass is not vacuous.DarlingPeerDisclosureTests— all 25 cases (22[Fact]+ 3[InlineData]) pass against the real service assembly. Negative control: desyncing the fixture value from the assertion fails exactlyListServers_CarriesThePeerFleetsSummary, confirming the fixture/assertion pair is load-bearing and that both halves were changed consistently.dotnet build Darling/Darling.Tests -p:EnableWindowsTargeting=true— 0 errors.CI remains the arbiter for the full Windows suites, which were not run locally.
Out of scope, noted for the record
Screenshots/Screenshot MCP server analysis.jpgshows up as a binary match. Opened and inspected: the byte sequence is a case-mangled fragment of the old name at offset 885253, inside the JPEG's entropy-coded scan data. The rendered image is aSQL2022 Health Checkreport naming onlyLoadTestDB,dbo.BlockingTestanddbo.DeadlockTest— no fleet or customer name is legible. Left untouched.CHANGELOG.md:27names two other servers' ordinal short forms, andCHANGELOG.md:623/DefaultTraceEventsCollector.cs:32/QueryStatsCollector.cs:182/RobustBaselineTests.csrefer to "the reporting fleet's apex box". Neither is hostname-shaped, so the guard does not reach them either.apexis also the codebase's own domain term for a head blocker in ~40 files, so it needs a judgement call rather than a sweep. Not changed here.DarlingWorker.cs:4907describes an "application-class distinct-plan-population signature" one line above an edited line. Pre-existing, and a different decision — flagged, not touched.🤖 Generated with Claude Code