Pulse/internal/unifiedresources
rcourtman ef2569b1fc Pick cluster-scoped swarm dedupe winners deterministically
In a multi-manager swarm every manager reports the same cluster-scoped
objects (services, nodes, secrets, configs), and the registry dedupe
picked the candidate whose host had the freshest LastSeen. That ordering
flips between polls, so the winner alternated: swarm node resources
re-parented to whichever manager won (ParentID tracks the reporting
host), and services flipped name/status/updateStatus whenever the
managers' views differed slightly. Every rebuild then wrote phantom
relationship_change / state_transition / config_update rows into
resource_changes, the same class of churn as the registry-rebuild spam
fixed in 74131e56e. Mock mode had the same symptom and was fixed by
pinning a single reporting leader, but real deployments still hit this.

Select winners deterministically instead: richer candidate fields first
(unchanged intent), then managers with an available control plane, and
freshness only when the gap exceeds the docker stale threshold, i.e.
the losing manager has genuinely gone quiet; otherwise the lowest host
ID wins as a stable tiebreak. Equal candidates can no longer alternate.

Regression test rebuilds the registry across polls with two managers,
jittered LastSeen ordering, flipped snapshot host order, and slightly
divergent service views, asserting no change emission; it fails against
the old LastSeen-ordering rule with the exact swarm-node re-parenting
seen in production.
2026-07-08 09:35:56 +01:00
..
actions.go Align action audit verification projection 2026-05-13 18:36:00 +01:00
actions_test.go Align action audit verification projection 2026-05-13 18:36:00 +01:00
activity_changes.go Project VMware activity onto canonical timelines 2026-03-30 21:29:54 +01:00
adapter_coverage_test.go Align resource staleness with poll cadence 2026-07-03 09:05:12 +01:00
adapters.go Surface agent auth failures and staleness instead of a silent 401 loop 2026-07-08 08:35:46 +01:00
adapters_test.go Surface agent auth failures and staleness instead of a silent 401 loop 2026-07-08 08:35:46 +01:00
audit_redaction.go Redact legacy action audit verification details 2026-05-13 21:50:56 +01:00
audit_redaction_test.go Redact action verification audit details 2026-05-13 21:20:59 +01:00
availability_link_test.go feat: attach availability checks as facet on known resource row 2026-06-26 12:16:11 +01:00
canonical_id_pins.go fix(resources): pin canonical host IDs to durable identity so they survive restarts 2026-06-11 08:33:00 +01:00
canonical_identity.go Expand Docker runtime inventory coverage 2026-05-24 10:24:42 +01:00
canonical_identity_test.go Alert on expected QEMU guest agent outages 2026-07-02 23:52:02 +01:00
canonical_ids_types_test.go Fix physical disk SMART/Proxmox merge identity 2026-07-07 09:46:51 +01:00
capabilities.go Add Docker action readiness reasons 2026-06-12 23:58:24 +01:00
change_emission.go Fix no-op relationship_change spam from registry rebuilds 2026-07-08 08:10:15 +01:00
change_emission_test.go Fix no-op relationship_change spam from registry rebuilds 2026-07-08 08:10:15 +01:00
change_filters.go Project VMware activity onto canonical timelines 2026-03-30 21:29:54 +01:00
change_filters_test.go Project VMware activity onto canonical timelines 2026-03-30 21:29:54 +01:00
change_presentation.go Project VMware activity onto canonical timelines 2026-03-30 21:29:54 +01:00
change_presentation_test.go Project VMware activity onto canonical timelines 2026-03-30 21:29:54 +01:00
changes.go Add relationship-aware resource timelines 2026-04-25 22:07:57 +01:00
clone.go Carry host power sensor readings 2026-06-30 10:02:49 +01:00
clone_test.go Add vSphere network inventory 2026-05-22 20:26:56 +01:00
code_standards_test.go Fix no-op relationship_change spam from registry rebuilds 2026-07-08 08:10:15 +01:00
hostname_equivalence.go Fix QNAP host/docker monitored-system split 2026-04-21 22:11:13 +01:00
hostname_equivalence_test.go Fix QNAP host/docker monitored-system split 2026-04-21 22:11:13 +01:00
identity.go Stabilize v6 release dry-run backend gate 2026-06-03 18:12:42 +01:00
identity_extended_test.go Stabilize v6 release dry-run backend gate 2026-06-03 18:12:42 +01:00
identity_test.go Stabilize v6 release dry-run backend gate 2026-06-03 18:12:42 +01:00
ids.go fix(resources): pin canonical host IDs to durable identity so they survive restarts 2026-06-11 08:33:00 +01:00
ids_test.go fix(resources): pin canonical host IDs to durable identity so they survive restarts 2026-06-11 08:33:00 +01:00
incident_actions.go Implement VMware alert history slice 2026-03-30 19:45:29 +01:00
incident_categories.go Add agentless availability targets 2026-05-06 10:35:34 +01:00
incident_categories_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
incident_changes.go Implement VMware alert history slice 2026-03-30 19:45:29 +01:00
incident_impact.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
incident_labels.go Implement VMware alert history slice 2026-03-30 19:45:29 +01:00
incident_priority.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
incident_rollups.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
incidents.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
incidents_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
kubernetes_capabilities.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
kubernetes_metric_ids.go Fix Kubernetes demo chart history coverage 2026-04-10 23:40:13 +01:00
kubernetes_registry_test.go kubernetes(adapter): project pod QoS class into the unified resource 2026-06-11 18:57:38 +01:00
legacy_aliases.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
loop_reports.go Record maintenance evidence in resource timelines 2026-05-13 14:19:59 +01:00
loop_reports_store.go Make maintenance evidence writes atomic 2026-05-13 14:19:59 +01:00
loop_reports_store_test.go Make maintenance evidence writes atomic 2026-05-13 14:19:59 +01:00
metrics.go Fix Docker app-container percent normalization 2026-07-06 16:11:36 +01:00
metrics_targets.go fix(monitoring): prefer agent source for physical disk SMART metrics 2026-06-27 20:22:04 +01:00
metrics_targets_test.go fix(monitoring): prefer agent source for physical disk SMART metrics 2026-06-27 20:22:04 +01:00
metrics_test.go Fix Docker app-container percent normalization 2026-07-06 16:11:36 +01:00
mockmode_test.go Stabilize rc1 mock mode and metrics history 2026-04-11 16:47:37 +01:00
monitor_adapter.go Align resource staleness with poll cadence 2026-07-03 09:05:12 +01:00
monitor_adapter_read_state_test.go Fix physical disk SMART/Proxmox merge identity 2026-07-07 09:46:51 +01:00
monitored_system_projection.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
monitored_systems.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
monitored_systems_test.go Fix QNAP host/docker monitored-system split 2026-04-21 22:11:13 +01:00
pbs_pmg_registry_test.go Stabilize dev runtime and complete PMG read-state migration 2026-05-21 15:15:23 +01:00
pbs_rollups.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
pbs_rollups_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
physical_disk_ids.go Clarify storage topology and recovery guards 2026-05-14 20:51:32 +01:00
physical_disk_risk.go fix(truenas): project smart disk health into canonical risk 2026-03-30 04:45:22 +01:00
physical_disk_risk_test.go fix(truenas): project smart disk health into canonical risk 2026-03-30 04:45:22 +01:00
platform_scopes.go Add canonical platform scopes for runtime workloads 2026-05-20 19:30:55 +01:00
platform_scopes_test.go Add canonical platform scopes for runtime workloads 2026-05-20 19:30:55 +01:00
policy_metadata.go Recalibrate resource sensitivity: ordinary workloads aren't secret 2026-06-08 15:21:51 +01:00
policy_metadata_test.go Recalibrate resource sensitivity: ordinary workloads aren't secret 2026-06-08 15:21:51 +01:00
policy_posture.go Expose resource policy posture aggregation 2026-04-25 18:46:10 +01:00
policy_posture_test.go Recalibrate resource sensitivity: ordinary workloads aren't secret 2026-06-08 15:21:51 +01:00
policy_presentation.go Sanitize Assistant briefing handoffs 2026-05-06 21:01:55 +01:00
presentation_coalesce.go fix(unifiedresources): stop fabricating sightings and online stamps for never-seen resources 2026-06-11 10:23:49 +01:00
presentation_coalesce_test.go Surface agent auth failures and staleness instead of a silent 401 loop 2026-07-08 08:35:46 +01:00
privacy.go Centralize export decision helpers 2026-03-19 03:32:14 +00:00
privacy_test.go Centralize export decision helpers 2026-03-19 03:32:14 +00:00
proxmox_node_links.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
read_state.go feat(truenas): ingest apps as canonical workloads 2026-03-29 16:04:09 +01:00
registry.go Pick cluster-scoped swarm dedupe winners deterministically 2026-07-08 09:35:56 +01:00
registry_bench_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
registry_concurrency_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
registry_merge_policy_test.go Preserve Docker container metadata in unified resources 2026-06-11 21:03:14 +01:00
registry_test.go Fix physical disk SMART/Proxmox merge identity 2026-07-07 09:46:51 +01:00
relationship_presentation.go Surface Docker network attachments 2026-06-03 11:18:28 +01:00
relationship_presentation_test.go Surface Docker network attachments 2026-06-03 11:18:28 +01:00
relationships.go Surface Docker network attachments 2026-06-03 11:18:28 +01:00
resolve.go Implement VMware assistant mention floor 2026-03-30 22:44:34 +01:00
resolve_context.go Implement VMware assistant mention floor 2026-03-30 22:44:34 +01:00
resolve_test.go Implement VMware assistant mention floor 2026-03-30 22:44:34 +01:00
resolved_host_set.go Make K8s node identity enrichment fail safe 2026-03-19 04:42:17 +00:00
resolved_host_set_test.go Make K8s node identity enrichment fail safe 2026-03-19 04:42:17 +00:00
resource_operator_state.go Make maintenance evidence writes atomic 2026-05-13 14:19:59 +01:00
resource_operator_state_test.go Record maintenance evidence in resource timelines 2026-05-13 14:19:59 +01:00
retention_test.go fix(unifiedresources): add space reclamation and retention for all append-only tables 2026-06-27 18:38:56 +01:00
snapshot_source_filter.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
snapshot_source_filter_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
sort_order.go Stabilize demo resource ordering 2026-04-11 00:24:03 +01:00
sort_order_test.go Stabilize demo resource ordering 2026-04-11 00:24:03 +01:00
status.go Expand Kubernetes API-native inventory surfaces 2026-05-24 11:12:33 +01:00
status_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
storage_consumers.go Make vSphere datastores API-native 2026-05-22 07:38:57 +01:00
storage_consumers_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
storage_posture.go Prioritize Unraid parity-loss summaries 2026-04-15 16:33:04 +01:00
storage_posture_test.go Prioritize Unraid parity-loss summaries 2026-04-15 16:33:04 +01:00
storage_risk.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
storage_risk_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
store.go Fix no-op relationship_change spam from registry rebuilds 2026-07-08 08:10:15 +01:00
store_permissions_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
store_test.go Fix no-op relationship_change spam from registry rebuilds 2026-07-08 08:10:15 +01:00
swarm_dedupe_test.go Pick cluster-scoped swarm dedupe winners deterministically 2026-07-08 09:35:56 +01:00
top_level_systems.go Stabilize v6 release dry-run backend gate 2026-06-03 18:12:42 +01:00
top_level_systems_test.go Stabilize v6 release dry-run backend gate 2026-06-03 18:12:42 +01:00
types.go Surface agent auth failures and staleness instead of a silent 401 loop 2026-07-08 08:35:46 +01:00
unified_ai_adapter.go Centralize resource display naming 2026-03-19 03:20:11 +00:00
verification_outcome_test.go add verification outcome and capability postcondition substrate 2026-05-12 21:53:49 +01:00
views.go Add governed Docker and Podman lifecycle actions 2026-06-12 21:17:58 +01:00
views_test.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00