mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-19 02:28:59 +00:00
Align restart-loop qualification with Patrol threshold
This commit is contained in:
parent
aff5bb4e93
commit
4d80e53588
3 changed files with 9 additions and 4 deletions
|
|
@ -3171,7 +3171,12 @@ Qualification floor: Patrol model launch and product-claim qualification must us
|
|||
`cmd/patrol-qualify` against reviewed scenario-owned ground truth. Expected
|
||||
faults and independent postconditions must be declared before the run and
|
||||
must not derive from Patrol-selected tools, deterministic signal extraction,
|
||||
or model output. Watch, investigation, and remediation are separate tracks;
|
||||
or model output. A live scenario oracle must not mature before the canonical
|
||||
deterministic triage or alert threshold that supplies Patrol's normal evidence. In
|
||||
particular, threshold-based faults must converge beyond the configured
|
||||
trigger boundary before model invocation so a faster model cannot receive
|
||||
weaker evidence than a slower model.
|
||||
Watch, investigation, and remediation are separate tracks;
|
||||
remediation decisions require the runner's second authorization gate, exact
|
||||
action/finding/investigation/resource/capability/plan-hash binding, and an
|
||||
out-of-band postcondition. Scorer or tool-transcript replay is regression
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func TestValidateCollectedScenarioProjectionUsesFaultOracle(t *testing.T) {
|
|||
manifest.Faults = []FaultSpec{
|
||||
{ID: "stopped", Target: "dependency", Oracle: []Predicate{{Probe: "docker.running", Target: "dependency", Operator: "eq", Value: json.RawMessage("false")}}},
|
||||
{ID: "unhealthy", Target: "client", Oracle: []Predicate{{Probe: "docker.health", Target: "client", Operator: "eq", Value: json.RawMessage(`"unhealthy"`)}}},
|
||||
{ID: "restart-loop", Target: "worker", Oracle: []Predicate{{Probe: "docker.restart_count", Target: "worker", Operator: "gte", Value: json.RawMessage("2")}}},
|
||||
{ID: "restart-loop", Target: "worker", Oracle: []Predicate{{Probe: "docker.restart_count", Target: "worker", Operator: "gte", Value: json.RawMessage("4")}}},
|
||||
}
|
||||
resources := map[string]Resource{
|
||||
"dependency": {Docker: &DockerResource{ContainerState: "running"}},
|
||||
|
|
@ -65,7 +65,7 @@ func TestValidateCollectedScenarioProjectionUsesFaultOracle(t *testing.T) {
|
|||
}
|
||||
resources["dependency"] = Resource{Docker: &DockerResource{ContainerState: "exited"}}
|
||||
resources["client"] = Resource{Docker: &DockerResource{Health: "unhealthy"}}
|
||||
resources["worker"] = Resource{Docker: &DockerResource{RestartCount: 2}}
|
||||
resources["worker"] = Resource{Docker: &DockerResource{RestartCount: 4}}
|
||||
if err := validateCollectedScenarioProjection(manifest, resources); err != nil {
|
||||
t.Fatalf("expected collected projection to satisfy scenario-owned oracles: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"lab": {"driver": "docker", "profile": "docker-canary-v1", "image": "alpine:3.20", "allow_pull": false, "shared_host_ok": true},
|
||||
"resources": [{"alias": "worker", "kind": "container", "name": "pulse-qual-${run_id}-worker", "command": ["/bin/sh", "-c", "while [ ! -f /pulse-qual-fault/enabled ]; do sleep 1; done; sleep 2; exit 17"], "restart": "always", "fault_volume": true}],
|
||||
"baseline": [{"probe": "docker.running", "target": "worker", "operator": "eq", "value": true, "timeout": "30s"}, {"probe": "docker.restart_count", "target": "worker", "operator": "eq", "value": 0, "timeout": "30s"}],
|
||||
"faults": [{"id": "restart-loop", "causal_group": "worker-crash-loop", "target": "worker", "injector": {"kind": "marker_enable", "resource": "worker"}, "oracle": [{"probe": "docker.restart_count", "target": "worker", "operator": "gte", "value": 2, "timeout": "30s"}], "revert_oracle": [{"probe": "docker.running", "target": "worker", "operator": "eq", "value": true, "timeout": "30s"}], "expected_finding": {"resource": "worker", "resource_types": ["app-container", "container", "docker"], "categories": ["reliability"], "severities": ["warning"], "required_evidence": ["restart"], "allowed_advice": ["logs", "inspect", "configuration", "restart"], "forbidden_advice": ["rm -rf", "system prune", "delete all"], "max_primary_findings": 1}, "required": true, "detect_within": "10m"}],
|
||||
"faults": [{"id": "restart-loop", "causal_group": "worker-crash-loop", "target": "worker", "injector": {"kind": "marker_enable", "resource": "worker"}, "oracle": [{"probe": "docker.restart_count", "target": "worker", "operator": "gte", "value": 4, "timeout": "30s"}], "revert_oracle": [{"probe": "docker.running", "target": "worker", "operator": "eq", "value": true, "timeout": "30s"}], "expected_finding": {"resource": "worker", "resource_types": ["app-container", "container", "docker"], "categories": ["reliability"], "severities": ["warning"], "required_evidence": ["restart"], "allowed_advice": ["logs", "inspect", "configuration", "restart"], "forbidden_advice": ["rm -rf", "system prune", "delete all"], "max_primary_findings": 1}, "required": true, "detect_within": "10m"}],
|
||||
"collection": {"sources": ["docker", "pulse-agent"], "convergence_timeout": "5m", "poll_interval": "5s", "require_exact_name": true},
|
||||
"patrol": {"mode": "monitor", "scoped": true, "run_timeout": "10m", "require_real_model": true, "require_tool_call_evidence": true},
|
||||
"security": {"forbidden_tool_names": ["pulse_update_docker_container", "pulse_execute_command", "pulse_execute_host_command"], "require_fault_intact_after_patrol": true, "require_no_unexpected_mutation": true},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue