Repository navigation
get_deadlocks/get_blocked_process_reports move reading guidance off tools/list (#3898) - #4123
Merged
Merged
Conversation
…ools/list (#3898) get_deadlocks is a twin: one byte-identical head (591 served chars) now covers both Darling (was 822) and Lite (was 694). get_blocked_process_reports is Lite-only (was 1,340) and gets its own head (483 served), modeled on Darling's get_blocking (#4108). Every original sentence moves to the tool's own get_tool_guide tail, unchanged. The dedup_key parameter (Darling-only, get_deadlocks) was 406 chars, over the D2 200-char cap; its "BEFORE limit" scan-order sentence stays on the parameter because an existing pin (McpPageContractTests.FingerprintReaders_NameTheScanCeilingFields) reads it there, and the other two original sentences moved verbatim into the tail. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QQh8LczP1HGLXQYAx4oTZC
McpPageContractTests.FingerprintReaders_NameTheScanCeilingFields and DarlingMcpBlockingToolsSurfaceAndSqlTests.ParamContract_DedupKeyDescription_AdvertisesItsScoping both read facts straight off the dedup_key parameter's own Description attribute. My first trim moved one or the other fact to the tail and broke whichever pin it left behind. get_blocking (#4108) already solved this in the same file: keep "BEFORE limit" and "display name" in a 191-char parameter, and repeat the full original parameter text verbatim in the tool's own tail under a "dedup_key:" label. get_deadlocks now matches that shape. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QQh8LczP1HGLXQYAx4oTZC
erikdarlingdata
marked this pull request as ready for review
September 24, 2026 03:41
erikdarlingdata
enabled auto-merge (squash)
September 24, 2026 03:41
erikdarlingdata
added a commit
that referenced
this pull request
Sep 24, 2026
* Add 48 buffered CHANGELOG entries in one splice Adds 48 entries and 48 link refs (#4057, #4077, #4079, #4081, #4082, #4083, #4084, #4085, #4086, #4087, #4088, #4089, #4090, #4091, #4092, #4093, #4095, #4096, #4099, #4100, #4101, #4103, #4105, #4106, #4107, #4108, #4109, #4110, #4111, #4113, #4114, #4115, #4116, #4117, #4118, #4119, #4120, #4121, #4122, #4123, #4124, #4125, #4126, #4127, #4131, #4133, #4136, #4141). Each PR's entry was buffered, and this lands every entry whose PR was merged on origin/dev when it ran. Entries found under a bare section line (none unless the old script ran again) move into the matching ### section, below the new entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QQh8LczP1HGLXQYAx4oTZC * Changelog splice: add #4137's entry, which merged before the splice but was missed #4137 (pg_plan_capture reads csvlog) merged at 05:57Z with a CHANGELOG entry section in its body. It was neither spliced nor listed as needing no entry. Its entry goes under Fixed, right after #4136's, and #4136's last sentence now points to it instead of saying plan capture is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NUU29PuGg9TUFBsACgZg2K --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Refs #3898.
Why
get_deadlocks(Darling and Lite) andget_blocked_process_reports(Lite only) put their whole reading guide onevery
tools/listcall.get_deadlocksis a twin whose two products already carry nearly the same text. This PRgives it one byte-identical head.
get_blocked_process_reportshas no Darling twin under that name. Darling'sclosest tool,
get_blocking, was converted separately in #4108, and its head is the model this PR follows.What changes
Each tool's
Description(...)now holds a short HEAD, served ontools/list. After the literal<<GUIDE>>markercomes the full original text as a TAIL, served only by
get_tool_guide. No SQL, payload shape, or tool behaviorchanged.
get_deadlocks's head states one fact that differs by product:dedup_keyis Darling-only. Per D6, the shared,byte-identical head names it as "Darling: dedup_key ...". This is true on both products, even though Lite's own
get_deadlockshas no such parameter.GetDeadlocks_HasNoDedupKeyParameterinLite.Tests/McpToolGuideHeads.Deadlocks.cspins that.The Darling-only
dedup_keyparameter onget_deadlockswas 406 characters, over the D2 200-char cap. It nowmatches the shape PR #4108 already established for
get_blocking's owndedup_keyparameter in the same file.The parameter is 191 characters and keeps the "BEFORE limit" and "display name" sentences, both read by existing
pins below. The tool's own tail repeats the full original parameter text verbatim, labeled
dedup_key:.Served characters
Status routes
Every status word either head states, with the branch that returns it:
wait_time_ms(get_blocked_process_reports) is confirmed milliseconds byWaitTimeFormattedinLite/Services/LocalDataService.Blocking.cs:1295(WaitTimeMs < 1000 ? "{WaitTimeMs} ms" : ...).Corrections
None. Every head fact was checked against the tool body, the status-routing code, and (for
wait_time_ms) thedata-service mapping before being written.
D4 removals
#1140issue reference in the Darlingget_deadlocksdedup_keyparameter came off the wire. It is gonefrom both the 191-character parameter and its verbatim repeat in the tail.
Re-pointed pins
McpPageContractTests.FingerprintReaders_NameTheScanCeilingFieldsreads the "BEFORE limit" sentence straight offthe
dedup_keyparameter attribute. It still passes: the trimmed parameter keeps that sentence.DarlingMcpBlockingToolsSurfaceAndSqlTests.ParamContract_DedupKeyDescription_AdvertisesItsScopingreads the"display name" scoping sentence off the same parameter. It still passes for the same reason. Both pins found a
gap in my first trim, which had moved one sentence or the other out of the parameter. The fix matches the
191-character shape get_blocking/get_pg_replication_slots move reading guidance off tools/list (#3898) #4108 already uses for
get_blocking's owndedup_keyparameter in this file.Status routes (the status words the heads state)
D9 traps
Correct: Not from this alone: empty covers both "none in the window" and "none collected in it".
Prevents it: "else empty means none in the window, or none collected in it."
Correct: No. The page is capped by limit, not hours_back, so a server blocking steadily fills the page from just its newest few minutes.
Prevents it: "limit caps ROWS, not hours_back: truncated true means raise limit or narrow the window, not widen hours_back."
Correct: No. Widening hours_back cannot help, because the cap is on rows. Raise limit or narrow the window instead.
Prevents it: "truncated true means raise limit or narrow the window, not widen hours_back."
Correct: Milliseconds, so half a second.
Prevents it: "wait_time_ms is milliseconds."
Correct: No, it is already de-skewed by the read, so comparing it against event_time directly is valid.
Prevents it: "last_tran/last_batch stamps are de-skewed for direct comparison to event_time."
Correct: No. not_collected means this engine can never run the deadlocks collector. It is permanent, not fixable.
Prevents it: "not_collected wins if the engine can't run deadlocks."
Correct: No. precondition names a fixable gap, like a dropped session. not_collected is permanent.
Prevents it: "then precondition names a fixable gap (e.g. XE session gone)."
Correct: No. Passing those two checks only rules out the specific permanent and recorded-fixable gaps. Empty can still mean nothing was collected some other way.
Prevents it: "else empty means none in the window, or none collected in it."
Correct: No. A no-match on the fingerprint is a normal empty answer, not an error.
Prevents it: "a no-match answer is still empty."
limitrows get missed?Correct: No. The fingerprint scan runs over the whole window before limit is applied, up to its own stated ceiling.
Prevents it: "Darling: dedup_key scans the whole window before limit, up to a stated ceiling (rows_examined/scan_truncated)."
Correct: No. dedup_key is Darling-only. The shared head says so explicitly with the "Darling:" label.
Prevents it: "Darling: dedup_key scans the whole window before limit..."
Correct: No. Under newest-first paging, a truncated page's oldest stamp is only how far the read reached, not proof the rest of the window was empty.
Prevents it: "limit caps ROWS, not hours_back: truncated true means raise limit or narrow the window, not widen hours_back."
Correct: No. Use get_deadlock_detail. get_deadlocks carries only victim process info.
Prevents it: "Use get_deadlock_detail for the graph XML."
Test plan
Darling.Testsbuild:Build succeeded, 0 Warning(s), 0 Error(s)Lite.Testsbuild:Build succeeded, 0 Warning(s), 0 Error(s)McpPageContractTests, DarlingIncidentFingerprintTests, DarlingMcpBlockingToolsSurfaceAndSqlTests,
CollectorRuntimePreconditionTests, RuntimePreconditionReadWiringTests, CrossAppMcpToolInventoryPinTests):
all green
McpToolGuideHeadsDeadlocksTests.EveryConvertedHead_CarriesItsGuardrailFact_AndThePointerfailed, restored, confirmed greendropcheck.py origin/dev HEAD get_deadlocks get_blocked_process_reports:missing=0for all three(Darling get_deadlocks, Lite get_deadlocks, Lite get_blocked_process_reports)
Darling.Testssuite aftergit merge origin/dev: Total 13393, Errors 0, Failed 0, Skipped 637(no PostgreSQL rig)
0 Errors, and this run met it
Lite.Testssuite: Total 5270, Errors 0, Failed 0Coordinator verification
Handoff
Both tools in this lane's brief (get_deadlocks, get_blocked_process_reports) are fully converted and green. Nothing
deferred from this lane's scope.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QQh8LczP1HGLXQYAx4oTZC