Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Compose retained TrueNAS disk display repair with current disk policy

pulse-triage[bot]c9d17b81b18d
diff --cc docs/release-control/v6/internal/subsystems/alerts.md
index 2c498bb9ac,175705c6b0..61fb8cae35
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@@ -2069,11 -2069,13 +2069,13 @@@ Disks Global Defaults cell reads `By ty
default switches the policy off, and switching it on then stages an explicit
TrueNAS-wide 55 because unset would stay off. Each disk row inherits its type's
trigger from the unsaved editor state (`resolveTrueNASDiskTemperatureDefault`).
- The TrueNAS disk drawer tones a current reading from the same per-type trigger
- (`getDiskTemperatureThresholds` passed into `buildTrueNASDetailSections`), so it
- no longer judges heat from a fixed 55C. Judges that still differ: the TrueNAS
- storage table and drawer do not apply a TrueNAS-wide value or per-disk
- override.
+ The TrueNAS storage table and disk drawer now judge current disk heat through
+ `getTrueNASDiskTemperatureThresholds(disk)`: the disk's canonical-ID temperature
+ override, then a TrueNAS-wide value, then the per-type policy. Disabled disks
+ or TrueNAS Disks defaults and explicit Off values leave readings unjudged;
+ retained values never count as current heat. The API-only disk does not inherit
-a host Disk Temp override or the agent alerts switch. Patrol/AI still use the
-older host-oriented resolver; Core owns their separate reconciliation.
++a host Disk Temp override or the agent alerts switch. Patrol/AI use the disk-specific backend resolver described below; the
++frontend and backend retain their own verification boundaries.
`TestTrueNASDiskTemperatureAlertsFollowDiskTemperaturePolicy` and
`TestTrueNASDiskTemperatureAlertIgnoresRetainedReading` in
`internal/alerts/unified_eval_test.go` pin the tiers and retained readings;
@@@ -4476,26 -4478,19 +4478,43 @@@ Existing snapshot, persistence, partial
required. This is source ownership acceptance, not installed notification or
guest-agent recovery evidence.
+### TrueNAS disk heat policy for Patrol and Assistant
+
+`Manager.TrueNASDiskTemperatureThreshold(resourceID, diskType)` resolves the
+`truenas-disk` tiers of `effectiveAlertPolicyNoLock`: the disk's canonical or
+identity-resolved override, then TrueNAS Disks defaults, then disk-type policy.
+A disabled disk/default or non-positive trigger leaves no heat policy.
+Global/platform alert switches silence alert evaluation without changing this
+policy, matching existing agent-disk semantics. Callers receive a copy; config
+normalisation, saved Off/custom/inherited values and alert severity are unchanged.
+`IsTrueNASDiskResource` uses the evaluator's classification, including merged
+agent/TrueNAS disks. Patrol/Assistant do not walk those disks to a synthetic
+TrueNAS system agent and accidentally apply an unrelated host override.
+Retained temperature readings remain unjudged, not affirmative recovery.
+
+Verification: `TestTrueNASDiskTemperatureThresholdMatchesTrueNASDiskAlerts`
+and `TestIsTrueNASDiskResourceMatchesTheUnifiedEvaluator` in
+`internal/alerts/threshold_resolution_shared_test.go` cover tier, identity,
+Off/disabled, untyped, clone and nil-manager compatibility.
+`TestAlertThresholdAdapter_TrueNASDiskTemperatureFollowsItsAlertTiers` and
+`TestPatrolJudgesTrueNASDisksByTheirAlertTiers` cover adapter, Patrol triage,
+verification and Assistant context while preserving agent-host overrides.
- Frontend table/drawer tiers remain a separate Web-owned change; this backend
- repair does not establish browser or native appliance acceptance.
++Frontend table/drawer tiers use the Web resolver described below; these
++backend tests do not establish browser or native appliance acceptance.
++
+ ### TrueNAS disk display reconciliation (8 October 2026)
+
+ The TrueNAS storage table and inline resource drawer resolve temperature by
+ the disk resource's own `temperature` override, then `truenasDiskDefaults`,
+ then the per-type disk policy. Explicit zero/negative thresholds or a disabled
+ disk/TrueNAS default leave readings visible but unjudged. Host `diskTemperature`
+ overrides and the agent alerts switch do not control API-only TrueNAS disks.
+ The shared agent disk resolver and Proxmox `pulse-relaxed` guest resolution
+ remain unchanged. Existing Off-save normalization and inherited TrueNAS
+ threshold editors on main are retained, not replaced by the older PR stack.
+
+ Verification: `src/utils/__tests__/metricThresholds.test.ts`,
+ `src/features/truenas/__tests__/TrueNASStorageTopologyTable.test.tsx` and the
+ production table/drawer fixture `browser-tests/truenas-disk-thresholds.cjs`.
-Patrol/runtime reconciliation remains a separate Core-owned change; this
-frontend candidate does not establish native appliance or notification recovery.
++The containing backend also resolves the disk-specific tiers for Patrol.
++Frontend checks do not establish native appliance or notification recovery.
diff --cc docs/release-control/v6/internal/subsystems/unified-resources.md
index f3d693dd8e,4a8c857e8c..937effd895
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@@ -7529,26 -7368,16 +7529,40 @@@ system into a VM across repeated recor
sources than it first brought. `TestResourceAPIReportMergeExcludesRegistryLinkFolds`
keeps the handler on the registry's fold record.
+### Reconciled node-agent relink fold bookkeeping
+
+A declared node-agent join can consume one split row before its newer
+operator relink is applied. The relink records that side's ID and source in
+the current holder-bound `ManualLinkFold` index, so identity-pin succession
+keeps the operator decision and the resources API seed retains the same fold
+for report-merge. No synthetic telemetry, identity key, enrollment or service
+link is added. `TestOperatorSplitOverridesProxmoxNodeAgentLink` checks that
+the monitor and its re-ingested API seed retain the fold across all split
+shapes, then survive pin persistence and a repeated split.
+
+### TrueNAS disk policy consumers use the disk's alert identity
+
+The AI/Patrol physical-disk consumers classify TrueNAS disks through
+`alerts.IsTrueNASDiskResource`, the same classifier as unified alert evaluation.
+They resolve temperature policy under the disk's canonical resource ID, not its
+parent system's synthetic agent ID. Merged agent/TrueNAS disks retain that
+classification; ordinary agent disks still follow their reporting host's policy.
+Registry identity, source precedence and retained-reading semantics are unchanged.
+`TestIsTrueNASDiskResourceMatchesTheUnifiedEvaluator` and
+`TestPatrolJudgesTrueNASDisksByTheirAlertTiers` exercise the unified registry
- projection and its consumer boundaries. Table/drawer frontend acceptance remains
- with Web, not established by these backend tests.
++projection and its consumer boundaries. Table/drawer frontend acceptance is described below and remains
++separate from these backend tests.
++
+ ### TrueNAS disk-specific heat presentation (8 October 2026)
+
+ `TrueNASDiskTemperatureThresholdResolver` receives the disk resource (including
+ its canonical ID), not just a disk type. The table's status dot, reason,
+ Attention filter/count and drawer temperature row use the same resolved tiers.
+ A retained temperature is not current heat under any override. Changing alert
+ configuration updates those judgments without changing inventory identity.
+
+ Verification: `truenasPageModel.test.ts`,
+ `resourceDetailDrawerTrueNASModel.coverage2.test.ts` and
+ `browser-tests/truenas-disk-thresholds.cjs` cover disk overrides, TrueNAS-wide
+ limits, Off and last-known readings. Synthetic browser observations do not
+ establish sustained native metrics, History, revocation or release availability.