Pulse/internal/ai/tools
rcourtman 6060936cb3 Cover pure helpers and persistence round-trips across the backend
Seventeen files closing the zero-coverage functions the current source drop
left behind. Every named target was measured off 0.0 percent by a per-function
coverage delta, re-measured against current main.

- config: the five new durable Proxmox cluster-node identity helpers
  (deterministic id, endpoint equality, alias lookup, id existence, lookup by
  id) to 100 percent; VMware and agent-profile persistence round-trips under
  t.TempDir including that AppendProfileChangeLog appends rather than
  replaces; AI chat session save, load, delete, per-user scoping and age
  cleanup, with explicit timestamps rather than time.Now-relative fuzz;
  PVEInstance.DeepCopy asserted for nested independence.
- truenas: incidentFromPoolStatus over every pool health string,
  RecordsFromSnapshot over nil, empty and populated snapshots, both
  TransportStatus accessors, and the RPC handshake and auth typed errors
  through errors.Is and errors.As.
- unifiedresources: the maintenance-window operator-state lifecycle on
  MemoryStore including the not-found and already-cleared arms, plus the
  four remaining View accessors asserted on their exact formatted output.
- api: restoreAgentExecMetadata, buildAlertConnectionSnapshotsWithRuntimeSources
  and both mock series generators, asserted on shape, ordering and
  determinism rather than non-emptiness.
- cmd/pulse-control-plane: the four remaining MSP and mobile proof report
  printers, asserted on the concrete strings in captured stdout.
- ai: cost.EmptySummary, approval.emptyExecutionState, demo.IsDemoRuntimeIntended
  and tools.findCanonicalAppContainerResourceByReferences across no-match,
  first-match, later-match and ambiguous references.
- monitoring, models, alerts: trueNASAppRunning,
  supplementalProviderOwnedSourcesForOrg, IOCounterPresence.Effective,
  ValidAlertIntentSignal and intentTimePointer.

No source file is modified. Adversarial review returned no rejects across all
seventeen files and flagged four padding cases plus one dead table field; all
were removed and the per-function coverage re-measured as identical, proving
they carried nothing.

PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT=test-only branch coverage, no source or contract change
2026-07-25 00:21:35 +01:00
..
action_audit.go Restore release-blocking backend contracts 2026-07-13 21:51:33 +01:00
action_audit_execution_test.go Restore release-blocking backend contracts 2026-07-13 21:51:33 +01:00
action_audit_remediation_lock_test.go Fail closed on unknown remediation lock state for autonomous dispatches 2026-07-10 00:14:01 +01:00
adapters.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
adapters_readstate_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
adapters_test.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
aitools_control_pure_branchcov0716_test.go Add Go branch-coverage tests for monitoring cluster helpers and ai-tools formatting 2026-07-16 16:25:10 +01:00
appcontainerrefs_branchcov0724pm_test.go Cover pure helpers and persistence round-trips across the backend 2026-07-25 00:21:35 +01:00
approval_preflight_test.go Author Proxmox VM/CT lifecycle preflight context for approval review 2026-05-09 13:12:52 +01:00
container_args.go
control_docker_helpers_test.go
control_helpers_test.go fix: close chat command authority boundary 2026-07-11 11:54:56 +01:00
control_resource_test.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
control_run_command_test.go fix: close chat command authority boundary 2026-07-11 11:54:56 +01:00
control_test.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
current_resource.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
current_resource_canonquery_test.go Add branch-coverage tests for tools canonical query helpers 2026-07-14 23:38:09 +01:00
current_resource_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
data_types.go Align Docker host query schema and executor 2026-07-14 19:13:11 +01:00
data_types_branchcov0719late_test.go Add Go branch-coverage tests for unified-resource views and pure helpers 2026-07-19 22:23:42 +01:00
discovery_adapter_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
docker_updates_test.go Align Patrol quiet-run tool contracts 2026-07-14 19:30:45 +01:00
execution_profile.go Complete Patrol autonomous qualification loop 2026-07-14 15:35:48 +01:00
executor.go Qualify model-led Patrol investigations 2026-07-15 10:32:16 +01:00
executor_clone_test.go
executor_recovery_availability_test.go
executor_setters_test.go Enforce Assistant read-only scope integrity 2026-07-11 12:43:55 +01:00
file_docker_test.go Fail closed on unknown remediation lock state for autonomous dispatches 2026-07-10 00:14:01 +01:00
governance_manifest.go Replace the hard-coded tool classifier with registry-owned invocation descriptors 2026-07-10 13:31:11 +01:00
governance_manifest_test.go Complete Patrol autonomous qualification loop 2026-07-14 15:35:48 +01:00
infrastructure_helpers_test.go
infrastructure_low_coverage_test.go
infrastructure_test.go
internal_routing.go
invocation_policy_test.go Complete Patrol autonomous qualification loop 2026-07-14 15:35:48 +01:00
kubernetes_control_test.go fix: close chat command authority boundary 2026-07-11 11:54:56 +01:00
kubernetes_test.go
mutation_registry_audit_test.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
names.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
names_test.go Qualify model-led Patrol investigations 2026-07-15 10:32:16 +01:00
pmg_test.go Stabilize dev runtime and complete PMG read-state migration 2026-05-21 15:15:23 +01:00
proposal_capture.go Qualify model-led Patrol investigations 2026-07-15 10:32:16 +01:00
proposal_capture_test.go Preserve Patrol investigation evidence continuity 2026-07-15 15:43:18 +01:00
protocol.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
protocol_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
provider_projection.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
provider_projection_test.go Complete Patrol autonomous qualification loop 2026-07-14 15:35:48 +01:00
purehelpers_branchcov0722am_test.go Cover the Unraid merge, setup classifier and retry helpers left untested 2026-07-22 08:06:56 +01:00
recovery_adapter_resilience_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
registry.go Qualify model-led Patrol investigations 2026-07-15 10:32:16 +01:00
shared_test.go Verify AI Kubernetes scale and Docker update actions after execution 2026-07-10 00:05:22 +01:00
strict_resolution_test.go Harden repository advisory boundaries 2026-05-24 08:15:29 +01:00
tools_alerts.go Split tool registration authority and make the registry append-only 2026-07-10 15:16:06 +01:00
tools_control.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
tools_discovery.go Resolve canonical Patrol discovery targets 2026-07-15 12:07:42 +01:00
tools_discovery_match_test.go Add branch-coverage tests for AI patrol, qualification, tools and agentcapability helpers 2026-07-14 22:33:40 +01:00
tools_discovery_test.go Resolve canonical Patrol discovery targets 2026-07-15 12:07:42 +01:00
tools_docker.go Align Patrol quiet-run tool contracts 2026-07-14 19:30:45 +01:00
tools_file.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
tools_file_test.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
tools_knowledge.go Split tool registration authority and make the registry append-only 2026-07-10 15:16:06 +01:00
tools_kubernetes.go Enforce the canonical mutation plane 2026-07-11 15:19:41 +01:00
tools_metrics.go Split tool registration authority and make the registry append-only 2026-07-10 15:16:06 +01:00
tools_metrics_alerts_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
tools_metrics_downsample_test.go
tools_patrol.go Harden Patrol multi-finding report guidance 2026-07-16 06:40:17 +01:00
tools_patrol_test.go Harden Patrol multi-finding report guidance 2026-07-16 06:40:17 +01:00
tools_pmg.go Split tool registration authority and make the registry append-only 2026-07-10 15:16:06 +01:00
tools_propose.go Preserve Patrol investigation evidence continuity 2026-07-15 15:43:18 +01:00
tools_query.go Preserve canonical resource IDs in Patrol queries 2026-07-15 09:16:39 +01:00
tools_query_config_test.go
tools_query_curlwget_branchcov_test.go Add branch-coverage tests for AI tools command classifiers 2026-07-15 15:02:19 +01:00
tools_query_env_branchcov_test.go Add branch-coverage tests for AI tools command classifiers 2026-07-15 15:02:19 +01:00
tools_query_hints_test.go Add branch-coverage tests for AI patrol, qualification, tools and agentcapability helpers 2026-07-14 22:33:40 +01:00
tools_query_test.go Preserve canonical resource IDs in Patrol queries 2026-07-15 09:16:39 +01:00
tools_query_timeout_branchcov_test.go Add branch-coverage tests for AI tools command classifiers 2026-07-15 15:02:19 +01:00
tools_query_toolresponse_branchcov0719pm_test.go Add Go branch-coverage tests for pure helpers across six packages 2026-07-19 15:11:02 +01:00
tools_query_vmconfig_test.go Add branch-coverage tests for AI patrol, qualification, tools and agentcapability helpers 2026-07-14 22:33:40 +01:00
tools_read.go Make Patrol report confirmed health failures 2026-07-14 18:04:09 +01:00
tools_read_test.go Make Patrol report confirmed health failures 2026-07-14 18:04:09 +01:00
tools_storage.go Split tool registration authority and make the registry append-only 2026-07-10 15:16:06 +01:00
tools_storage_recovery_branchcov_test.go Add branch-coverage tests for AI tools command classifiers 2026-07-15 15:02:19 +01:00
tools_storage_test.go Verify AI Kubernetes scale and Docker update actions after execution 2026-07-10 00:05:22 +01:00
tools_summarize.go feat(ai): make pulse_summarize self-target and forbid identifier elicitation 2026-07-17 23:55:38 +01:00
tools_summarize_test.go feat(ai): make pulse_summarize self-target and forbid identifier elicitation 2026-07-17 23:55:38 +01:00
types.go