feat(c0re): per-container disk-size sampler on container-load (#1659)

This commit is contained in:
damocles 2026-06-17 18:43:01 +02:00 committed by mara
commit d57f8845b4
3 changed files with 107 additions and 4 deletions

View file

@ -394,6 +394,11 @@ async fn cmd_serve(
// Per-agent bash-tasks file vacuum: host-side so the harness
// cannot disable it. Deletes terminal task trios older than 48h.
bash_tasks_vacuum::spawn(&coord);
// Slow per-container disk sampler: a `du` of each agent's state dir
// + writable rootfs every ~5 min, cached so the 5s container-load
// poll stays cheap cgroup-only reads. Feeds `disk_bytes` on the LOAD
// tab. See container_stats::disk_sampler_loop.
hive_c0re::container_stats::spawn_disk_sampler();
// build_logs.sqlite vacuum: c0re-side (single db). Failures kept
// 30d, successes 24h — see `build_logs::vacuum` for the rule.
hive_c0re::build_logs::spawn_vacuum(&coord);