feat(#2): split harness-internal state from agent-visible state
This commit is contained in:
parent
ce875646a5
commit
ae6d23594d
9 changed files with 113 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
//! Host-side vacuum of every per-agent turn-stats.sqlite. The harness
|
||||
//! writes to `/state/hyperhive-turn-stats.sqlite` (bind-mounted from
|
||||
//! `/var/lib/hyperhive/agents/<name>/state/`); we open the same file
|
||||
//! writes to `/agents/<name>/harness/hyperhive-turn-stats.sqlite`
|
||||
//! (bind-mounted from `/var/lib/hyperhive/agents/<name>/harness/`); we open the same file
|
||||
//! from the host every hour and delete rows older than `KEEP_SECS`.
|
||||
//! Mirrors `events_vacuum` in structure — host-side so the harness
|
||||
//! can't disable it, age-only so a chatty burst doesn't evict old
|
||||
|
|
@ -40,7 +40,7 @@ pub fn spawn(coord: &Arc<Coordinator>) {
|
|||
fn sweep_once() {
|
||||
for name in Coordinator::kept_state_names() {
|
||||
let path =
|
||||
Coordinator::agent_notes_dir(&name).join("hyperhive-turn-stats.sqlite");
|
||||
Coordinator::agent_harness_dir(&name).join("hyperhive-turn-stats.sqlite");
|
||||
if !path.exists() {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue