Skip to content

Show the store's collection caveats on the web Collection Health tabs - #5123

Merged
erikdarlingdata merged 3 commits into
devfrom
feature/4843-web-collection-caveats
Oct 4, 2026
Merged

erikdarlingdata merged 3 commits into
devfrom
feature/4843-web-collection-caveats

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Part of #4843

What users see change

Each web Collection Health tab (the SQL Server tab, and the PostgreSQL Overview tab where collection health lives) now has an "Analysis could not read these data families" grid. It has the desktop Viewer's four columns: Family, Reason, Since, Last seen. It lists the rows collect.analysis_collection_caveats (V141, #3691) holds for the server. When there are none, the grid is not drawn at all, as in the desktop.

What changed

  • No new MCP tool. get_collection_health already feeds the tab's panels in one read, so it now carries a stored_caveats array (family, reason, first_seen_utc, last_seen_utc, ordered by family). The array is omitted when the store records none, so a clean server's payload is byte-identical to before. The tool's description is unchanged, so the tools/list budget, tool count, guide heads and payload census pins did not move (the budget, guide and census classes pass).
  • New DarlingCollectionCaveatReader (Service/Mcp): one schema-qualified read with the MCP deadline, the key spliced into the serialized payload. A store below V141 has no table: 42P01 answers "no caveats" and the health read still succeeds. A role without SELECT (42501) answers none with one warning. The same pattern the run-time reader uses. Any other failure still fails the health read, like the reads beside it.
  • server-tabs.js, Collection Health region only: a shared COLLECTION_CAVEATS_PANEL used by both tabs, and a hideWhenNoRows option on fanout that keeps a panel hidden until rows arrive (a failed or empty read leaves it hidden). The shell is built hidden, so a clean server never shows the card or its loading strip, and a last-had-rows memory at module scope, keyed by read, params and title, keeps the card up across the 60 s rebuild for a server that has caveats.

Not changed

No new tool, no migration, no Storage reader, no CSS. The in-memory analysis_caveats block is untouched; this is the store's current answer, which survives a restart.

Verified at the head (0d2e77f)

  • Harness arms with a read that never resolves (panel hidden) and a rebuild of a server whose last read had rows (panel stays visible), on both tabs: both FAIL on the previous head (pending hidden=false) and pass now; dropping the memory check turns the rebuild arm red.
  • The cross-server live test seeds a second server with its own caveat: A sees only its rows, B only its own.
  • The key is stored_caveats, because collection_caveats is already an object on analyze_server; the tool description is unchanged (McpToolsListBudgetTests 5/5).
  • CollectionCaveatsWebTests 10/10 (live arms against a local TimescaleDB), McpPayloadContractCensusTests 68/68, WebModuleLoadTests 7/7, ServerPageTabsTests 19/19, the four harness classes 20/10/9/3, CollectionCaveatsParityTests 3/3, and the census/adoption/guard/scrub/hygiene family all green except LivePostgresCollectionHygieneTests, which cannot load WPF types on macOS.
  • CollectionCaveatsWebTests: 8/8 on a throwaway TimescaleDB container (removed afterwards):
    • node behaviour test, both engines: empty payload hides the panel; two rows draw a four-column grid;
    • page test: the only read is get_collection_health?server=…, no caveat tool anywhere;
    • JSON attach: clean payload unchanged, rows become an array;
    • 42P01 gives none, 42501 gives none with one warning, anything else throws;
    • live: no rows gives no key; rows written through CollectionCaveatStore come back through the real tool with Since/Last seen kept; the table dropped (pre-V141) gives no key and collectors still answer.
  • RED on dev: the harness against dev's server-tabs.js shows the panel absent for every arm, and the C# class does not compile on dev (no reader). Both fail there.
  • Also green: CollectionCaveatLedgerParityTests, PgIndexBloatGridReachTests, WebServerPageRangeTests, WebRangeKeptHistoryBehaviourTests, WebModuleLoadTests, ServerPageTabsTests, CollectionHealthRunTimeFieldsLiveTests, CollectionHealthPayloadBudgetLiveTests, DarlingMcpHealthToolsLivePostgresTests, CollectionCaveatStoreLiveTests, ViewerCollectionCaveatsLivePostgresTests, PgTargetCollectionCaveatsLiveTests.
  • Whole-tree family (every Census/Adoption class, DocCommentHygieneTests, McpToolsListBudget*, McpToolGuide*, StorageCommandTimeoutTests, StartupCommandTimeoutTests, McpReadCommandTimeoutTests, TsqlConventionGuardTests, FleetIdentifierScrubTests, QueryStoreSliceTieBreakSourceTests): no failures.
  • Full Darling.Tests with no live store: 22410 total, 476 failed, 1861 skipped. Every failing class is on the Mac-local failing list. The two other failures from my first full run (CollectionCaveatLedgerParityTests, PgIndexBloatGridReachTests) were my change and are fixed.
  • node --check clean on server-tabs.js; fanout and hidesPanel each declared once; module-load harness passes.
  • scrubcheck on the diff: 0 hits. Commit author is Erik. Build: 0 errors, --no-incremental, no analyzer warnings.
  • Not run: Lite.Tests (not touched).

CHANGELOG entry

SECTION: Added
ENTRY: - Collection caveats on the web Collection Health tabs ([#5123]) - the SQL Server and PostgreSQL Collection Health tabs now list the data families the analysis pass could not read, with the reason and when it started, hidden when there are none.
REF: [#5123]: #5123

…s test, and let the harness copy modules other PRs add to server-tabs.js
@erikdarlingdata erikdarlingdata added the merge-train In a merge train: its CI ran on the train PR label Oct 4, 2026
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 4, 2026 21:44
@erikdarlingdata
erikdarlingdata merged commit 8f730be into dev Oct 4, 2026
6 of 18 checks passed
@erikdarlingdata
erikdarlingdata deleted the feature/4843-web-collection-caveats branch October 4, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-train In a merge train: its CI ran on the train PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant