mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
d2ac0c5112
Removes `GET /api/charts/workloads-summary` and `GET
/api/charts/storage-summary`, their frontend clients
(`ChartsAPI.getWorkloadsSummaryCharts`,
`ChartsAPI.getStorageSummaryTrend` and their types), and the backend
code that existed only for them.
**Why they are dead**
- `getWorkloadsSummaryCharts` arrived with the v6 import and was never
called: `git log -S getWorkloadsSummaryCharts -- frontend-modern/src
':!*test*'` lists only that commit, and no other source file ever
referenced the route.
- `getStorageSummaryTrend` lost its last reader when
`storageSummaryTrendCache.ts` was deleted in b91dc8dd4c (2026-05-26).
**Why the backend routes go too**
- No stable release ever requested either route from the browser. v6.0.0
and later carry no caller, and the storage trend reader shipped only in
v6.0.0-rc.1 to rc.5.
- Neither route is in `docs/API.md`, which lists only `/api/charts` and
`/api/storage-charts` under Metrics & Charts. That page covers common
endpoints, not all of them, so this is supporting evidence rather than
proof. Any `monitoring:read` token could reach these routes, so a
private script may notice; nothing known depends on them.
- pulse-pro, pulse-mobile and pulse-dev-infra never reference them.
pulse-enterprise names `TestSLO_WorkloadsSummaryCharts` only as fixture
data, and `release_latency_gate.py` passes a test that is absent from
the candidate as `removed`.
- They still cost something: a payload cache, an SLO test in the latency
gate and a benchmark for the workloads route, and in mock mode a 24-hour
storage aggregate rebuilt on every sampler tick for a cache nothing
read.
- Requests to either path now get 404.
**Second-order orphans removed:** `buildMockWorkloadMetricHistorySeries`
and its test-only wrapper, `filterMetricPointMap`,
`oldestMetricSeriesTimestamp`, and the summary-only constants.
**Evidence**
- TypeScript reference graph from `src/index.tsx`: zero production
references to the removed methods or types. The live controls
`getInfrastructureSummaryCharts` and `getStorageSummaryCharts` are
found.
- Production build before/after: only the ChartsAPI chunk changes,
losing exactly the two static methods (326 B raw, 49 B gzip). `index.js`
and `index.html` differ only by chunk hashes and SRI values.
- `deadcode ./cmd/pulse` and golangci `unused` (with and without tests)
report nothing newly unreachable.
- Private mock stacks: the removed routes go from 200 to 404, and
`/api/charts/workloads`, `/api/charts/infrastructure` and
`/api/storage-charts` are unchanged. The Proxmox overview in Trends, a
guest History drawer and `/proxmox/storage` make identical chart
requests before and after at 1440 and 390 px, with no console errors.
Neither build requested the removed routes.
**Contracts:** prose that described either route as live now records the
retirement, with a rule under api-contracts item 39.
`TestContract_WorkloadChartMetricBudgetGuardrailsRemainCanonical` now
pins the per-type metric sets the surviving `/api/charts/workloads`
route requests, in place of the summary-only pins.