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.

Label policy counts canonically

rcourtmandcbfd8c76c18
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 0d1cc12644..feb84fd0a5 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -188,8 +188,9 @@ That posture snapshot must render redaction labels through the canonical
unified-resource hint order, not alphabetically, so the AI summary, drawer,
and any future policy surfaces all present the same redaction precedence.
Its sensitivity and routing counts must also follow the canonical
-unified-resource order, so both the backend summary and the frontend policy
-card stay aligned on the same presentation sequence.
+unified-resource order and shared human-readable labels, so both the backend
+summary and the frontend policy card stay aligned on the same presentation
+sequence.
The resource-intelligence payload used by the resource drawer also carries
the same canonical policy posture snapshot, so the detail surface can show
governed posture context without inventing a second posture contract.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index a90ca684fc..706f836997 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -405,8 +405,9 @@ Those helpers now own the canonical redaction-hint order and count-to-label
projection, so the AI summary and any other backend policy posture surface do
not re-sort redaction labels locally.
They also own the canonical sensitivity and routing order used to format
-policy-posture counts, so the AI summary and frontend policy card both read
-the same presentation sequence from the shared resource model.
+policy-posture counts and human-readable labels, so the AI summary and
+frontend policy card both read the same presentation sequence from the shared
+resource model.
Canonical resources now carry first-class graph-expansion fields: `Capabilities`
(bounded action definitions with approval levels), `Relationships` (typed
inter-resource links with direction and confidence), and `RecentChanges` (typed
diff --git a/internal/ai/resource_context.go b/internal/ai/resource_context.go
index e13239fb41..11e11e07e3 100644
--- a/internal/ai/resource_context.go
+++ b/internal/ai/resource_context.go
@@ -126,14 +126,14 @@ func (s *Service) buildUnifiedResourceContextForModel(destinationModel string) s
sensitivityParts := make([]string, 0, len(unifiedresources.ResourceSensitivityOrder))
for _, sensitivity := range unifiedresources.ResourceSensitivityOrder {
sensitivityParts = append(sensitivityParts, fmt.Sprintf("%d %s",
- sensitivityCounts[sensitivity], sensitivity))
+ sensitivityCounts[sensitivity], unifiedresources.ResourceSensitivityLabel(sensitivity)))
}
sections = append(sections, fmt.Sprintf("- Sensitivity: %s", strings.Join(sensitivityParts, ", ")))
routingParts := make([]string, 0, len(unifiedresources.ResourceRoutingScopeOrder))
for _, scope := range unifiedresources.ResourceRoutingScopeOrder {
routingParts = append(routingParts, fmt.Sprintf("%d %s",
- routingCounts[scope], scope))
+ routingCounts[scope], unifiedresources.ResourceRoutingScopeLabel(scope)))
}
sections = append(sections, fmt.Sprintf("- Routing: %s", strings.Join(routingParts, ", ")))
sections = append(sections, fmt.Sprintf("- Local-only resources: %d", localOnlyCount))
diff --git a/internal/ai/resource_context_test.go b/internal/ai/resource_context_test.go
index 2a4d907d8d..939be2f3a2 100644
--- a/internal/ai/resource_context_test.go
+++ b/internal/ai/resource_context_test.go
@@ -222,8 +222,8 @@ func TestBuildUnifiedResourceContext_FullContext(t *testing.T) {
assertContains("## Unified Infrastructure View")
assertContains("Total resources: 11 (Infrastructure: 5, Workloads: 6)")
assertContains("Data Governance")
- assertContains("Sensitivity: 0 public, 5 internal, 6 sensitive, 0 restricted")
- assertContains("Routing: 5 cloud-summary, 6 local-first, 0 local-only")
+ assertContains("Sensitivity: 0 Public, 5 Internal, 6 Sensitive, 0 Restricted")
+ assertContains("Routing: 5 Cloud Summary, 6 Local First, 0 Local Only")
assertContains("Policy Redaction Hints")
assertContains("Redactions in use: Hostname, IP Address, Platform ID, Alias")
assertContains("Proxmox VE Nodes")