Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(learning): handle edge case in stability detector

Steven Enamakela2602d6137e7
diff --git a/crates/openhuman-core/src/agent/learning/stability_detector.rs b/crates/openhuman-core/src/agent/learning/stability_detector.rs
index b292eeafa8..a5e2dec050 100644
--- a/crates/openhuman-core/src/agent/learning/stability_detector.rs
+++ b/crates/openhuman-core/src/agent/learning/stability_detector.rs
@@ -204,7 +204,7 @@ pub const REBUILD_STATE_FILE: &str = "state/learning/rebuild.json";
/// The time of a workspace's last rebuild, as [`REBUILD_STATE_FILE`] holds it.
#[derive(Debug, serde::Serialize, serde::Deserialize)]
-struct RebuildState {
+pub(super) struct RebuildState {
last_rebuild_at: f64,
}
diff --git a/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs b/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
index 990ce3629a..fa8769deb1 100644
--- a/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
+++ b/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
@@ -11,7 +11,7 @@ use fs2::FileExt;
use crate::agent::learning::candidate::{self, CueFamily, FacetClass, LearningCandidate};
use tinymemory_api::provider::{FacetState, FacetType, ProfileFacet, UserState};
-use super::{class_budget, half_life, stability};
+use super::{class_budget, half_life, stability, RebuildState, TAU_EVICT, TAU_PROMOTE, TAU_PROVISIONAL};
// ── The rebuild time ──────────────────────────────────────────────────────────