19 Commits

Author SHA1 Message Date
rcourtman
3ae78e5d1f Add drag-to-zoom and custom time windows to drawer history charts
Operators investigating a spike in a resource drawer previously had to jump between fixed presets like 24h and 1h instead of inspecting an exact incident window.

Add exact Unix-millisecond start/end window queries to /api/metrics-store/history with full-bucket aggregate eligibility, sample-weighted SQLite downsampling within the maxPoints budget, inclusive ring filtering, clipped native provider fallback, and deterministic mock window sampling.

Add shared click-and-drag brush zoom across all panels in GuestDrawerHistory, with a live selection pill, Escape cancel, double-click and Reset zoom controls, paused polling while zoomed, and a keyboard-accessible Select time window editor that preserves exact timestamps and handles DST fall-back ambiguity.

Contract-Neutral: Additive drag-to-zoom interaction on drawer history charts and optional start/end window query on /api/metrics-store/history with no breaking subsystem contract changes
2026-11-28 12:45:55 +00:00
rcourtman
942d4b112c Harden agent identity ownership, scoping, and multi-tenant isolation
Restrict host and Docker uninstall alias recording and removal cascades
so one token cannot block or remove another enrolled host. Prevent
tokens already enrolled elsewhere from superseding stale host or Docker
records, and run Docker duplicate supersession only when creating a new
Docker host record.

Check persisted host ownership and stored Docker records directly during
identity resolution, and prefer exact HostID matches in continuity
lookups so forked records never capture a reinstalled host. Scope
Kubernetes cluster IDs per active token while allowing rotated tokens to
retain cluster records, prevent agent Ceph reports from hijacking
Proxmox or other active agents' Ceph records, scope Docker container
metric IDs by host, disable SSH temperature collection on non-default
tenants, and reload API tokens atomically under config.Mu.

Contract-Neutral: Security hardening for agent identity ownership, cross-host metric isolation, and multi-tenant reload/SSH boundaries without changing public API contracts.
2026-11-24 17:09:37 +00:00
rcourtman
fa8e3acb32 Show node history on row hover, temperature included
The Proxmox page shares one View control between the node table and the
guest table, but only passed the bars/sparklines mode and the range to
the node table. Row-hover History therefore worked on guest rows and did
nothing on node rows, and neither hover nor Trends charted the Temp
column, so an operator looking at a node at 94°C could not tell a steady
reading from a spike without opening the drawer.

The node table now takes the page's row-hover mode. In History hover a
hovered node row swaps CPU, memory, disk and temperature to sparklines
that share one cursor, as guest rows do; Details hover keeps the bars.
Trends charts temperature on every node row. The node history reader
starts on the first hover, so a page nobody hovers reads no node history.

/api/charts/infrastructure accepts temperature as an opt-in metric. The
default payload is unchanged; node and agent host series return stored
temperature history only when a caller asks for it. Temperature
sparklines scale around their own readings with a 25° minimum span, so
a steady 60°C reads as flat rather than pinned near the top.
2026-11-17 19:09:21 +00:00
pulse-triage[bot]
a371bab641 Isolate the chart node-inventory allocation guard
Keep the original five-sample, ten-allocation budget, but measure the real builder with the same sensor-heavy nodes and no unrelated chart payload. Execute the allocation check in its own copy of the test binary, retaining race instrumentation, and require its completion and a positive control showing that the fixture detects the original node-snapshot copying. Keep the populated handler oracle and benchmark fixture unchanged.

Contract-Neutral: Test-only measurement isolation and a positive regression control; no runtime, API, wire, selection, cache, authorization, persistence or rendered behavior change.
Change-source: pulse-maintainer
2026-11-10 16:57:02 +00:00
pulse-triage[bot]
2e48f9a19b Drop the chart filter's obsolete node-model import
Correct the exact-source compiler failure from source-pnk167jr after the node filter stopped materializing model snapshots. No runtime logic or assertions change.

Contract-Neutral: Remove one unused Go import only; no behavior or contract delta.
Change-source: pulse-maintainer
2026-11-10 15:23:08 +00:00
pulse-triage[bot]
13311ab9f8 Avoid cloning node inventories for workload chart filters
Read the existing node view's source ID, native name and instance instead of materializing every node's sensor and network inventory on each uncached workload-chart response. Preserve source-ID precedence, global fallback and every existing family filter. Add real-handler membership, value, cache, ownership and allocation-scaling controls and a reproducible node-inventory benchmark.

Contract-Neutral: Internal chart preparation cost only; resource selection rules, identities, timestamps, values, point budgets, wire fields, caching, history usage, access, persistence and rendered behavior are unchanged.
Change-source: pulse-maintainer
2026-11-10 15:10:14 +00:00
pulse-triage[bot]
10a2652550 Bind the batch chart handler oracle to family metric sets
Keep empty series in the reference comparison, matching the VM/system-container, Kubernetes and app-container metric requests already used by the unchanged handler. Preserve exact observation, value, oldest, identity, count and cached-byte assertions.

Contract-Neutral: Test oracle only; no runtime or public contract change.
Change-source: pulse-maintainer
2026-11-10 13:41:27 +00:00
pulse-triage[bot]
f1a7458066 Reuse chart sampling scratch across one workload response
Share timestamp and index selection across workload families only within one synchronous response conversion. Compare every timestamp and the point budget before reuse; keep all values and wire slices detached. Cover cap transitions, divergent interiors, ownership, real handler payloads and the 70-workload allocation reduction in the normal Go tests.

Contract-Neutral: Response-local timestamp/index scratch only; chart routes, identities, scope, values, selected observations, bounds, fallbacks, JSON and cache lifetimes are unchanged.
Change-source: pulse-maintainer
2026-11-10 13:33:37 +00:00
pulse-triage[bot]
b240c38530 Reuse chart point selection for identical metric timelines
Check every timestamp before reusing selected indices within one conversion, avoiding repeated bucket work without sharing values or retaining a cross-request cache. Keep mixed cadence, unsorted observations, oldest metadata and detached wire points covered by the parent oracle.

Contract-Neutral: Chart identity, scope, values, selected observations, sampling limits, oldest metadata, fallback and cache lifetimes are unchanged; only local conversion scratch and index selection are reused.
Change-source: pulse-maintainer
2026-10-25 14:22:35 +00:00
pulse-triage[bot]
c93757fb4b Keep absent host disk readings out of live charts and history
Share canonical disk admission with host-agent recording and fallback, preserve measured zero and recorded observations, and check both History and summary routes.

Change-source: pulse-maintainer
Contract-Neutral: Restore existing canonical disk-presence semantics; no new API, authentication, identity, persistence schema or retention contract.
2026-10-24 19:59:18 +01:00
rcourtman
bc5491b6d1 Withdraw cached live history when agent reporting stops
An open drawer could retain a current-only reply after its agent entered
the first-report wait. Withdraw live snapshots immediately and refresh on
reporting transitions while preserving real stored observations.

Integrate published main while retaining the webhook acknowledgement and
chart optimizations. Keep guest metric admission under provider ownership.

Refs #2980
2026-10-24 17:51:28 +01:00
rcourtman
ddaedc8c78 Keep unreported chart fallbacks empty after lease expiry
An expired saved enrollment still has no current telemetry. Keep summary
charts from turning that deadline into zero-valued live samples, while
preserving real stored history. Cover both sides of the reporting lease
and align the remaining pending-label assertions with the shared wording.

Refs #2980
2026-10-24 17:23:25 +01:00
rcourtman
5f0037fc25 Show agents awaiting a report after server restart
Keep retained enrollments unknown while their accepted-report lease is
current, then show offline if no fresh report arrives. Preserve historical
timestamps, removals and report ordering without manufacturing telemetry.
Use the shared first-report state in Machines, resource details and Settings.

Refs #2980
2026-10-24 16:45:39 +01:00
pulse-triage[bot]
bf9f0ed982 Cap retained chart observations before allocating wire points
Share the existing time-nearest selection by original indices, so chart conversion materialises only selected observations. Preserve exact timestamps, values, tie breaks, degenerate spans and oldest-source metadata. Check the frozen former sampler across 1,440 cases and the exported fallback contract.

Change-source: pulse-maintainer
Contract-Neutral: Exact chart observations, wire schema, sampling policy and guest/storage lifecycle contracts are unchanged; only index selection and allocation order change.
2026-10-24 14:08:51 +01:00
rcourtman
84226ad7bc Count successful history reads beyond seven days
Measure delivered extended history before changing free and paid features.
Count only successful responses containing an older metric point and retain
only bounded daily totals. Expose the rolling sum through schema v19 and
Preview with matching privacy disclosure and explicit report coverage.
2026-10-16 19:21:03 +01:00
rcourtman
4a0a05858d Remove the summary chart routes no client calls
GET /api/charts/workloads-summary has had no first-party caller since
the v6 import: ChartsAPI.getWorkloadsSummaryCharts arrived with it and
nothing ever called it. GET /api/charts/storage-summary lost its last
reader when storageSummaryTrendCache.ts was deleted on 2026-05-26.
Both still cost something. The workloads route carried a payload cache,
an SLO test in the release latency gate and a benchmark, and mock mode
rebuilt the 24-hour storage aggregate on every sampler tick for a cache
nothing read.

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 (a list of common
endpoints, not a complete one), and pulse-pro, pulse-mobile and
pulse-dev-infra never call them. A monitoring:read token could reach
them, so a private script may notice, but nothing known depends on
them. pulse-enterprise names the SLO test only as fixture data, and its
latency gate passes a test that is absent from the candidate as
removed. So the routes go with their clients:
handlers, response types, the monitor trend helpers, the mock aggregate
and its prewarm, the SLO budget, the benchmark, and the ChartsAPI
methods and types. Requests to either path now get 404.
buildMockWorkloadMetricHistorySeries goes too, because the
workloads-summary handler was its only production caller.

A TypeScript reference graph from src/index.tsx finds no production
reference to the removed methods or types. The production build loses
only the two static methods from the ChartsAPI chunk (326 B raw, 49 B
gzip); every other file differs only by chunk hashes and SRI values.
deadcode ./cmd/pulse and golangci unused report nothing newly
unreachable. On private mock stacks the Proxmox overview in Trends, a
guest History drawer and the storage page make the same chart requests
before and after at 1440 and 390 px, and neither build requested the
removed routes.

Contract prose that still described either route as live now records
the retirement, and the workload chart guard pins the per-type metric
sets the surviving /api/charts/workloads route requests.
2026-10-07 23:14:49 +01:00
pulse-triage[bot]
68887f7114 Bound chart response cache retention 2026-08-30 12:55:50 +01:00
rcourtman
74d0895e6e Fix mock storage history continuity
Contract-Neutral: Storage history behavior is documented in the staged API and storage contracts and covered by staged focused regressions; shared router references do not change agent-lifecycle, performance, or security contracts, and the proof allowlists do not yet name the focused test files.
2026-08-26 13:54:55 +01:00
rcourtman
08827bb887 Extract chart and resource query services 2026-08-21 18:36:21 +01:00