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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Normalize relationship terminology
rcourtmanbdaa2bd525be
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 7614aea5e6..83a387de39 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -253,11 +253,11 @@ prefixing, and change-type labels without re-implementing the markdown shape.Those unified-resource action and export audit records are now also exposedthrough the enterprise audit read surface so operators can inspect theexecution trail without reaching into storage internals.-AI resource and incident context now also surfaces a canonical resource-graph+AI resource and incident context now also surfaces a canonical relationshipsection from unified-resource relationships, so relationship wording and edgeprovenance stay aligned with the same shared resource model instead of beingreconstructed from the drawer or prompt helpers.-That graph section is now rendered by the shared+That relationship section is now rendered by the shared`internal/unifiedresources.FormatResourceGraphContext` helper, so the servicelayer only resolves the canonical resource and does not rebuild the sectionformat locally.diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.mdindex 37a91daba1..292b3106ee 100644--- a/docs/release-control/v6/internal/subsystems/alerts.md+++ b/docs/release-control/v6/internal/subsystems/alerts.md@@ -75,6 +75,13 @@ list of services, labels, descriptions, and mention-copy metadata.The WebhookConfig editor now imports the shared webhook template API typedirectly so it does not retain a local duplicate shape for chooser metadata.+Alert spec validation still accepts the explicit migration-bridge resource+types (`node`, `agent-disk`, `docker-host`, `backup-subject`,+`proxmox-disk`), but any other non-canonical type string is rejected before+it can reach alert persistence. That keeps alert routing aligned with the+canonical unified resource model instead of silently normalizing legacy type+aliases inside the alert layer.+Frontend alert surfaces and backend alert-support files now require explicitregistry path-policy coverage, so new alert-owned runtime files must be mappedto a concrete proof route instead of silently inheriting subsystem-defaultdiff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex 4e00c8112f..1f5a02d21e 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -96,17 +96,17 @@ fallback paths.helper, so the detector-owned summary API and the Patrol fallback prompt pathstay aligned on the same markdown shape.Those same Patrol-owned prompt contexts now also surface a canonical-resource-graph section from unified-resource relationships, so edge labels,-directionality, and provenance stay aligned with the shared graph model+relationship section from unified-resource relationships, so edge labels,+directionality, and provenance stay aligned with the shared relationship modelinstead of being reconstructed locally.-That graph section is now rendered by the shared+That relationship section is now rendered by the shared`internal/unifiedresources.FormatResourceGraphContext` helper, so the Patrol-runtime only resolves the canonical resource graph rather than formatting the+runtime only resolves the canonical relationship context rather than formatting therelationship section itself.Patrol-owned correlation context now also comes through the shared AIintelligence facade before reaching the detector, so the learned correlationsurface is routed through the same canonical AI ownership boundary as recent-changes and resource graph data instead of being pulled from the detector+changes and relationship data instead of being pulled from the detectordirectly in each caller.The Patrol seed context and AI runtime prompt path now also share the samecorrelation summary formatter from `internal/ai/correlation`, so learned-edgediff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 91f8fdf435..1620cb7902 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -733,7 +733,7 @@ locally, so storage and recovery views see the same policy posture the APIpublishes. The same hook and the resource-identity helpers it depends on nowshare the canonical trimmed-string utility instead of each surface rebuildingits own whitespace cleanup, so storage and recovery identity checks stay-aligned with the other resource-graph consumers. That same boundary now also+aligned with the other unified-resource consumers. That same boundary now alsoowns the backend facet-bundle route for timeline history and related changecounts, so storage and recovery surfaces must continue to consume the sharedbundle rather than issuing separate local resource-detail fetches.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex f89075e603..cc85f02650 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -146,7 +146,7 @@ helpers or drawer-specific markdown.That same resource model now also owns the canonical`FormatResourceGraphContext` helper, so service-layer callers only resolve theresource and hand the model the relationship list instead of rebuilding the-graph section header, ordering, or freshness wording locally.+relationship section header, ordering, or freshness wording locally.The same shared relationship presenter also owns the compact change-timelinerelationship summary used by resource change records, so change `from` and`to` values stay aligned with the canonical relationship labels instead of@@ -441,8 +441,8 @@ instead of `"myserver"`.The infrastructure summary surfaces now use the shared normalized identitylookup helper for these matches, so dotted hostnames such as`tower.example.local` collapse to the same canonical lookup variants as the-resource table and resource graph surfaces instead of each view inventing its-own comparison rule.+resource table and resource detail surfaces instead of each view inventing+its own comparison rule.The same identity surfaces also share the trimmed-string helper from`frontend-modern/src/utils/stringUtils.ts` so resource-id, hostname, andlinked-node normalization keep the same fail-closed whitespace trimming rulesdiff --git a/internal/ai/correlation/rootcause.go b/internal/ai/correlation/rootcause.goindex a668e145c4..4cfafcd095 100644--- a/internal/ai/correlation/rootcause.go+++ b/internal/ai/correlation/rootcause.go@@ -14,8 +14,8 @@ import ()// RelationshipType and ResourceRelationship are aliases to the canonical-// unified-resource graph model so root-cause correlation consumes the same-// edge vocabulary as the rest of the platform.+// unified-resource relationship model so root-cause correlation consumes the+// same edge vocabulary as the rest of the platform.type RelationshipType = unifiedresources.RelationshipTypetype ResourceRelationship = unifiedresources.ResourceRelationshipdiff --git a/internal/ai/coverage_increase_test.go b/internal/ai/coverage_increase_test.goindex 8cdd122444..2e5f86a073 100644--- a/internal/ai/coverage_increase_test.go+++ b/internal/ai/coverage_increase_test.go@@ -479,7 +479,7 @@ func TestService_BuildIncidentContext(t *testing.T) {}}-func TestService_BuildResourceGraphContext_UsesCanonicalReadState(t *testing.T) {+func TestService_BuildRelationshipContext_UsesCanonicalReadState(t *testing.T) {now := time.Now()s := NewService(nil, nil)ps := NewPatrolService(nil, nil)@@ -534,9 +534,20 @@ func TestService_BuildResourceGraphContext_UsesCanonicalReadState(t *testing.T)})ps.SetCorrelationDetector(corr)+ graphContext := s.buildResourceGraphContext(resourceID)+ if !strings.Contains(graphContext, "### Resource Graph") {+ t.Fatalf("expected canonical relationship context to include graph heading, got %q", graphContext)+ }+ if !strings.Contains(graphContext, "Runs on") {+ t.Fatalf("expected canonical relationship context to include relationship label, got %q", graphContext)+ }+ if !strings.Contains(graphContext, "metadata present") {+ t.Fatalf("expected canonical relationship context to include shared metadata marker, got %q", graphContext)+ }+resourceCtx := s.buildEnrichedResourceContext(resourceID, "", nil)if !strings.Contains(resourceCtx, "Resource Graph") {- t.Fatalf("expected enriched resource context to include graph section, got %q", resourceCtx)+ t.Fatalf("expected enriched resource context to include relationship section, got %q", resourceCtx)}if !strings.Contains(resourceCtx, "Runs on") {t.Fatalf("expected enriched resource context to include canonical relationship label, got %q", resourceCtx)@@ -545,7 +556,7 @@ func TestService_BuildResourceGraphContext_UsesCanonicalReadState(t *testing.T)t.Fatalf("expected enriched resource context to include provenance, got %q", resourceCtx)}if !strings.Contains(resourceCtx, "metadata present") {- t.Fatalf("expected enriched resource context to include shared graph metadata marker, got %q", resourceCtx)+ t.Fatalf("expected enriched resource context to include shared relationship metadata marker, got %q", resourceCtx)}if !strings.Contains(resourceCtx, "Resource Correlations") {t.Fatalf("expected enriched resource context to include correlation section, got %q", resourceCtx)@@ -556,7 +567,7 @@ func TestService_BuildResourceGraphContext_UsesCanonicalReadState(t *testing.T)incidentCtx := s.buildIncidentContext(resourceID, "")if !strings.Contains(incidentCtx, "Resource Graph") {- t.Fatalf("expected incident context to include graph section, got %q", incidentCtx)+ t.Fatalf("expected incident context to include relationship section, got %q", incidentCtx)}if !strings.Contains(incidentCtx, "Runs on") {t.Fatalf("expected incident context to include canonical relationship label, got %q", incidentCtx)diff --git a/internal/ai/service.go b/internal/ai/service.goindex b02279d2ee..9bb127206e 100644--- a/internal/ai/service.go+++ b/internal/ai/service.go@@ -4822,7 +4822,7 @@ func (s *Service) buildEnrichedResourceContext(resourceID, _ string, currentMetrsections = append(sections, recentChanges)}- // Get canonical resource graph context from unified resources.+ // Get canonical relationship context from unified resources.if graphContext := s.buildResourceGraphContext(resourceID); graphContext != "" {sections = append(sections, graphContext)}diff --git a/internal/alerts/specs/types.go b/internal/alerts/specs/types.goindex 05444db888..6aa6a9f753 100644--- a/internal/alerts/specs/types.go+++ b/internal/alerts/specs/types.go@@ -1081,7 +1081,7 @@ func isKnownResourceType(rt unifiedresources.ResourceType) bool {return false}// "node", "agent-disk", "docker-host", "backup-subject", and "proxmox-disk" remain migration bridges while- // live alerts are still keyed separately from the canonical unified resource graph.+ // live alerts are still keyed separately from the canonical unified resource model.if rt != unifiedresources.ResourceType("node") &&rt != unifiedresources.ResourceType("agent-disk") &&rt != unifiedresources.ResourceType("docker-host") &&diff --git a/internal/alerts/specs/types_test.go b/internal/alerts/specs/types_test.goindex c4f22e36e3..b28343aee2 100644--- a/internal/alerts/specs/types_test.go+++ b/internal/alerts/specs/types_test.go@@ -339,6 +339,31 @@ func TestResourceAlertSpecValidateAllowsProxmoxDiskMigrationBridgeType(t *testin}}+func TestResourceAlertSpecValidateRejectsNonCanonicalAlias(t *testing.T) {+ t.Parallel()++ spec := ResourceAlertSpec{+ ID: "node-pve1-cpu",+ ResourceID: "node/pve-1",+ ResourceType: unifiedresources.ResourceType("Node"),+ Kind: AlertSpecKindMetricThreshold,+ Severity: AlertSeverityWarning,+ MetricThreshold: &MetricThresholdSpec{+ Metric: "cpu",+ Direction: ThresholdDirectionAbove,+ Trigger: 85,+ },+ }++ err := spec.Validate()+ if err == nil {+ t.Fatal("expected validation error")+ }+ if !strings.Contains(err.Error(), "canonical unified resource type") {+ t.Fatalf("unexpected error: %v", err)+ }+}+func TestResourceAlertSpecValidateRejectsPayloadKindMismatch(t *testing.T) {t.Parallel()diff --git a/internal/unifiedresources/code_standards_test.go b/internal/unifiedresources/code_standards_test.goindex 93291b102c..646c0dd4fe 100644--- a/internal/unifiedresources/code_standards_test.go+++ b/internal/unifiedresources/code_standards_test.go@@ -652,6 +652,7 @@ func TestResourceGraphContextUsesCanonicalRelationshipPresentation(t *testing.T)requiredSnippets := []string{"func (s *Service) buildResourceGraphContext(resourceID string) string","if graphContext := s.buildResourceGraphContext(resourceID); graphContext != \"\" {",+ "Get canonical relationship context from unified resources.","unifiedresources.FormatResourceGraphContext(resource, 3)","unifiedresources.FormatResourceRecentChangesContext(changes, false, \"###\")","type canonicalResourceGetter interface {",