Repository navigation
get_collector_stall_probes/describe_custom_view_catalog/get_sweep_reports reading guidance move off tools/list (#3898) - #4074
Merged
Conversation
…p_reports reading guidance off tools/list (#3898) Refs #3898. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M7r1CXmEcBmsrTV34CCLfF
erikdarlingdata
marked this pull request as ready for review
September 23, 2026 21:04
erikdarlingdata
enabled auto-merge (squash)
September 23, 2026 21:04
erikdarlingdata
added a commit
that referenced
this pull request
Sep 23, 2026
…ntries in their sections (#4080) Adds 42 entries and 42 link refs (#3992, #3995, #3996, #3998, #4001, #4002, #4003, #4007, #4010, #4011, #4013, #4015, #4020, #4022, #4025, #4029, #4030, #4031, #4036, #4038, #4039, #4040, #4044, #4047, #4048, #4049, #4050, #4051, #4055, #4061, #4063, #4064, #4065, #4066, #4067, #4068, #4069, #4070, #4071, #4073, #4074, #4078). Each PR's entry was buffered, and this lands every entry whose PR was merged on origin/dev when it ran. #3989 left 26 entries under bare 'Changed' and 'Fixed' lines above '### Added'. They move into '### Changed' and '### Fixed', below the new entries, and one blank line stays under [Unreleased]. Claude-Session: https://claude.ai/code/session_01Ua31ugERL5DmhFVRtf6keQ Co-authored-by: Claude Opus 5.5 <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
A client that loads Darling's whole MCP catalog pays for every tool's reading guidance up front, in
tools/list,before it asks a single question. This PR moves that guidance for three Darling-only tools into their own
get_tool_guidereading guide, served only on request. Nothing is deleted. Every guardrail fact stays reachable,either in the short description every client always sees, or in the guide.
What changes
Converted three tools, all on
PerformanceMonitor.Darling.Service.Mcp, none with a Lite twin (checked by namesearch before starting):
get_collector_stall_probesDarlingMcpStallProbeTools.csdescribe_custom_view_catalogDarlingMcpCustomViewTools.csget_sweep_reportsDarlingMcpFleetSweepTools.csEach new head states the tool's guardrail facts in under 620 characters. That covers what it returns, its gate or
floor, and what an empty or zero answer means. For
get_sweep_reports, it also covers the two field contractsthe tail used to carry alone. Every original sentence moved to the tail verbatim, in its original order, except
the one D4 removal below.
describe_custom_view_catalogandget_sweep_reportsalready used string literals joined with+. The new headand the marker went in as new leading pieces. Every original line stayed untouched. Nothing needed retyping in the
parts that must stay verbatim, so there was no chance of a copy error there.
Added
Darling/Darling.Tests/McpToolGuideHeads.PlatformC.cs(classMcpToolGuideHeadsPlatformCTests): the headpins for this lane's three tools, following the
HealthParser/Datapattern. Updated the three tools' lines inMcpToolsListBudget/DarlingMcp{StallProbe,CustomView,FleetSweep}Tools.txtto the new served lengths. The ceilingswent down, not up.
Corrections
None. All three tools' original prose matched the tool body on inspection.
D4 removals
One.
get_collector_stall_probes' second sentence carried a general reading rule and, after a dash, a one-timemeasured example:
The rule (the clause up to the dash) explains why the tool exists, and it stayed in the tail verbatim. The clause
after the dash does not help read any future row. It named one past measurement, so it came off the wire per D4.
It is the only sentence
dropcheck.pyreports as missing for these three tools. The other two tools both reportmissing=0.Re-pointed pins
DarlingMcpFleetSweepToolsTests.cshad two pins that read the tool's raw[Description]text directly, bothsides of the marker at once. That raw text still holds the whole original sentence, so both pins kept passing
without a code change on their part. The brief asks for a deliberate re-point instead, so this PR moves them:
Description_CarriesTheMuteSemantics_AndTheQuietIsNotCleanBlocknow checks the served head(
McpToolGuideTests.Served(...).Served) for the short guardrail claims a client sees without callingget_tool_guide:MUTE SEMANTICS,DELIVERY WAS OFF,would_have_paged,ABSENT on an alerts-on sweep,QUIET IS NOT CLEAN,instruments_alive,instrument_liveness. It checks the tail for the fuller originalwording that did not fit the 620-character head:
muted, and nothing would have paged, thefleet_sweepknobname, and
at most one daily rollup.Description_StatesTheIds_AreEmittedAsStringsnow checks the head for the short claim(
pass sweep_id (a STRING) for one sweep). It checks the tail for the exact original sentences,spelled as a JSON stringandpass one back verbatim, which moved there.Red-watch: broke the head's
MUTE SEMANTICSlabel. Ran this pin and the new head pin, and saw both fail. Restoredthe text and saw both pass again.
No other existing test pins description text for these three tools.
CollectorStallProbeStoreTests,DarlingMcpCustomViewToolsTests,DarlingWebEndpointsTests,FleetSweepStateRungTests,FleetSweepWebFeedTests,McpLatestSnapshotStampTests, and Lite'sCrossAppMcpToolInventoryPinTestscheck tool-name rosters or JSONpayload shapes instead. This PR touches neither.
D9 traps
get_collector_stall_probesreturnsnot_collected. Is the tool broken?Correct: No. A probe fires only when throughput drops and a collector's budget runs low. That combination
is rare, so an empty answer here is a healthy result.
Prevents it:
Sampled only when a collector's wall-clock budget is a quarter elapsed and throughput is under 1 MB/s; rare, so a not_collected empty answer is EXPECTED and healthy.waiting_task_count: 0. Did the sample miss something?Correct: No. A positive
scheduler_countbeside a zero count is a real all-clear, not a missed read.Prevents it:
scheduler_count is the sample's denominator: waiting_task_count 0 beside it is a real all-clear.outcome_censuslistsCONNECT_FAILEDrows. Do those need filtering out before reading the answer?Correct: No. They are findings on their own, not noise to discard.
Prevents it:
outcome_census is never filtered to successes: CONNECT_FAILED/CONNECT_TIMED_OUT are findings.Correct: No. Each row is evidence about one moment. The tool carries no band to compare it to.
Prevents it:
Unbanded, untrended: one row is evidence about a moment.describe_custom_view_catalogneed aserver_nameor a time window for one server's data?Correct: No. It is static reference data. It reads no server and no collected data.
Prevents it:
Static reference data: no server, time window, or collected-data read.validate_custom_viewaccept a name outside thecatalog?
Correct: No. The compiler emits only the catalog's own identifiers, however close a guess comes.
Prevents it:
the compiler emits ONLY these identifiers.query_statspanel filters onneqfor one procedure name. Does that also drop the ad-hoc bucket?Correct: No. The
'(ad hoc)'rows stay in, because that dimension's value is never null.Prevents it:
a neq filter on procedure name still INCLUDES those rows (the dimension value is never null).get_sweep_reportsruns with nowatch_stateargument. Does the worklist list closed items too?Correct: No. The default view holds open and carried items only.
Prevents it:
the watch worklist (default: open+carried only; pass watch_state for pending/closed).alerts_enabled: falseand no bad verdicts. Was the fleet actually quiet that window?Correct: Unknown from that alone.
alerts_enabled: falsemeans delivery was off for the window, whateverconditions were.
Prevents it:
MUTE SEMANTICS: alerts_enabled false means DELIVERY WAS OFF that window.would_have_pagedkey at all. Is that the same as the key being present andempty?
Correct: No. A missing key means the sweep ran alerts-on, so the check never ran.
Prevents it:
such a sweep carries would_have_paged (present-and-empty means nothing would have paged; ABSENT on an alerts-on sweep).Correct: No.
instruments_alive: falsemeans the sweep failed to prove its own data sources. The emptywindow is then unreadable, not healthy.
Prevents it:
QUIET IS NOT CLEAN: instruments_alive false means the sweep could not prove its data sources; read instrument_liveness before trusting a quiet window.get_sweep_reportsrun a live check against the monitored servers to build its answer?Correct: No. It is a stored read over the monitoring store.
Prevents it: the head's closing sentence,
Stored read.sweep_idarrives as a JSON number instead of a string. Does the tool round it to the nearest sweep?Correct: No. The parameter takes a string by contract. An id that fails to parse exactly gets refused.
Prevents it:
pass sweep_id (a STRING) for one sweep.Test plan
dotnet build Darling/Darling.Tests/Darling.Tests.csproj -c Debug:0 Warning(s),0 Error(s).dotnet build Lite.Tests/Lite.Tests.csproj -c Debug:0 Warning(s),0 Error(s). Checked because oneexisting pin,
CrossAppMcpToolInventoryPinTests, lives there.McpToolGuide*,McpDescription*,McpZeroIsAMeasurement*,McpPayloadContractCensus*,McpToolsListBudget*, plus every class this lane's orders named):Total: 326, Errors: 0, Failed: 0, Skipped: 4on
Darling.Tests.Total: 6, Errors: 0, Failed: 0onLite.Tests'CrossAppMcpToolInventoryPinTests.get_sweep_reports'MUTE SEMANTICShead text. Confirmed the new head pin and there-pointed sweep pin both failed, restored the text, confirmed both green again.
dropcheck.py origin/dev HEAD get_collector_stall_probes describe_custom_view_catalog get_sweep_reports:missing=0fordescribe_custom_view_catalogandget_sweep_reports.missing=1forget_collector_stall_probes, the D4 removal above, as expected.git merge origin/dev, which pulled in two more The MCP surface costs ~100k tokens of context before the first call: 157 tools, 336 KB of tools/list, 86 KB of instructions #3898 content PRs (Query Store clutter and oversized-plan backlog: MCP reading guidance moves off tools/list (#3898) #4067, get_pg_log_events/get_pg_index_bloat/get_pg_deadlocks move reading guidance off tools/list (#3898) #4068): a clean merge, noconflicts. Rebuilt and reran the full targeted set above, still
Failed: 0.the attribution emoji, and code spans and table cells, which the brief allows.
Darling.Testssuite: not run. The context watchdog's first warning landed right after dropcheckconfirmed clean. This lane's standing orders are to wrap up green at that point, not push through it.
Everything this PR touches is covered by the targeted run above. The coordinator still needs to run the full
suite once.
Coordinator verification
Handoff
Nothing deferred. All three assigned tools are converted, green, and pushed. The full-suite run is the only item
left for the coordinator, per this lane's standing orders on watchdog warnings.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M7r1CXmEcBmsrTV34CCLfF