mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-08-17 13:03:31 +00:00
Harden Patrol investigation evidence traversal
This commit is contained in:
parent
85db074eff
commit
4195943300
3 changed files with 11 additions and 4 deletions
|
|
@ -7537,3 +7537,10 @@ strict last-message payload only after both have passed transport validation.
|
|||
Qualification may therefore require positive input/output usage for a
|
||||
tool-free real-model all-clear without falsely rejecting Codex subscription
|
||||
runs whose analysis and healthy outcome were durably persisted.
|
||||
|
||||
Investigation evidence checkpoints keep the finding resource as an anchor,
|
||||
not a fence. When a cross-resource cause remains plausible, empty logs or a
|
||||
policy-blocked deep-read attempt cannot justify an unknown-root-cause
|
||||
conclusion or remediation proposal on the symptom alone; the remaining
|
||||
read-only budget must prioritize canonical query, discovery, or topology
|
||||
evidence for at least one plausible causal peer or dependency.
|
||||
|
|
|
|||
|
|
@ -106,14 +106,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; 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.]",
|
||||
"[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. Before concluding that root cause is unknown or proposing remediation on the symptom resource, use available canonical query, discovery, or topology evidence to test at least one plausible causal peer or dependency whenever a cross-resource cause remains plausible. Empty logs or a blocked deep-read path do not close that evidence gap. If the four questions are supported, 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. 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.]",
|
||||
"[Patrol evidence budget: %d evidence calls used, %d remain. Stop exploratory investigation. Use at most the remaining targeted calls. If a cross-resource cause is still plausible and no causal peer or dependency has been tested with canonical query, discovery, or topology evidence, make that the remaining evidence priority; empty logs or a blocked deep-read path are not a root-cause conclusion. 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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ func Test_w0716_budget_MaybeInjectInvestigationEvidenceCheckpoint(t *testing.T)
|
|||
if !strings.Contains(got, "raw-evidence") {
|
||||
t.Fatalf("original content must be preserved, got %q", got)
|
||||
}
|
||||
for _, want := range []string{"4 evidence calls used", "3 remain", "checkpoint", "completion questions"} {
|
||||
for _, want := range []string{"4 evidence calls used", "3 remain", "checkpoint", "completion questions", "plausible causal peer or dependency", "Empty logs or a blocked deep-read path"} {
|
||||
if !strings.Contains(got, want) {
|
||||
t.Fatalf("checkpoint content missing %q: %q", want, got)
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ func Test_w0716_budget_MaybeInjectInvestigationEvidenceBudgetWarning(t *testing.
|
|||
t.Fatalf("earlier result must be untouched, got %q", msgs[0].ToolResult.Content)
|
||||
}
|
||||
got := msgs[1].ToolResult.Content
|
||||
for _, want := range []string{"9 evidence calls used", "1 remain", "budget", "Stop exploratory investigation", "typed proposal"} {
|
||||
for _, want := range []string{"9 evidence calls used", "1 remain", "budget", "Stop exploratory investigation", "causal peer or dependency", "typed proposal"} {
|
||||
if !strings.Contains(got, want) {
|
||||
t.Fatalf("warning content missing %q: %q", want, got)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue