Pulse/internal/monitoring
rcourtman f4c2fd0c38 Fail closed on unknown remediation lock state for autonomous dispatches
The AI action broker treated an unreadable operator lock as unlocked:
isResourceRemediationLocked returned (false, nil) with no audit store
wired, and the caller logged store errors then dispatched anyway. An
operator's NeverAutoRemediate=true could be silently ignored whenever
the policy store was missing or erroring, which is unacceptable while
Patrol and Assistant run at assisted or full autonomy.

Posture change at the dispatch decision point:
- isResourceRemediationLocked now reports unknown state (nil store or
  lookup failure) as an ErrRemediationLockStateUnknown-wrapped error
  instead of silently defaulting to unlocked.
- New checkRemediationLockForDispatch gate: dispatches without an
  approved human decision fail CLOSED on unknown lock state and
  surface "remediation lock state unknown; operator approval
  required". Human-approved dispatches keep the historical fail-open
  behavior with a warning log. A confirmed lock still refuses even
  approved dispatches, as before.
- executeNativeActionWithAudit (TrueNAS app start/stop/restart) now
  enforces the lock too; it previously skipped the check entirely.
- Refusals persist Failed audit records with stable
  remediation_lock_state_unknown: / resource_remediation_locked:
  ErrorMessage prefixes.
- ai-runtime subsystem contract updated to pin the new posture.

Tests cover store-error and nil-store at both autonomy postures on
both dispatch paths; routing/control tests now wire an in-memory
audit store since autonomous dispatch without one is refused.
2026-07-10 00:14:01 +01:00
..
errors feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_fleet_doctor.go Add agent fleet diagnostics endpoint 2026-06-29 18:03:46 +01:00
agent_fleet_doctor_test.go Add agent fleet diagnostics endpoint 2026-06-29 18:03:46 +01:00
availability_poller.go Improve monitor-first attention states 2026-07-09 21:29:45 +01:00
availability_poller_test.go Improve monitor-first attention states 2026-07-09 21:29:45 +01:00
backoff.go feat: implement error handling with circuit breakers and backoff (Phase 2 Task 7) 2025-10-20 15:13:37 +00:00
backoff_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
backup_guard.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
backup_guard_test.go fix: ship alerting hotfixes and prepare 5.1.4 2026-02-07 22:05:55 +00:00
canonical_guardrails_test.go Harden remaining CodeQL security boundaries 2026-07-09 19:46:40 +01:00
ceph.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
ceph_multisource_test.go Verify v6 Ceph multi-source pool alerts are deduplicated (#1341) 2026-06-02 14:52:47 +01:00
ceph_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
circuit_breaker.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
circuit_breaker_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
connected_infrastructure.go fix(unifiedresources): stop fabricating sightings and online stamps for never-seen resources 2026-06-11 10:23:49 +01:00
connected_infrastructure_test.go Unify settings infrastructure ledger 2026-04-18 14:54:53 +01:00
container_disk_usage.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
container_disk_usage_test.go test: Add tests for monitoring and notifications functions 2025-12-01 17:33:36 +00:00
container_parsing.go fix: treat absent onboot as no-autostart (Proxmox default) for alert suppression 2026-06-26 11:35:12 +01:00
container_parsing_test.go fix: treat absent onboot as no-autostart (Proxmox default) for alert suppression 2026-06-26 11:35:12 +01:00
diagnostic_snapshots.go Fix Proxmox guest memory fallbacks 2026-05-05 14:59:29 +01:00
diagnostic_snapshots_test.go Stabilize low-trust Proxmox VM memory readings 2026-04-01 19:14:12 +01:00
docker_commands.go Verify AI Kubernetes scale and Docker update actions after execution 2026-07-10 00:05:22 +01:00
docker_commands_test.go Verify AI Kubernetes scale and Docker update actions after execution 2026-07-10 00:05:22 +01:00
docker_detection.go Recheck guest Docker inventory after checker setup 2026-06-25 20:30:38 +01:00
docker_detection_test.go Recheck guest Docker inventory after checker setup 2026-06-25 20:30:38 +01:00
docker_host_identity.go Reject Docker host match on conflicting physical identity (#1366) 2026-06-04 10:35:35 +01:00
docker_host_identity_test.go Reject Docker host match on conflicting physical identity (#1366) 2026-06-04 10:35:35 +01:00
docker_metadata_migration.go Fix Docker container URL metadata identity 2026-07-06 15:48:26 +01:00
enrich_container_metadata_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
error_classification_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
fake_executor_integration.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
fs_filters.go Filter read-only filesystems from host agent disk metrics (related to #690) 2025-11-12 09:47:02 +00:00
fs_filters_test.go Ignore read-only guest filesystems in disk aggregation 2025-10-14 16:13:53 +00:00
guest_agent_evidence.go Alert on expected QEMU guest agent outages 2026-07-02 23:52:02 +01:00
guest_agent_evidence_test.go Alert on expected QEMU guest agent outages 2026-07-02 23:52:02 +01:00
guest_agent_work.go Fail closed on unknown remediation lock state for autonomous dispatches 2026-07-10 00:14:01 +01:00
guest_config.go Update core infrastructure components 2026-01-28 16:52:35 +00:00
guest_config_conversion_coverage_test.go monitoring: surface CrashLoopBackOff pods as degraded on the frontend 2026-05-19 22:37:55 +01:00
guest_disk_stability.go Fix Proxmox guest memory fallbacks 2026-05-05 14:59:29 +01:00
guest_disk_stability_test.go Fix Proxmox guest memory fallbacks 2026-05-05 14:59:29 +01:00
guest_host_agent_fallback.go Restore linked host-agent disk inventory for guest VMs 2026-04-22 09:22:46 +01:00
guest_memory_agent.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
guest_memory_agent_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
guest_memory_sources.go fix(monitoring): use MemAvailable instead of MemTotal-MemFree for Linux guest/node memory 2026-06-27 17:41:00 +01:00
guest_memory_sources_test.go fix(monitoring): use MemAvailable instead of MemTotal-MemFree for Linux guest/node memory 2026-06-27 17:41:00 +01:00
guest_memory_stability.go Fix Proxmox guest memory fallbacks 2026-05-05 14:59:29 +01:00
guest_memory_stability_test.go Stabilize low-trust Proxmox VM memory readings 2026-04-01 19:14:12 +01:00
guest_metadata.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
guest_metadata_test.go Preserve guest-agent continuity across transient PVE status failures 2026-04-01 18:38:42 +01:00
harness_integration.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
helpers_test.go Show cluster labels in Proxmox node names 2026-07-03 10:52:18 +01:00
host_agent_temps.go Fix physical disk SMART/Proxmox merge identity 2026-07-07 09:46:51 +01:00
host_agent_temps_test.go Prefer agent temperatures over SSH fallback 2026-07-03 10:43:28 +01:00
integration_integration_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
knownhosts.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
knownhosts_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
kubernetes_agents.go Fix Docker and Kubernetes agent clock-skew liveness 2026-07-09 21:21:03 +01:00
kubernetes_agents_test.go Fix Docker and Kubernetes agent clock-skew liveness 2026-07-09 21:21:03 +01:00
log_capture_test.go Stabilize backend race tests for v6 RC publish 2026-04-11 22:46:34 +01:00
lttb.go fix: reduce metrics memory 86x by reverting buffer and adding LTTB downsampling 2026-02-04 19:49:52 +00:00
lttb_test.go fix: reduce metrics memory 86x by reverting buffer and adding LTTB downsampling 2026-02-04 19:49:52 +00:00
main_test.go Tighten monitoring RC test budgets 2026-04-12 09:41:29 +01:00
memory_reclaimable.go memory: restore the v5 reclaimable-cache split end-to-end 2026-06-11 19:42:40 +01:00
memory_reclaimable_test.go memory: restore the v5 reclaimable-cache split end-to-end 2026-06-11 19:42:40 +01:00
memory_source_catalog.go Add guest agent meminfo VM memory fallback 2026-04-01 19:00:48 +01:00
memory_source_catalog_test.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
memory_trust_characterization_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
merge_temps_test.go Fix alert threshold and disk temperature regressions 2026-06-12 19:19:16 +01:00
metrics.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
metrics_helpers_test.go test: Add tests for monitor helper and metrics functions 2025-12-01 21:18:33 +00:00
metrics_history.go Add Proxmox node thermal history 2026-05-15 21:27:39 +01:00
metrics_history_concurrency_test.go chore: fix staticcheck SA warnings 2025-11-27 09:16:53 +00:00
metrics_history_memory_regression_test.go Add metrics history memory regression test 2026-02-04 19:35:19 +00:00
metrics_history_test.go Add Proxmox node thermal history 2026-05-15 21:27:39 +01:00
metrics_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
mock_chart_history.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
mock_metrics_history.go fix(mock): backfill the metrics store in mock mode so reports get real history 2026-06-10 21:25:02 +01:00
mock_metrics_history_test.go Fix CI test drift and SSE idle race 2026-06-11 15:48:00 +01:00
mock_mode_config_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
mock_mode_testhelpers_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
monitor.go Fix physical disk SMART/Proxmox merge identity 2026-07-07 09:46:51 +01:00
monitor_accessors.go feat: add multi-tenancy foundation (directory-per-tenant) 2026-01-22 13:39:06 +00:00
monitor_additional_test.go Scope cluster TLS fingerprints to their own endpoints (#1199) 2026-06-04 09:11:07 +01:00
monitor_agents.go Modernize Unified Agent lifecycle and platform support 2026-07-09 23:20:35 +01:00
monitor_alert_handling_test.go Fix alert escalation notification scheduling 2026-06-01 14:16:57 +01:00
monitor_alert_sync.go alerts(history): carry alert metadata to the frontend so resourceType resolves 2026-06-11 19:53:45 +01:00
monitor_alerts.go Bound server state broadcast memory 2026-07-02 23:27:49 +01:00
monitor_backup_poll_test.go Harden Proxmox setup token ACLs 2026-05-05 14:19:50 +01:00
monitor_backups.go Fail closed on unknown remediation lock state for autonomous dispatches 2026-07-10 00:14:01 +01:00
monitor_backups_readstate_test.go Fix guest suppression for posture alerts 2026-07-09 20:28:52 +01:00
monitor_broadcast_tenant_test.go Fix tenant monitor broadcast nil hub panic 2026-05-05 16:25:00 +01:00
monitor_client_init.go Add unified connections API (list + probe) with Disabled flag 2026-04-19 11:42:53 +01:00
monitor_client_reconnect.go Add unified connections API (list + probe) with Disabled flag 2026-04-19 11:42:53 +01:00
monitor_cluster_dedupe.go Fix backup orphan inventory readiness 2026-05-01 20:28:12 +01:00
monitor_cluster_helpers.go Scope cluster TLS fingerprints to their own endpoints (#1199) 2026-06-04 09:11:07 +01:00
monitor_container_test.go feat: surface LXC mountpoints in UI (related to #715) 2025-11-18 22:57:20 +00:00
monitor_conversion_helpers_additional_test.go fix(unifiedresources): stop fabricating sightings and online stamps for never-seen resources 2026-06-11 10:23:49 +01:00
monitor_discovery_helpers.go monitoring: resolve configured-host IPs off the monitor lock 2026-06-23 17:31:37 +01:00
monitor_docker_test.go Fix Docker container URL metadata identity 2026-07-06 15:48:26 +01:00
monitor_extra_coverage_test.go Alert on expected QEMU guest agent outages 2026-07-02 23:52:02 +01:00
monitor_full_coverage_test.go Fix fleet command policy convergence 2026-05-13 22:18:47 +01:00
monitor_health_test.go feat: enhance scheduler health API with rich instance metadata 2025-10-20 15:13:38 +00:00
monitor_helpers.go Add typed NVIDIA GPU stats 2026-06-30 09:43:33 +01:00
monitor_helpers_test.go Add macOS thermal state reporting 2026-06-14 11:07:47 +01:00
monitor_host_agents_test.go Modernize Unified Agent lifecycle and platform support 2026-07-09 23:20:35 +01:00
monitor_integration_test.go Show cluster labels in Proxmox node names 2026-07-03 10:52:18 +01:00
monitor_memory_test.go Fix Proxmox node disk fallback selection 2026-04-01 10:04:30 +01:00
monitor_metadata_test.go Fix backup orphan inventory readiness 2026-05-01 20:28:12 +01:00
monitor_metrics.go Speed up workload charts with TTL cache and remove redundant clones 2026-05-25 20:35:58 +01:00
monitor_metrics_chart_batch_bench_test.go Stabilize RC release proof contracts 2026-04-11 14:51:10 +01:00
monitor_metrics_chart_fallback_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
monitor_metrics_slo_test.go test(go): skip perf-budget overruns on contended local hosts, enforce in CI 2026-06-11 13:12:59 +01:00
monitor_pbs_coverage_test.go Correct PBS job health evidence boundaries 2026-05-13 17:05:03 +01:00
monitor_pbs_fallback_test.go test(monitoring): fix failing snapshot tests and improve coverage 2026-01-04 10:29:40 +00:00
monitor_pbs_pmg.go fix(unifiedresources): carry real poll timestamps for storage and docker container sightings 2026-06-11 10:57:22 +01:00
monitor_pmg_test.go Mark failed PBS poll as failure and lock down with regression tests 2026-05-08 19:53:03 +01:00
monitor_polling_containers.go Add lab-agent hot-dev mode 2026-06-14 09:55:56 +01:00
monitor_polling_node.go Forward-port Proxmox monitoring fixes from v5 2026-04-01 11:51:19 +01:00
monitor_polling_node_helpers.go Prefer agent temperatures over SSH fallback 2026-07-03 10:43:28 +01:00
monitor_polling_schedule.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_polling_storage.go fix(unifiedresources): carry real poll timestamps for storage and docker container sightings 2026-06-11 10:57:22 +01:00
monitor_polling_storage_env_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_polling_test.go fix(monitoring): clear poll lastError on success so healthy connections drop stale error banners 2026-06-10 16:19:24 +01:00
monitor_polling_vm.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
monitor_previous_state.go Stabilize transient Proxmox VM disk fallbacks 2026-04-01 19:31:50 +01:00
monitor_profiles_test.go Restore remote config signature compatibility 2026-05-13 19:00:02 +01:00
monitor_proxmox_pool_test.go Stabilize low-trust Proxmox VM memory readings 2026-04-01 19:14:12 +01:00
monitor_pve.go Suppress powered-off alerts for guests not configured to autostart 2026-06-26 00:22:59 +01:00
monitor_pve_client_endpoints.go Forward-port Proxmox monitoring fixes from v5 2026-04-01 11:51:19 +01:00
monitor_pve_cluster.go fix(monitoring): refresh discovered cluster endpoints when the cluster re-IPs 2026-06-10 16:20:35 +01:00
monitor_pve_cluster_refresh_test.go fix(monitoring): refresh discovered cluster endpoints when the cluster re-IPs 2026-06-10 16:20:35 +01:00
monitor_pve_guest_builders.go Alert on expected QEMU guest agent outages 2026-07-02 23:52:02 +01:00
monitor_pve_guest_helpers.go Canonicalize mock chart history continuity 2026-04-01 20:41:56 +01:00
monitor_pve_guest_lxc.go Close RC-era issue gaps blocking v6 GA 2026-04-21 14:46:23 +01:00
monitor_pve_guest_lxc_test.go Close RC-era issue gaps blocking v6 GA 2026-04-21 14:46:23 +01:00
monitor_pve_guest_poll.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
monitor_pve_node_vm_builder.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
monitor_pve_replication.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_pve_storage.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
monitor_pve_unreachable_test.go fix(monitoring): show offline nodes for PVE instances unreachable since startup 2026-06-11 09:47:42 +01:00
monitor_reconnect_test.go test(monitoring): fix failing snapshot tests and improve coverage 2026-01-04 10:29:40 +00:00
monitor_shutdown_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_snapshot_test.go Keep snapshot polling independent of backup scans (#1437) 2026-06-04 09:00:30 +01:00
monitor_snapshots_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_storage_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_storage_test.go Attach ZFS pool status to dir storages on ZFS dataset paths 2026-06-04 10:27:59 +01:00
monitor_test.go Normalize inactive Docker Swarm evidence 2026-05-17 18:45:24 +01:00
monitor_timeout_test.go fix: Add configurable poll timeout and handle external Ceph storage 2026-01-05 23:34:33 +00:00
monitor_tracking_cleanup_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitor_unified_state_test.go Stabilize mock broadcast freshness test 2026-06-11 20:29:13 +01:00
monitor_websocket_resilience_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
monitored_system_usage.go Remove monitored-system volume caps 2026-05-05 12:59:59 +01:00
multi_tenant_monitor.go Add MSP report scheduling and alert rollup 2026-07-07 20:37:18 +01:00
multi_tenant_monitor_additional_test.go Stabilize backend race tests for v6 RC publish 2026-04-11 22:46:34 +01:00
node_disk_sources.go Fix Proxmox node disk fallback selection 2026-04-01 10:04:30 +01:00
node_memory_sources.go fix(monitoring): use MemAvailable instead of MemTotal-MemFree for Linux guest/node memory 2026-06-27 17:41:00 +01:00
node_memory_sources_test.go fix(monitoring): use MemAvailable instead of MemTotal-MemFree for Linux guest/node memory 2026-06-27 17:41:00 +01:00
norace_test.go Stabilize backend race tests for v6 RC publish 2026-04-11 22:46:34 +01:00
pbs_backup_cache_terminal_test.go fix: ship alerting hotfixes and prepare 5.1.4 2026-02-07 22:05:55 +00:00
pbs_convert_test.go feat(pbs): add datastore exclusion to reduce PBS log noise 2026-01-14 12:26:18 +00:00
physical_disk_pool_membership.go Surface ZFS pool membership on physical disks 2026-04-23 20:38:33 +01:00
physical_disk_pool_membership_test.go Surface ZFS pool membership on physical disks 2026-04-23 20:38:33 +01:00
platform_poller_shared.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
poll_providers.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
poller.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
race_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
ratetracker.go Route physical disk drawer IO through canonical history 2026-04-01 23:33:43 +01:00
ratetracker_concurrency_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
ratetracker_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
recovery_ingest.go Fix PBS backup memory retention 2026-07-06 10:32:38 +01:00
recovery_rollups.go Make fixture graph the only mock runtime API 2026-03-31 15:42:16 +01:00
recovery_rollups_resilience_test.go test(recovery): cover downstream malformed metadata consumers 2026-03-26 22:58:27 +00:00
reload.go Expand anonymous telemetry adoption coverage 2026-05-28 11:39:30 +01:00
reload_test.go Expand anonymous telemetry adoption coverage 2026-05-28 11:39:30 +01:00
resource_stale_thresholds.go Align resource staleness with poll cadence 2026-07-03 09:05:12 +01:00
scheduler.go Add agentless availability targets 2026-05-06 10:35:34 +01:00
scheduler_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
staleness_tracker.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
staleness_tracker_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
storage_backup_preserve_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
storage_filters.go fix: Deduplicate shared storages (NFS, RBD, PBS, etc) in cluster view 2026-01-06 17:44:52 +00:00
storage_filters_test.go fix: Deduplicate shared storages (NFS, RBD, PBS, etc) in cluster view 2026-01-06 17:44:52 +00:00
task_queue.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
task_queue_memory_regression_test.go Add memory regression tests for agent and scheduler 2026-02-04 19:33:29 +00:00
task_queue_test.go test: Add WaitNext and key() tests for TaskQueue 2025-12-02 12:02:13 +00:00
temperature.go Flag pre-rc.6 SSH sensor setups and surface a re-run-setup notice 2026-06-11 16:00:25 +01:00
temperature_test.go Flag pre-rc.6 SSH sensor setups and surface a re-run-setup notice 2026-06-11 16:00:25 +01:00
truenas_poller.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
truenas_poller_test.go Stabilize TrueNAS timeout recovery test 2026-06-14 22:52:34 +01:00
vmware_poller.go Dedupe monitoring pollers behind shared provider, lifecycle, and seeding helpers 2026-06-10 09:19:51 +01:00
vmware_poller_test.go Add vSphere network inventory 2026-05-22 20:26:56 +01:00