From bb990508c6fb51d8e218f0df0e7a5df98fde9404 Mon Sep 17 00:00:00 2001 From: lexis Date: Sat, 6 Jun 2026 08:39:31 +0200 Subject: [PATCH 1/3] docs(CLAUDE.md): add hive_stats.rs and container_stats.rs entries (follow-up to #1430 #1432) --- CLAUDE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 4e967bc5..80be910e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -118,6 +118,15 @@ hive-c0re/ host daemon + sibling operator CLI (lib + 2 bins) Dashboard surfaces the log on expand. Backed by `/var/lib/hyperhive/build_logs.sqlite`; hourly retention sweep via the existing vacuum. + src/hive_stats.rs hive-wide turn-stats aggregation: reads every + agent's hyperhive-turn-stats.sqlite read-only, + rolls up swarm totals + per-agent breakdowns + + model mix. Backs GET /api/stats-hive for the + dashboard's ST4TS tab; missing / unreadable dbs + skipped (one bad db never fails the endpoint). + src/container_stats.rs per-container resource metrics (cpu %, mem %, swap) + polled live; aggregated for dashboard display. + Skips unhealthy / stopped containers gracefully. src/crash_watch.rs poll every 10s; fire HelperEvent::ContainerCrash when a previously-running container disappears without an operator-initiated transient (or a From 840abab82d1d89ac7f8de4bc65f55466c3501a37 Mon Sep 17 00:00:00 2001 From: lexis Date: Sat, 6 Jun 2026 08:43:51 +0200 Subject: [PATCH 2/3] accuracy fix: container_stats.rs tracks mem metrics only, not swap --- CLAUDE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 80be910e..9e7ccf31 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -124,9 +124,10 @@ hive-c0re/ host daemon + sibling operator CLI (lib + 2 bins) model mix. Backs GET /api/stats-hive for the dashboard's ST4TS tab; missing / unreadable dbs skipped (one bad db never fails the endpoint). - src/container_stats.rs per-container resource metrics (cpu %, mem %, swap) - polled live; aggregated for dashboard display. - Skips unhealthy / stopped containers gracefully. + src/container_stats.rs per-container resource metrics (cpu %, current/peak/max + memory in bytes) polled live from cgroup-v2; + aggregated for dashboard display. Skips unhealthy / + stopped containers gracefully. src/crash_watch.rs poll every 10s; fire HelperEvent::ContainerCrash when a previously-running container disappears without an operator-initiated transient (or a From f32684b2424d233fb86952c7958f4fd570caa310 Mon Sep 17 00:00:00 2001 From: lexis Date: Sat, 6 Jun 2026 08:45:15 +0200 Subject: [PATCH 3/3] docs: add endpoint name for container_stats (GET /api/container-resources) for parity --- CLAUDE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9e7ccf31..014ed05c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -125,9 +125,10 @@ hive-c0re/ host daemon + sibling operator CLI (lib + 2 bins) dashboard's ST4TS tab; missing / unreadable dbs skipped (one bad db never fails the endpoint). src/container_stats.rs per-container resource metrics (cpu %, current/peak/max - memory in bytes) polled live from cgroup-v2; - aggregated for dashboard display. Skips unhealthy / - stopped containers gracefully. + memory in bytes) polled live from cgroup-v2. Backs + GET /api/container-resources for the dashboard's + load chips. Skips unhealthy / stopped containers + gracefully. src/crash_watch.rs poll every 10s; fire HelperEvent::ContainerCrash when a previously-running container disappears without an operator-initiated transient (or a