feat(watchers): add box stability watcher daemon, recovery guardrails, and CLI integration

- Add dedicated watchers/ project folder with box-stability-watcher.py supervisor
- Monitor host load, memory, swap saturation, and crash-looping services
- Implement tiered mitigations: yellow renicing, orange SIGSTOP pause with 60s grace, red shedding
- Distinguish user-launched agents (allowed on desktop default socket) from automated box workloads
- Wire first-class box stability CLI subcommand and top-line host status in fleet status
- Harden tmux.service with cgroup memory limits to prevent OS freeze and OOM avalanches
- Add 10-test unit test suite covering thresholds, safety whitelist, pause/resume, and isolation
This commit is contained in:
operator
2026-10-07 17:49:14 +00:00
parent c11d1d83ae
commit 0a45133d28
8 changed files with 1616 additions and 22 deletions
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=NetVM Box & Host Stability Watcher Daemon
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/super/Projects/NetVM/watchers/box-stability-watcher.py --daemon
Restart=always
RestartSec=5
MemoryMax=256M
CPUQuota=50%
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=default.target