Source diagnostics

The source explorer uses Overview, Diagnostics, Settings and Devices sub-routes under /sources/:id. The bare resource URL redirects to /overview. Only /diagnostics calls the source; failures do not affect other tabs or widget composition.

Optional authenticated GET /diagnostics

This operational extension is independent of source protocol v1 and its SDK. Use the same bearer authentication as the source RPC. Return cache-control: no-store.

{ "diagnosticsVersion": 1, "sourceKey": "example", "scope": "stored", "totalItems": 2, "earliestTimestamp": 1788999600, "latestTimestamp": 1799604000, "lastIngestedAt": "2026-09-09T00:00:00.000Z" }

Count all stored temporal items belonging to this source before device settings, date filtering and next-item selection. Count items, not arbitrary backing rows, catalog entries, ingest buckets or unrelated copied data. Sources own the mapping: SQL aggregates, decoded documents or any other storage are implementation details. The parent never queries a source database or guesses date columns.

Bounds use event instants in Unix seconds, not milliseconds or ingestion dates. Counts must be nonnegative safe integers. Empty sources return zero and two null bounds. Nonempty sources return finite ordered bounds within the JavaScript Date range. lastIngestedAt is an ISO timestamp or null when unknown.

The parent checks version, identity and consistency. HTTP 404/405/501 means unsupported; transport/auth/invalid-response failures mean unavailable. Neither means zero items. Summary data is fetched on each Diagnostics page load. The page computes elapsed-day span and latest-event horizon from the response; browser-local dates use the shared timestamp renderer.

Stored bounds do not prove schedule completeness, upstream freshness or current event statuses. This endpoint never ingests or changes data.

Verification

Parent: tools/source-diagnostics-check.ts (pure validation and tab rendering). Each active source: diagnostics-check.ts (read-only authenticated diagnostics, auth rejection, bounds and existing descriptor).