core: Policy, Pflege-Agent (HITL), Healer, Lifecycle-Pipeline, Graduierung + Konfiguration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Deterministisches Autohealing (SPEC-healer). {label} wird aus den Alert-Labels ersetzt.
|
||||
max_actions_per_hour: 10
|
||||
# Infrastruktur-Aktionen laufen nur, wenn KNASTER_DRY_RUN=false UND sie hier stehen.
|
||||
enabled_actions: []
|
||||
rules:
|
||||
- id: slot-endpoint-down
|
||||
match: {alertname: SlotEndpointDown}
|
||||
ladder:
|
||||
- {action: restart_container, params: {host: "{docker_host}", container: "{container}"}, attempts: 2, cooldown: 5m}
|
||||
- {action: restart_vm, params: {pve_node: "{pve_node}", vmid: "{vmid}"}, attempts: 1, cooldown: 15m}
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: degraded}, attempts: 1}
|
||||
on_resolved:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: ok}, only_if_set_by_healer: true}
|
||||
|
||||
- id: slot-canary-failing
|
||||
match: {alertname: SlotCanaryFailing}
|
||||
ladder:
|
||||
- {action: restart_container, params: {host: "{docker_host}", container: "{container}"}, attempts: 1, cooldown: 10m}
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: degraded}, attempts: 1}
|
||||
on_resolved:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: ok}, only_if_set_by_healer: true}
|
||||
|
||||
- id: gpu-xid
|
||||
match: {alertname: GpuXidError}
|
||||
ladder:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: degraded}, attempts: 1}
|
||||
- {action: restart_vm, params: {pve_node: "{pve_node}", vmid: "{vmid}"}, attempts: 1, cooldown: 20m}
|
||||
# ältere Karten ohne FLR brauchen ggf. einen Host-Neustart – nur mit Freigabe/Wartungsfenster
|
||||
- {action: reboot_host, params: {pve_node: "{pve_node}"}, attempts: 1}
|
||||
on_resolved:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: ok}, only_if_set_by_healer: true}
|
||||
|
||||
- id: gpu-hot
|
||||
match: {alertname: GpuTemperatureHigh}
|
||||
ladder:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: degraded}, attempts: 1}
|
||||
on_resolved:
|
||||
- {action: mark_slot, params: {slot: "{slot}", status: ok}, only_if_set_by_healer: true}
|
||||
|
||||
- id: kv-cache-saturated
|
||||
match: {alertname: VllmKvCacheSaturated}
|
||||
ladder:
|
||||
- {action: notify, params: {text: "KV-Cache von {slot} dauerhaft voll – Last verteilen oder max_model_len senken", severity: warning}, attempts: 1}
|
||||
|
||||
- id: node-down
|
||||
match: {alertname: NodeDown}
|
||||
ladder:
|
||||
- {action: notify, params: {text: "Node {instance} nicht erreichbar – Proxmox HA prüfen", severity: high}, attempts: 1}
|
||||
|
||||
- id: disk-full
|
||||
match: {alertname: DiskAlmostFull}
|
||||
ladder:
|
||||
- {action: notify, params: {text: "Platte auf {instance} ({mountpoint}) fast voll", severity: warning}, attempts: 1}
|
||||
@@ -0,0 +1,6 @@
|
||||
# Grenzwerte der Lifecycle-Pipeline (SPEC-lifecycle §2)
|
||||
tolerance: 0.02
|
||||
min_pass_rate: 0.85
|
||||
min_agreement: 0.85
|
||||
min_n: 50
|
||||
canary_share: 0.1
|
||||
@@ -0,0 +1,11 @@
|
||||
# Grenzwerte der Service-Routine (SPEC-maintenance §3)
|
||||
demote_below: 0.80
|
||||
min_cases: 20
|
||||
window_cases: 50
|
||||
promote_min_rate: 0.95
|
||||
merge_similarity: 0.92
|
||||
degraded_hours: 1
|
||||
context_signal_limit: 10
|
||||
adapter_min_cases: 300
|
||||
adapter_target_rate: 0.90
|
||||
lookback_days: 7
|
||||
@@ -0,0 +1,20 @@
|
||||
# Freigabe-Richtlinie (ADR-0004): sichere Richtung automatisch, Qualität/Kosten nach Freigabe.
|
||||
default: approve
|
||||
actions:
|
||||
# automatisch
|
||||
demote_skill: {mode: auto, risk: low}
|
||||
mark_slot: {mode: auto, risk: low}
|
||||
restart_container: {mode: auto, risk: low}
|
||||
restart_vm: {mode: auto, risk: medium}
|
||||
recalibrate_context: {mode: auto, risk: low}
|
||||
notify: {mode: auto, risk: low}
|
||||
# mit Freigabe
|
||||
request_graduation: {mode: approve, risk: low}
|
||||
promote_skill: {mode: approve, risk: medium}
|
||||
merge_skills: {mode: approve, risk: low}
|
||||
retire_skill: {mode: approve, risk: medium}
|
||||
train_adapter: {mode: approve, risk: low}
|
||||
create_candidate: {mode: approve, risk: medium}
|
||||
promote_candidate: {mode: approve, risk: high}
|
||||
rollback_candidate: {mode: approve, risk: medium}
|
||||
reboot_host: {mode: approve, risk: high, window: "02:00-05:00"}
|
||||
Reference in New Issue
Block a user