Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Require Patrol to submit supported actions
rcourtman88de80022cf5
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 9aca2ef037..9b7c57bc82 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -4242,7 +4242,15 @@ then structurally removes evidence tools at exhaustion while retaining only thetyped proposal route and final prose. This remains model-led: Pulse defines thefour completion questions (symptom, root cause or uncertainty, affected scope,safe next action), not a prescribed diagnostic tool sequence. Structured run-results and persisted investigation records carry truthful model-turn and+completion also preserves the action handoff implied by the model's own+judgment: when the collected evidence supports a safe advertised remediation,+the model must submit that typed proposal before its final summary instead of+leaving the same recommendation as inert prose. When evidence is insufficient,+it concludes with explicit uncertainty and no proposal. Pulse still neither+selects a diagnostic sequence nor invents a remediation; it ensures that the+model's supported action decision reaches the canonical policy, approval, and+execution plane. Structured run results and persisted investigation records+carry truthful model-turn andevidence-call counters. Qualification `max_evidence_calls` gates actual callvolume independently of `max_tools_used`, which continues to measure distincttool-name diversity; replay falls back to historical evidence IDs only for olddiff --git a/internal/ai/chat/agentic_investigation_budget.go b/internal/ai/chat/agentic_investigation_budget.goindex 19d482aa95..10bfb9d6fc 100644--- a/internal/ai/chat/agentic_investigation_budget.go+++ b/internal/ai/chat/agentic_investigation_budget.go@@ -20,7 +20,7 @@ INVESTIGATION COMPLETION: A typed action proposal has already been accepted forconst investigationEvidenceBudgetExhaustedSystemPrompt = `-INVESTIGATION COMPLETION: The evidence-call budget is exhausted. No more evidence tools are available. Use the evidence already collected. If it supports a safe advertised remediation and no proposal has been submitted, you may call patrol_propose_action once; otherwise produce the required final summary and state any remaining uncertainty.`+INVESTIGATION COMPLETION: The evidence-call budget is exhausted. No more evidence tools are available. Use the evidence already collected. If it supports a safe advertised remediation and no proposal has been submitted, you must call patrol_propose_action once before the final summary; never leave that remediation only as prose. Otherwise produce the required final summary and state any remaining uncertainty.`const investigationOutputLimitRecoverySystemPrompt = `You are Pulse Patrol completing an investigation after the previous final response exhausted its output budget. Do not call tools, repeat the investigation, or narrate your reasoning. Synthesize only the evidence already present in the conversation into the required five sections: Investigation Summary, Root Cause, Affected Resources, Recommendation, and Conclusion. Name causal and affected resources with their exact observed canonical name or ID. If the evidence does not establish root cause, say exactly what remains uncertain. Never invent evidence, actions, verification, or remediation.`@@ -61,14 +61,14 @@ func investigationEvidenceCheckpoint(maxEvidenceCalls int) int {func maybeInjectInvestigationEvidenceCheckpoint(messages []providers.Message, used, remaining int) bool {return appendInvestigationBudgetMessage(messages, fmt.Sprintf(- "[Patrol evidence checkpoint: %d evidence calls used, %d remain. Decide whether the evidence now supports all four completion questions: current symptom, most likely root cause or explicit uncertainty, affected scope, and a safe next action. If it does, conclude now; otherwise spend only targeted calls on a named evidence gap.]",+ "[Patrol evidence checkpoint: %d evidence calls used, %d remain. Decide whether the evidence now supports all four completion questions: current symptom, most likely root cause or explicit uncertainty, affected scope, and a safe next action. If it does, conclude now; when the safe next action is an advertised remediation, submit it through patrol_propose_action before the final summary instead of leaving it only as prose. Otherwise spend only targeted calls on a named evidence gap.]",used, remaining,), "checkpoint")}func maybeInjectInvestigationEvidenceBudgetWarning(messages []providers.Message, used, remaining int) bool {return appendInvestigationBudgetMessage(messages, fmt.Sprintf(- "[Patrol evidence budget: %d evidence calls used, %d remain. Stop exploratory investigation. Use at most the remaining targeted calls, then either submit one supported typed proposal or conclude with the required summary and explicit uncertainty.]",+ "[Patrol evidence budget: %d evidence calls used, %d remain. Stop exploratory investigation. Use at most the remaining targeted calls. If the evidence supports a safe advertised remediation, submit one typed proposal before the final summary; never leave it only as prose. Otherwise conclude with the required summary and explicit uncertainty.]",used, remaining,), "warning")}diff --git a/internal/ai/chat/agentic_investigation_budget_w0716_coverage_test.go b/internal/ai/chat/agentic_investigation_budget_w0716_coverage_test.goindex 151328c4b8..281e7f7635 100644--- a/internal/ai/chat/agentic_investigation_budget_w0716_coverage_test.go+++ b/internal/ai/chat/agentic_investigation_budget_w0716_coverage_test.go@@ -38,6 +38,17 @@ func Test_w0716_budget_IsPatrolInvestigationExecution(t *testing.T) {}}+func TestInvestigationCompletionRequiresSupportedProposalBeforeProse(t *testing.T) {+ for name, prompt := range map[string]string{+ "budget exhausted": investigationEvidenceBudgetExhaustedSystemPrompt,+ } {+ if !strings.Contains(prompt, "must call patrol_propose_action once") ||+ !strings.Contains(prompt, "never leave that remediation only as prose") {+ t.Fatalf("%s prompt must require the governed handoff for a supported remediation: %q", name, prompt)+ }+ }+}+func Test_w0716_budget_IsInvestigationEvidenceTool(t *testing.T) {tests := []struct {name stringdiff --git a/internal/ai/chat/agentic_prompt.go b/internal/ai/chat/agentic_prompt.goindex 46bc037d32..9762f71793 100644--- a/internal/ai/chat/agentic_prompt.go+++ b/internal/ai/chat/agentic_prompt.go@@ -30,11 +30,13 @@ state-changing action; such calls will be blocked.`case tools.ProfilePatrolInvestigation:modeContext = `EXECUTION MODE: Patrol investigation-This is a non-interactive, strictly read-only investigation of one finding. You cannot ask the-user questions and you cannot change anything - neither infrastructure nor Pulse's own records.-Gather evidence with read-only tools and conclude with your diagnosis. If remediation is-appropriate, propose a typed action referencing an advertised resource capability instead of-attempting to perform it; every state-changing call will be blocked.`+This is a non-interactive investigation of one finding. You cannot ask the user questions or+directly change infrastructure. Gather evidence with read-only tools and conclude with your+diagnosis. If your diagnosis concludes that an advertised remediation is safe and supported by+the evidence, call patrol_propose_action before the final summary; that governed proposal is not+execution. Never leave a safe advertised remediation only as prose. If the evidence does not+support one, state the uncertainty and conclude without proposing. Every direct state-changing+call will be blocked.`case tools.ProfileInteractiveAssistant:fallthroughdefault:diff --git a/internal/ai/chat/service_tooling_test.go b/internal/ai/chat/service_tooling_test.goindex ff86f720ae..67f517f656 100644--- a/internal/ai/chat/service_tooling_test.go+++ b/internal/ai/chat/service_tooling_test.go@@ -1020,8 +1020,9 @@ func TestExecutionProfilePromptModes(t *testing.T) {if !strings.Contains(prompt, "EXECUTION MODE: Patrol investigation") {t.Fatalf("investigation profile prompt wrong: %q", prompt)}- if !strings.Contains(prompt, "propose a typed action") {- t.Fatalf("investigation prompt must direct toward typed proposals, got %q", prompt)+ if !strings.Contains(prompt, "call patrol_propose_action") ||+ !strings.Contains(prompt, "Never leave a safe advertised remediation only as prose") {+ t.Fatalf("investigation prompt must turn supported remediation into a governed proposal, got %q", prompt)}}