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,7 +1,8 @@
|
|||
//! Host-side vacuum of every per-agent events.sqlite. The harness
|
||||
//! writes to `/state/hyperhive-events.sqlite` (bind-mounted from
|
||||
//! `/var/lib/hyperhive/agents/<name>/state/`); we open the same file
|
||||
//! from the host every hour and delete rows older than `KEEP_SECS`.
|
||||
//! writes to `/agents/<name>/harness/hyperhive-events.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`.
|
||||
//! Age-only — no row cap — so a chatty turn doesn't lose history
|
||||
//! sooner than a quiet one; disk pressure on a sustained burst is
|
||||
//! a cheaper problem than a missing event when the operator is
|
||||
|
|
@ -41,7 +42,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-events.sqlite");
|
||||
let path = Coordinator::agent_harness_dir(&name).join("hyperhive-events.sqlite");
|
||||
if !path.exists() {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue