mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-10 00:14:38 +00:00
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. |
||
|---|---|---|
| .. | ||
| agent.go | ||
| agent_bench_test.go | ||
| agent_buffering_test.go | ||
| agent_collection_test.go | ||
| agent_flushbuffer_test.go | ||
| agent_metrics_test.go | ||
| agent_new_test.go | ||
| agent_sensors_test.go | ||
| agent_state_test.go | ||
| agent_test.go | ||
| buffer_persist_test.go | ||
| ceph.go | ||
| ceph_test.go | ||
| cluster_sensors.go | ||
| cluster_sensors_test.go | ||
| collector_observability_test.go | ||
| command_client_test.go | ||
| commands.go | ||
| commands_backoff_test.go | ||
| commands_connect_test.go | ||
| commands_coverage_test.go | ||
| commands_deploy.go | ||
| commands_deploy_test.go | ||
| commands_execute_test.go | ||
| commands_registration_test.go | ||
| commands_test.go | ||
| enroll.go | ||
| enroll_test.go | ||
| hostagent_coverage_test.go | ||
| mdadm.go | ||
| mdadm_test.go | ||
| mock_collector_test.go | ||
| network_helpers_test.go | ||
| nvidia_smi.go | ||
| os_identity.go | ||
| proxmox_setup.go | ||
| proxmox_setup_network_coverage_test.go | ||
| proxmox_setup_test.go | ||
| send_report_test.go | ||
| smartctl.go | ||
| smartctl_coverage_test.go | ||
| smartctl_discovery_test.go | ||
| smartctl_size_test.go | ||
| smartctl_test.go | ||
| smartctl_test_helpers_test.go | ||
| sysinfo.go | ||
| sysinfo_test.go | ||
| unraid.go | ||
| unraid_test.go | ||
| version.go | ||
| zfs.go | ||
| zfs_test.go | ||