Repository navigation
MCP: Darling's blocking stats and PostgreSQL deadlock and log event tools say where their data starts (part of #4966) - #5205
Merged
Conversation
…wo series' floors (#4966)
…too (#4966) Drop ReadEventPageAsync; the deadlock and log-event reads call ReadEventAsync, as get_deadlocks does. The cap is reported by truncated.
…into HEAD # Conflicts: # Darling/Darling.Tests/McpPayloadContractCensusTests.cs
…hatever the cap, and name the blocking-stats event test for what it proves
# Conflicts: # Darling/Darling.Tests/EffectiveStartUtcTests.cs # Darling/Darling.Tests/McpPayloadContractCensusTests.cs
This was referenced Oct 5, 2026
erikdarlingdata
marked this pull request as ready for review
October 5, 2026 11:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What an MCP client sees
Three more Darling MCP tools carry
effective_start(UTC, with a Z),window_truncatedandtruncation_noteright afterhours_backon a data answer, and the same keys underhintson an empty answer:get_blocking_stats;get_pg_deadlocks;get_pg_log_events.What they share with the rest of the family:
not_collectedand the runtime precondition stay bare, decided before any probe.get_blocking_stats: two series, one noticeThe answer holds two separate per-minute series, blocking severity and deadlock severity, so the one notice sits at the LATER of their two start points. That's the rule its Lite twin uses (#5172).
get_blockingprobes. Deadlocks take the deadlocks' coverage.get_pg_deadlocksandget_pg_log_events: event listsBoth are newest-first, capped lists windowed on the event's own time.
ReadEventAsyncthe SQL Server event tools use (MCP: Darling's blocking, deadlock and long query tools say where their data starts (part of #4966) #5171).ForCollectorTableoverpg_deadlocksandpg_log_events. Neither is a gated raw relation or a baseline-floored collector, so each has a schedule retention edge and the probe never walks to a table's oldest row.truncatedand the oldest returned time.Test plan
get_blocking_stats, in its live class, with fixed anchors:PgEventToolsWindowFloorLiveTests:truncatedis true;not_collectedbare;EffectiveStartUtcTestsrows.--no-incrementalbuild: 0 warnings;CHANGELOG
SECTION: Fixed
ENTRY: - Darling's blocking stats and PostgreSQL deadlock and log event MCP tools say where their data starts ([#5205]) -
get_blocking_stats,get_pg_deadlocksandget_pg_log_eventscarryeffective_start,window_truncatedandtruncation_note(underhintson an empty answer).get_blocking_statsnames the later of its blocking and deadlock start points, so an uncovered deadlock half no longer reads as "no deadlocks"; the event lists name the earlier of the store's coverage and the oldest event shown.REF: [#5205]: #5205
Part of #4966