Skip to content

Complete the Darling README's PostgreSQL collector inventory (27 of 27), pin it, and retire the last seven-collector-era prose - #3264

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/3261-readme-pg-drift
Sep 10, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
fix/3261-readme-pg-drift

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Fixes #3261 (close on merge)

Stacked on #3260 (fix/3247-runbook-staleness): this branch contains #3260's two commits because both edit Darling/README.md's PostgreSQL section and the "What gets collected" work builds directly on #3260's corrected rows. Merge #3260 first and this PR's diff collapses to its own two commits (README + tests/comments/tool description). No CHANGELOG.md, per the wave protocol — the entry was reported for the consolidated splice.

What #3261 listed, and what was done

  1. "What gets collected" covers 12 of 27 collectors — the table now carries all 27. Each new row is derived, not invented: source and behavior from the collector's own doc comment and its migration rung's header (PgMigrations.cs V96–V106), cadence/retention verbatim from CollectorScheduleDefaults.cs, gates from AppliesTo/RunsPerDatabase. Extension-miss degradation is worded "a non-fatal skip naming the missing install" so the rows stay true if the in-flight EXTENSION_MISSING reclassification (fix-3240's lane) lands in either order.
    • Pinned: new ReadmeDerivedCountPinTests.WhatGetsCollectedTable_NamesEveryPostgresCollector requires the table's row-leading names set-equal to the catalog's PostgreSQL roster in both directions. It is a bespoke fact rather than a SetPins entry because collector names legitimately appear inside other rows' source cells ahead of their own row (pg_replication_slots is a source of pg_xmin_horizon), which defeats the shared drop-one-token mutation proof; it carries its own drift proof that deletes a whole row instead. Proven red externally too: deleting the pg_wraparound_stats row failed the fact naming that collector, then the file was restored.
  2. V1 ladder row's "twenty PostgreSQL tables" — now "27", with the exact rung list (V63–V69, V71, V83–V94, V96–V99, V102, V103, V106), and the notable-rungs table gains the seven rungs it never listed: V96 wait sampling, V97 kernel stats, V98 predicate stats (all PostgreSQL wait/CPU/predicate extensions: buildable locally, dark on Aurora #2603), V99 plan capture (Store PostgreSQL plans: query_plan_dim is built for SQL Server plan XML, and PostgreSQL plans are JSON #2566/PostgreSQL has no execution plan capture, which is where a DBM comparison is lost #2538), V102 server configuration (PostgreSQL configuration is never collected: no pg_settings read, and no way to see what changed #2658), V103/V104 deadlocks + identity index (PostgreSQL deadlocks are a number with no detail, and the log already carries the whole graph #2661), V106 instance CPU (Postgres High CPU alert isn't a light port — there's no instance-level CPU collector to alert on #2719). Every row's content comes from that migration's own header comment.
  3. Stale "seven collectors" code comments — verified each before touching, per the issue's own instruction:
    • DarlingCollectorRunner.cs:1099 ("Six of the seven ... take that path") — present tense, now false (7 of 27 fan out today): era-anchored to "then shipping ... took".
    • DarlingCollectorRunner.cs CreateTargetConnection remarks and CollectorRunnerConnectionEngineTests header — same two-word era anchor.
    • CollectorRunnerConnectionEngineTests assertion message ("is what made six of seven ... fail") — already past-tense history, left alone.
    • PgMigrations.cs:3138 / PostgresMajorVersionRegistryTests "Seven PostgreSQL collectors branch on postgresMajorVersion" — left alone, verified CURRENT: exactly seven collectors pass the major version into BuildQueryText today (autovacuum, index usage, io, replication slots, session states, statement stats, write stats). This is a different seven than the collector-count seven; the issue flagged it and verification cleared it.
  4. get_pg_top_queries MCP description — no longer opens "for Amazon Aurora PostgreSQL targets". It now states the Self-hosted PostgreSQL has no top-queries answer at all: pg_statement_stats is Aurora-only #2625 truth: works wherever pg_stat_statements is installed, vanilla view elsewhere with Aurora-only columns null; the I/O source breakdown sentence is scoped "On Aurora", and peak memory is marked "(Aurora only)" — wal_bytes stays unscoped because the WAL columns are core pg_stat_statements, not part of the six Aurora-only columns. No test pins the old opener (grepped).
  5. "What it does not do yet" / tab counts — re-verified against dev as the issue asked: "seven inner tabs" and the tables-no-charts claims hold; no edit needed.

Also updated in the same stroke: #3260's "the Performance Insights CPU read that is not in the table above" clause — true when written, false once the table gained the pg_cpu_utilization row — trimmed to just the epithet.

Collision lanes

Verification

  • ReadmeDerivedCountPinTests (all existing pins plus the new fact), CollectorRunnerConnectionEngineTests, PostgresMajorVersionRegistryTests, CrossAppMcpToolInventoryPinTests, PerCycleTimingLogLevelTests — 18/18 pass via the MTP runner; new-test red proven with an injected row deletion.
  • Build: 0 warnings in the touched projects.
  • README byte census clean: pure CRLF, zero lone LF/CR; 27 row-leading pg_* names counted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AtjWJJ3NnSkDSrPBsGywoZ

…re the last seven-collector-era prose (#3261)

The "What gets collected" table stopped at 12 of 27 collectors across five
collector waves with every check green, because nothing failed when a
collector shipped without a row. It now carries all 27, each row derived
from the collector's own doc comment, its migration rung header and
CollectorScheduleDefaults - and a new ReadmeDerivedCountPinTests fact pins
the table's row names set-equal to the catalog in both directions, with its
own injected-drift proof (a bespoke fact rather than a SetPins entry,
because several collector names legitimately appear inside other rows'
source cells ahead of their own row, which defeats the shared
drop-one-token mutation).

The V1 ladder row's "twenty PostgreSQL tables" becomes 27 with the exact
rung list, and the notable-rungs table gains the seven rungs it never
listed (V96-V98 wait sampling/kernel/predicate, V99 plan capture,
V102 server config, V103/V104 deadlocks, V106 instance CPU), each sourced
from its migration's own header comment.

Three "six of the seven PostgreSQL collectors" comments narrating the
connection-engine defect are era-anchored ("then shipping") so they read as
the history they are; the assertion message already in past tense stays,
and PgMigrations' "Seven PostgreSQL collectors branch on
postgresMajorVersion" stays untouched because it was verified CURRENT -
exactly seven collectors pass the major version into BuildQueryText today.

get_pg_top_queries' MCP description no longer opens "for Amazon Aurora
PostgreSQL targets": since #2625 the collector reads pg_stat_statements
anywhere it is installed, and the description now says so, scoping the I/O
source breakdown and peak memory to Aurora where they belong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtjWJJ3NnSkDSrPBsGywoZ
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewed. This is a documentation/comment/test-only PR — no T-SQL, no functional code paths changed (only doc comments in DarlingCollectorRunner.cs/CollectorRunnerConnectionEngineTests.cs, the get_pg_top_queries MCP tool description string, Darling/README.md, and a new pinned test).

Checked and confirmed accurate:

  • New test (WhatGetsCollectedTable_NamesEveryPostgresCollector): the leading-name regex correctly handles the arrow-notation rows (pg_replication_slots` → `collect.pg_replication_slot_stats`, pg_blocking` → `collect.pg_blocking_edges`) because PgReplicationSlotsCollector.Name / PgBlockingCollector.Name are "pg_replication_slots" / "pg_blocking" — matching the row's leading cell, not the arrow target. The bespoke whole-row drift proof (vs. the shared token-drop mutation) is justified given pg_replication_slots legitimately appears inside pg_xmin_horizon's row before its own.
  • README additions: the V96–V99/V102/V103/V106 rung descriptions match PgMigrations.cs's own header comments, and the V1 row's "27" ties out against the rung list (7+1+12+4+1+1+1=27).
  • get_pg_top_queries description update: matches the actual nullable behavior in DarlingMcpPgStatementTools.cs (Aurora-only columns null-not-zero, peak memory Aurora-only).
  • No Lite/Darling parity issue — PostgreSQL collectors and this README are Darling-only; Lite has no PostgreSQL surface.
  • CHANGELOG.md omission is explained in the PR body (wave protocol, reported for a consolidated splice) and matches repo convention.

No correctness, security, or performance concerns. Nothing to flag inline.

…ents (PROSE)

The #3261 description rewrite states the #2625 dual-source truth, which
puts an Aurora-only surface name into DarlingMcpPgStatementTools.cs for
the first time — inside a string literal, exactly where the whole-tree
guard looks. Accounted as PROSE, the CollectorEngineCapability precedent:
the tool reads the store and only names the surface in its message; the
dependency itself stays PgStatementStatsCollector's PAIRED entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtjWJJ3NnSkDSrPBsGywoZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant