Repository navigation
Alert texts: the word agrees with the count (#6703) - #6704
Conversation
Replace the count-then-word(s) forms in alert bodies, self-alert texts, MCP alert answers and the shared engine texts with the singular for 1 and the plural otherwise, with the verb agreeing.
| unbounded one can bloat the stored context past what Slack/Teams will accept. */ | ||
| string.IsNullOrWhiteSpace(row.VictimStatement) | ||
| ? $"victim pid {row.VictimPid}, {row.ParticipantCount} participant(s)" | ||
| ? $"victim pid {row.VictimPid}, {row.ParticipantCount} {(row.ParticipantCount == 1 ? "participant" : "participants")}" |
There was a problem hiding this comment.
This text has a reader, and the reader still spells it participant(s).
PgDeadlockRemask.cs:786-787 holds a compiled copy of exactly this string, documented as "The live alert's text for a report with no victim statement (DarlingWorker.BuildPgDeadlockIncident), which carries no SQL":
private static readonly Regex s_noStatementObject = new(
@"^victim pid -?[0-9]+, -?[0-9]+ participant\(s\)$", RegexOptions.Compiled | RegexOptions.CultureInvariant);With this hunk the builder emits victim pid 555, 3 participants / victim pid 555, 1 participant, which that regex no longer matches. Two call sites change behaviour for every incident the new builder writes:
WithheldObjects(PgDeadlockRemask.cs:817-820) — the regex is the whitelist that keeps a no-SQL line as it is. An incident whosepg_deadlocksreport isMissing(retention dropped it, its server's rows are gone, or the hash never resolved) now falls to theelseand the pid/participant line is overwritten withPgLogTextRedactor.WithheldStatement. The pass destroys a line that was never sensitive — the whole reason the arm exists — and the alert-history row loses the victim pid and cycle size.StillCarriesLiterals(PgDeadlockRemask.cs:809-811) —!s_noStatementObject.IsMatch(o) && NormalizeStatement(o) != o.NormalizeStatement→PgLogTextRedactor.MaskQuerymasks every literal, sovictim pid 555, 3 participantsnormalizes to something different from itself and the object is judged to still carry literals. That flipsneverRemaskedat:971-972, which decides whether unresolved keys are keyed (keyWith,:980) — a row with no literals at all now steers that decision.
Nothing fails today: PgDeadlockRepairTests.cs:110,120,331,343 and PgDeadlockRemaskTests.cs:291,302,441 all hand the pass the hand-written "victim pid 3101, 2 participant(s)" literal, which still matches, so no test ever drives the pass with what the builder now produces.
This is the #3684 trap exactly — "Two copies of one definition pinned EQUAL to each other fail only after BOTH have drifted. Alias, do not copy." The fix wants the regex to accept both spellings (old rows keep (s) for 90 days, so it cannot simply be re-spelled), and a behaviour test that feeds the pass an incident built by BuildPgDeadlockIncident itself rather than a literal:
@"^victim pid -?[0-9]+, -?[0-9]+ participants?(?:\(s\))?$"The sibling at :9770 (root pid P blocking N sessions) has no such reader — I grepped; s_noStatementObject is the only regex in the tree over these strings.
|
Non-blocking notes from the blind read, none of which change the verdict on their own (the blocking one is the inline comment on Three doc comments still quote the old wording. The PR updated the examples in
Two sentences the PR edited still disagree elsewhere in the same sentence.
On the shape of the fix. ~40 inline Scope, read against the body's "(s) sites left" list. The exclusions hold up — I checked each against the tree and found no alert-body site the list misses. Worth noting that |
There was a problem hiding this comment.
Verdict: CHANGES REQUESTED
Claims
- VERIFIED — every site in the "Sites changed" roster is changed as described — walked each against the hunks:
AlertEngine.cs1503/1852/1857/2017/2850/3511/3622/3628,AlertContextBuilders.cs95/920/1215/1396,PerEventNotification.cs:88,IncidentDeliveryFilter.cs:207,RepeatDeliveryBudget.cs:588,DarlingWorker.cs8866/9045/9258/9677/9770, and theDarlingSelfAlertEvaluator.cslist. - VERIFIED — "
AlertValueParsertakes the first number in the text, so no stored value changes" —AlertValueParser.cs:61-131scans to the first digit and ignores everything around it;ResolveStoredValue(:145) is the only seam both stores use, so1 hour(s)and1 hourboth resolve to 1. - VERIFIED — "
FactAdvice.PluralisinternaltoPerformanceMonitor.Analysisand cannot be reached from these projects" —FactAdvice.cs:1015isinternal static;PerformanceMonitor.Analysis.csproj:22-36names Lite, Dashboard, Darling.Analysis, Darling.Viewer and the two test projects, not.Alertingor.Notifications. - VERIFIED — "No census, pin or source-text test added" — every new test asserts a string a built alert produced (
DarlingSelfAlertTests.ComposeHoursStuck_OneHourWithOneFailure_ReadsInTheSingular,RepeatDeliveryBudgetTests.ARosterLine_ForAnIncidentSeenOnce_ReadsInTheSingular); none reads source text or a roster. - VERIFIED — the MCP alert answers changed in both SKUs with the same wording —
Lite/Mcp/McpAlertTools.cs:99,798againstDarling/.../Mcp/DarlingMcpAlertTools.cs:149,1130, identical replacements. - VERIFIED — "
CollectionHistoryAudit.Render'source(s)' … not touched, per the brief (#6702)" — absent fromgh pr diff; the only neighbour changed is the alert text atDarlingSelfAlertEvaluator.cs:3188,3191. - VERIFIED — "
DarlingSelfAlertEvaluator.cs7743 'N of those checkpoints were REQUESTED' … left" — visible as unchanged context inside the editedFireAsynccall. - VERIFIED — "One singular and one plural case per changed file" — holds at file granularity:
AlertEngineTests.AnomalousJob_TwoJobsReadInThePluralbeside the 1-job case,Lite.Tests/AlertContextBuildersTests1-vs-2 maintenance sessions,IncidentDeliveryFilterTests.TwoHeldBackIncidents_AreFootnotedInThePluralbesideFooter. Not per site — see Riskiest lines 3. - UNVERIFIED — the local run figures (Darling.Tests 1707 total / 1 failed then green; Lite.Tests 357 / 0) — a read-only tree cannot build or run xUnit; needs the filtered
dotnet testthe body describes. - UNVERIFIED — "Darling live
McpPageContractTests(rig) and the full suite: CI decides" — left unchecked by the author; needs a live PostgreSQL store, andDarling.Tests/McpPageContractTests.cs:1607is re-worded but unexercised here. - REFUTED — "Text already stored keeps '(s)'; no stored row is rewritten." —
PgDeadlockRemaskrewrites stored alert contexts on every hourly store-maintenance tick, and itss_noStatementObjectregex (PgDeadlockRemask.cs:786-787) still spellsparticipant\(s\). Rows already stored do keep their text and still match; rows the new builder writes do not, soWithheldObjects(:817-820) overwrites the pid/participant line withPgLogTextRedactor.WithheldStatement, andStillCarriesLiterals(:809-811) reports a literal-free object as still carrying literals. The reassurance holds for the past and fails for the future.
Riskiest lines
Darling/PerformanceMonitor.Darling.Service/DarlingWorker.cs:9677— the only changed string in the diff with a machine reader, and that reader is a hand-copied regex nobody updated; the cost is a destroyed history line plus a flippedneverRemaskeddecision atPgDeadlockRemask.cs:971-980. UNCOVERED —PgDeadlockRepairTests.cs:110,120,331,343andPgDeadlockRemaskTests.cs:291,302,441feed the pass the hand-written"victim pid 3101, 2 participant(s)"literal, which still matches, so nothing drives the remask with what the builder now emits.PerformanceMonitor.Alerting/AlertContextBuilders.cs:920—ranked.Count - RunnableQueueRequestDisplayCapis now written twice on one line (number, then noun), the shape where an edit to one copy misses the other. Covered byDarling.Tests/RunnableQueueRound1Tests.TheBuilder_SaysAtLeast_OnlyWhenTheReadHitItsCap, which asserts the 1-, 2- and at-least-2 forms offBuildRunnableQueueRequestItemsdirectly.Darling/PerformanceMonitor.Darling.Service/DarlingSelfAlertEvaluator.cs:3188(and:3191) — the history-auditValueText, the one change the body flags as going past "(s)", so it rewrites a string that previously readN hoursfor every N including 1. UNCOVERED — no test exercisesHistoryAuditAlertTextathours == 1, and the body's per-file test roster does not list this site.
Traps near this diff
- "Two copies of one definition pinned EQUAL to each other fail only after BOTH have drifted (#3684). Alias, do not copy." — applies —
DarlingWorker.cs:9677is the definition,PgDeadlockRemask.cs:787the copy whose own doc comment namesBuildPgDeadlockIncidentas its source, and this PR is the drift. - "Lite and Darling ship in parity (CONTRIBUTING's two-store rule): a fix to one SKU's reader, tool, alert or description without the counterpart's is a finding, not a nit — the census in
McpPageContractTestscompares the two SKUs' payload keys by tool name for exactly this (#3594)." — does not apply — the engine and builder texts live in sharedPerformanceMonitor.Alerting/.Notifications, and the two SKU-local MCP answers moved together (Lite/Mcp/McpAlertTools.cs:99,798/DarlingMcpAlertTools.cs:149,1130), withLite.Tests/McpPageContractTests.cs:431andDarling.Tests/McpPageContractTests.cs:1607both re-pinned. - "Ruling (#5833): tests are load-bearing. … never answer a trap with a test that reads source text or asserts how code is spelled." — does not apply — the new tests drive a producer and assert its output, e.g.
Lite.Tests/McpPageContractTests.cs:1102seeds a dismissed alert and reads the tool's message. - "Slack: the payload is ONE attachment, Slack caps it at 50 blocks, and the Details path spends about two blocks per detail (divider + section) … Budget blocks, not characters, and state the omission." — does not apply — no detail item is added or removed;
IncidentDeliveryFilter.cs:204-207edits text inside one existing field andPerEventNotification.cs:88the message of an already-produced overflowMessage. - "A text cut at a UTF-16 index can land between the halves of a surrogate pair;
System.Text.Jsonthen substitutes U+FFFD … Cut onStringInfotext elements." — does not apply — no truncation logic is touched;DarlingWorker.cs:9678still hands the statement to the untouchedAlertContextBuilders.TruncateText, and the changed branch carries no SQL at all. - "
hours_back,limit,top,days_backare refused when out of range, never clamped (#3699)." — does not apply — the MCP edits sit inside already-built empty-status messages; no parameter is read or re-validated.
Divergence (blind read vs PR body)
The body is unusually complete: it rosters every site, names the sites it deliberately left, and marks its own unrun rig. The divergence is a reader it does not account for. "What changes" reasons about consumers of the changed strings exactly once — for AlertValueParser — concludes "no stored value changes", and generalizes that into "Text already stored keeps '(s)'; no stored row is rewritten". There is a second consumer: PgDeadlockRemask holds a compiled regex copy of the text at DarlingWorker.cs:9677 and uses it as the whitelist protecting a no-SQL line from being withheld, and as half the test for whether an object still carries literals. Neither the roster nor the "(s) alert-adjacent sites left, and why" list mentions PgDeadlockRemask.cs:787 — the one remaining (s) in the non-deprecated tree written as a regex rather than as display text, and the one place where leaving it is not cosmetic. The body's test section explains why it stayed invisible: the new cases went "in the existing classes", and the existing deadlock-repair classes pin the string as a hand-written literal instead of taking it from the builder, so re-pinning them was never forced and the drift never surfaced.
Reviewer checklist
- Run the Darling live
McpPageContractTestsrig (GetAlertHistorywith 5 dismissed and with 1 dismissed) — marked unrun, andDarling.Tests/McpPageContractTests.cs:1607needs a real PostgreSQL store. - On a store that has run
PgDeadlockRemask, let one hourly maintenance tick walkconfig_alert_logafter this build fired a PostgreSQL deadlock alert with no victim statement, then read that row'scontext_json: confirm whetherInvolvedObjects[0]still readsvictim pid N, M participantsor has become the withheld-statement placeholder. - Build both SKUs — the ternaries sit inside interpolated holes and
string.Create(CultureInfo.InvariantCulture, …)calls (DarlingSelfAlertEvaluator.cs:714,727,736,745,754), where a mis-parenthesized conditional is a compile error a read-only review cannot rule out. - Send one real e-mail and one real Slack post for a count-of-one alert (blocking, deadlock, compose hours) and read the rendered body — the singular forms now vary the sentence's verb, which no test renders end to end.
…g, and the round-1 sibling sites agree with their counts (#6703)
|
Follow-up pass on This commit answers all three blocking items from the prior review:
Bonus (not required, but closes a gap the last review flagged as "worth noting"): No new defects found in this commit. The rest of the files in the |
There was a problem hiding this comment.
Verdict: LGTM
Claims
- VERIFIED — "the deadlock text's reader accepts the new spelling" —
PgDeadlockRemask.cs:787-789'ss_noStatementObjectregex now matchesparticipant,participantsand the legacyparticipant(s);PgDeadlockRemaskTests.TheBuildersNoStatementLine_IsKeptAsWritten_AndNotJudgedToCarryLiterals(new) feeds it both spellings throughRemaskAlertat both stages and asserts the no-SQL line survives unchanged. - VERIFIED — "the round-1 sibling sites agree with their counts" —
DarlingSelfAlertEvaluator.cs:1830(XE session/sessions missing) and:5219(no longer compiles/compile,never fires/fire) now vary every clause with the count, each with new 1-vs-2/3 cases inDarlingSelfAlertTests.cs;DarlingMcpStoreMetricsTools.cs:862,866(checkpoint(s)) likewise, covered by new cases inStoreToastAndCheckpointerTests.cs. - VERIFIED — the three doc-comment sites the prior review named as still quoting old wording (
IAlertDeliverer.cs:24,CurrentBlockingWaitResult.cs:52,PerEventNotification.cs:52) are all updated to the new spelling in this commit's diff.
Riskiest lines
Darling/PerformanceMonitor.Darling.Service/PgDeadlockRemask.cs:789— the regex is the sole machine reader ofDarlingWorker.BuildPgDeadlockIncident's hand-written output; a mismatch here silently turns a no-SQL line into "still carries literals" and overwrites it with the withheld-statement placeholder on the next hourly maintenance tick. Covered byPgDeadlockRemaskTests.TheBuildersNoStatementLine_IsKeptAsWritten_AndNotJudgedToCarryLiterals, which drivesRemaskAlertwith the builder's own singular and plural output and asserts the line is untouched.Darling/PerformanceMonitor.Darling.Service/DarlingSelfAlertEvaluator.cs:1830— theshortMessagefor the two-missing-session capture-down alert; a regression here reintroduces the exact "sessions are missing, session missing" self-disagreement the prior review flagged. Covered byDarlingSelfAlertTests's new two-session case assertingEndsWith("capture is not running — XE sessions missing", ...).Darling/PerformanceMonitor.Darling.Service/DarlingSelfAlertEvaluator.cs:5219—RenderCustomRuleHealth's three independently-pluralized clauses in one interpolated string. Covered by the two newDarlingSelfAlertTestscases (broken:1,neverFiring:1andbroken:0,neverFiring:2) that assert the full literal string, not just a prefix.
Traps near this diff
- "Two copies of one definition pinned EQUAL to each other fail only after BOTH have drifted (#3684). Alias, do not copy." — applies, and this commit is the fix rather than a new instance —
PgDeadlockRemask.cs:787-789is the copy ofDarlingWorker.cs:9677's builder output the prior review flagged as drifted; this commit brings the copy back in sync (still a copy, not an alias, but the drift that trap warns about is what's being repaired here, not introduced). - "Lite and Darling ship in parity … a fix to one SKU's reader, tool, alert or description without the counterpart's is a finding." — does not apply — every site this commit touches (XE session alerts, custom-rule health, PostgreSQL deadlock remasking, the Postgres checkpointer) is Darling/PostgreSQL-only;
grepfor the changed sentences and forCheckpointerNote/custom-rule-health wording inLite/andLite.Tests/finds nothing, confirming there is no Lite counterpart to miss. - "Ruling (#5833): tests are load-bearing. … never answer a trap with a test that reads source text or asserts how code is spelled." — does not apply — every new test in this commit drives a producer (
RemaskAlert,ApplyCaptureDownAsync,ApplyCustomRuleHealthAsync,CheckpointerNote) and asserts its output string, not source text.
Divergence (blind read vs PR body)
None — the commit message's two claims ("the deadlock text's reader accepts the new spelling" and "the round-1 sibling sites agree with their counts") match the diff exactly: the regex fix and the two self-disagreeing sentences are the only functional changes, each with a direct new test.
Reviewer checklist
- Build both SKUs — the new/edited ternaries sit inside interpolated string holes (
DarlingSelfAlertEvaluator.cs:1830,5219,DarlingMcpStoreMetricsTools.cs:862,866), where a mis-parenthesized conditional is a compile error a read-only review cannot rule out. - On a store that has run
PgDeadlockRemaskagainst a PostgreSQL deadlock alert with no victim statement fired after this build, let one hourly maintenance tick walkconfig_alert_logand read that row'scontext_json: confirmInvolvedObjects[0]still readsvictim pid N, M participant(s)rather than becoming the withheld-statement placeholder.
Claude posting for Erik Darling. Round 2 (5637620024) verified every round-1 item on dc43c03.
Claude posting for Erik Darling.
Fixes #6703.
Why
Alert and self-alert texts printed a count followed by "(s)", so a count of one read "1 checkpoint(s)" or "1 mute rule(s) have been". These strings reach e-mail, Slack and the other routes, the alert history and the MCP alert tools.
What changes
Each site below keeps the count in hand next to the text and picks the word inline (
n == 1 ? "x" : "xs"), with the verb agreeing where there is one. No new shared helper (FactAdvice.PluralisinternaltoPerformanceMonitor.Analysisand cannot be reached from these projects). Text already stored keeps "(s)"; no stored row is rewritten.AlertValueParsertakes the first number in the text, so no stored value changes.Sites changed (file, line on this branch, old -> new):
PerformanceMonitor.Alerting/AlertEngine.cs(shared by Lite and Darling)N blocking session(s)->1 blocking session/N blocking sessions... across N blocked session(s)->session/sessions(1846 comment example updated)... across N session(s) (threshold ...)->session/sessionsN deadlock(s) in the last hour->deadlock/deadlocksN query(s), longest Nm->1 query/N queriesN job(s) exceeding ...->job/jobsN job failure(s)->failure/failuresPerformanceMonitor.Alerting/AlertContextBuilders.cs+N more distinct blocking incident(s)->incident/incidentsN more request(s) in the newest query snapshot->request/requests(875 doc comment)N more maintenance session(s) not shown->session/sessions... across N blocked session(s)->session/sessionsPerformanceMonitor.Notifications+N more incident(s) this cycle->incident/incidentsN other incident(s) still open->incident/incidentsN occurrence(s)(roster line) ->occurrence/occurrences(570 doc comment)Darling/PerformanceMonitor.Darling.Service/DarlingWorker.cs(PostgreSQL parity of the engine texts)victim pid P, N participant(s)->participant/participantsroot pid P blocking N session(s)->session/sessionsDarling/PerformanceMonitor.Darling.Service/DarlingSelfAlertEvaluator.csThe X Extended Events session(s) are missing->session is missing/sessions are missingN hours(history audit current value) ->1 hour/N hours; 3191N thin hour(s)->hour/hoursN custom alert rule(s) need attention->1 custom alert rule needs attention/N ... rules need attentionN mute rule(s) have been suppressing->1 mute rule has been/N mute rules have beenN owned setting(s)->setting/settingsN managed-store setting condition(s) need attention->condition needs/conditions needN chunk(s)->chunk/chunksN hour(s)->hour/hours, and the detail's "and are now retried" ->is/areN failure(s)->failure/failuresN (requested) checkpoint(s)->checkpoint/checkpointsN new failure(s), 8212N more failed run(s), 8224N more time(s)-> singular / pluralMCP alert answers (Darling
Mcp/DarlingMcpAlertTools.cs149, 1130; LiteMcp/McpAlertTools.cs99, 798, same wording)N dismissed alert(s) were excluded->1 dismissed alert was excluded/N dismissed alerts were excludedN rule(s) exist but every one of them is disabled->1 rule exists but it is disabled/N rules exist but every one of them is disabledNot touched, per the brief:
CollectionHistoryAudit.Render"source(s)" and the "external alert(s) were not delivered" and "+ N more source(s)." lines (#6702)."(s)" alert-adjacent sites left, and why
PoisonWaitEvaluator.cs148/160 andPostgresAlertEvaluator.cs605/609 (task(s),backend(s)): the number is an AVERAGE printed with one decimal ("1.5 tasks"), not a count; the plural is right for every non-1 value.AlertReadFailureCounter.cs730-733 (read(s),pass(es)): text of the collection-health finding in the MCP data tools, not an alert body.FleetSweepEngine.cs464,DarlingWorker.cs489 (partition maintenance exception), 14938: sweep and status notes, not alert bodies.Lite/Controls/AlertsHistoryTab.xaml.csandDarling.Viewer/AlertsHistoryTab.xaml.cs("alert(s)" count indicator, dismiss prompts, status line): Viewer/Lite UI text, not an alert body or history row.JobHistoryCap.CountTexttakes the noun from the caller and has its own pinned tests.DarlingMcpBlockingTools.cs821 /McpBlockingTools.cs465 (report(s)): MCP blocking answers, not alert tools.ExternalAlertDrain.cs144/243,DuckDbAlertHistoryStore.cs116,PgAlertHistoryStore.cs123,EmailSendCore.cs,WebhookAlertService.cs) and CLI output: out of scope per the issue.DarlingSelfAlertEvaluator.cs7743 "N of those checkpoints were REQUESTED" and the plain "N days"/"N minutes" plurals: no "(s)" form; left.Tests
Existing tests that pinned the old wording now pin the new (AlertEngineTests, LiteAlertForwardingTests, DarlingPgOperationalAlertTests, DarlingSelfAlertTests, PolicyJobFailingRetryTests, StoreToastAndCheckpointerTests, RunnableQueue*, IncidentDeliveryFilterTests, RepeatDeliveryBudgetTests, both McpPageContractTests, AlertContextBuildersTests, BlockingDeadlockContextBuilderTests, AlertValueParserTests). One singular and one plural case per changed file, in the existing classes (new methods only):
+1and+2more incident(s) (LiteAlertForwardingTests).McpPageContractTestslive case, 5 dismissed) was only re-worded; it needs a rig, which I did not run.Run on this branch (Debug, no
pre-push.sh, no full suite, per the brief):*AlertEngine*,*DarlingSelfAlert*,*DarlingPgOperationalAlert*,*IncidentDeliveryFilter*,*RepeatDeliveryBudget*,*RunnableQueue*,*StoreToastAndCheckpointer*,*PolicyJobFailing*,*McpPageContract*,*AlertHistory*,*McpAlert*,*Census*,*Ratchet*: Total 1707, Failed 1 (RunnableQueueAlertDetailTestspinned "1 more request(s)"; fixed), then*RunnableQueue*+*AlertReadFailure*rerun: Total 165, Failed 0, Skipped 15 (live).*AlertContextBuilders*,*BlockingDeadlockContextBuilder*,*LiteAlertForwarding*,*McpPageContract*,*AlertValueParser*,*Census*,*Ratchet*,*AlertHistory*,*McpAlert*,*BlockingWaitSnapshot*,*IncidentCooldown*: Total 357, Failed 0.CHANGELOG
SECTION: Fixed
ENTRY:
REF:
[Alert texts: the word agrees with the count (#6703) #6704]: Alert texts: the word agrees with the count (#6703) #6704
For the coordinator
DarlingSelfAlertEvaluator.csare at 5219 and 5586/5798; its lines are 5346 and 5362.Round 1 fixes
Claude posting for Erik Darling. Answers review 5637523648 (head dc43c03).
PgDeadlockRemask.s_noStatementObjectnow matchesparticipant,participantsandparticipant(s)(participant(?:s|\(s\))?), so the builder's "1 participant" / "3 participants" lines are kept as written when a report is Missing and no longer flipneverRemasked. Stored rows keep "(s)" for their retention, so the old spelling stays accepted. Doc comment updated. Test:PgDeadlockRemaskTests.TheBuildersNoStatementLine_IsKeptAsWritten_AndNotJudgedToCarryLiterals(1 and 3 participants) builds the line withDarlingWorker.BuildPgDeadlockIncidentitself, runsRemaskAlertwith a Missing report, and asserts that withreportsMayBeRawnothing is rewritten, and with the key passed the key is replaced and the line is unchanged. Proved on the old regex: both cases fail. The existing tests with the old literal stay and now cover stored rows.StartsWith,EndsWith,Contains,IndexOf,LIKEorReplaceover each text this PR changed. None found beyonds_noStatementObject. The only text matches are theContains("XE session")checks on SQL exception messages (DarlingWorker.cs:17516, LiteRemoteCollectorService.BlockedProcessReport.cs:699), which read the engine's error, not our alert text. The "+N more" overflow text is documented as unparsed (NumericValuecarries the number).IAlertDeliverer.cs("3 deadlocks in the last hour" / "1 deadlock ..."),CurrentBlockingWaitResult.cs("across N blocked sessions", "across 1 blocked session"),PerEventNotification.cs("+N more incidents this cycle", "+1 more incident this cycle").DarlingSelfAlertEvaluator.RenderCustomRuleHealth: "1 no longer compiles" / "N no longer compile", "1 armed but never fires" / "N armed but never fire".CustomRuleHealth_OneRule_ReadsInTheSingularnow asserts the whole sentence for (1,0), (1,1) and (0,2).ApplyCaptureDownAsync: "XE session missing" for one, "XE sessions missing" for two.CaptureDown_OneMissingSession_ReadsInTheSingularasserts the short message and adds the Blocking-and-Deadlock case (detail and short message).DarlingMcpStoreMetricsTools.CheckpointerNote: "N checkpoint(s), spending" is "1 checkpoint, spending" / "N checkpoints, spending", and "N checkpoint(s) were REQUESTED" is "1 checkpoint was REQUESTED" / "N checkpoints were REQUESTED".StoreToastAndCheckpointerTests.TheCheckpointerNote_SaysOneThingPerStatus_AndNamesTheLeversOnPressureupdated for the plural pins and gains a one-checkpoint case.Tests run (Debug, Darling.Tests.exe):
*PgDeadlock*,*DarlingSelfAlert*,*StoreToastAndCheckpointer*,*StoreMetrics*,*PerEvent*,AlertEngineTests,*Census*,*Ratchet*,*DarlingPgOperationalAlert*,*DarlingMcpTools*: Total 1172, Failed 0, Skipped 55 (needs-rig live tests). Build: 0 errors, 1 warning (xUnit2000 inStoreConnectionStringAppendPinTests.cs, a file this PR does not touch). Not run:pre-push.sh, the full suite, live classes (CI decides).Seat corrections
McpMissMessageParityPinTests' lapsed-mute fragment now starts at "disabled or expired": the word before it is now picked by the count, in both products.