diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.md index 98cae51d05..95abd650ac 100644 --- a/docs/release-control/v6/internal/subsystems/monitoring.md +++ b/docs/release-control/v6/internal/subsystems/monitoring.md @@ -27,13 +27,13 @@ projection converter. Conversion sorts final frontend rows beside precomputed keys instead of retaining an estate-sized array of conversion inputs. This must preserve canonical identity, parent/action targets, catalogs, ordering, ignore surfaces and source isolation. No timestamp/generation cache is added: -metrics, labels, alert state, metadata clears and time-sensitive health continue +metrics, tags, alert state, metadata clears and time-sensitive health continue to be evaluated on each requested broadcast. `TestBroadcastProjectionMatchesPreviousPipeline` compares full JSON with the pre-repair conversion/sort/coalesce pipeline on split hosts and mixed workloads. `TestBroadcastProjectionListsRegistryOnceAndKeepsLiveChanges` pins one registry -list and verifies same-freshness metric/label changes, live alerts, ignored +list and verifies same-freshness metric/tag changes, live alerts, ignored hosts and immutable prior projections. The 1,000-resource broadcast benchmark includes real registry cloning, projection, encoding, per-client deltas and queues with zero/one/four viewers, not persistence, transport or installed CPU. diff --git a/internal/monitoring/canonical_guardrails_test.go b/internal/monitoring/canonical_guardrails_test.go index be2f8adeb2..29ee0fb7b1 100644 --- a/internal/monitoring/canonical_guardrails_test.go +++ b/internal/monitoring/canonical_guardrails_test.go @@ -2921,7 +2921,7 @@ func TestBroadcastProjectionMatchesPreviousPipeline(t *testing.T) { for i, name := range []string{"zebra", "Alpha", "alpha", "", "尾"} { parent := "agent-api" resources = append(resources, unifiedresources.Resource{ - ID: fmt.Sprintf("vm-%d", i), Type: unifiedresources.ResourceTypeVM, Name: name, DisplayName: name, + ID: fmt.Sprintf("vm-%d", i), Type: unifiedresources.ResourceTypeVM, Name: name, ParentID: &parent, Status: unifiedresources.StatusOnline, LastSeen: now, Proxmox: &unifiedresources.ProxmoxData{NodeName: "tower.local", VMID: i + 100}, Sources: []unifiedresources.DataSource{unifiedresources.SourceProxmox}, diff --git a/internal/monitoring/monitor_host_agents_test.go b/internal/monitoring/monitor_host_agents_test.go index 0232b58b56..264f4b9c4b 100644 --- a/internal/monitoring/monitor_host_agents_test.go +++ b/internal/monitoring/monitor_host_agents_test.go @@ -6660,9 +6660,9 @@ func TestBroadcastProjectionListsRegistryOnceAndKeepsLiveChanges(t *testing.T) { oldCPU := first.Resources[0].CPU.Current changed := store.GetAll() // Keep LastSeen/overall freshness unchanged: a timestamp-only cache would - // miss these metric/status/label changes. + // miss these metric/status/tag changes. changed[0].Metrics.CPU.Value = 77 - changed[0].Labels = map[string]string{"new": "label"} + changed[0].Tags = []string{"new-tag"} changed[0].Status = unifiedresources.StatusOffline registry := unifiedresources.NewRegistry(nil) registry.IngestResources(changed) @@ -6680,7 +6680,7 @@ func TestBroadcastProjectionListsRegistryOnceAndKeepsLiveChanges(t *testing.T) { row = &second.Resources[i] } } - if row == nil || row.CPU.Current != 77 || row.Labels["new"] != "label" { + if row == nil || row.CPU.Current != 77 || len(row.Tags) != 1 || row.Tags[0] != "new-tag" { t.Fatalf("mutable row was stale: %#v", row) } if first.Resources[0].CPU.Current != oldCPU {