Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

test(wiki): preserve sweep history on fresh Windows runners

Alan Hoffmeister8ae3c38e605e
diff --git a/crates/ai-memory-wiki/src/git.rs b/crates/ai-memory-wiki/src/git.rs
index 38c06a8e..03326ef7 100644
--- a/crates/ai-memory-wiki/src/git.rs
+++ b/crates/ai-memory-wiki/src/git.rs
@@ -175,7 +175,14 @@ impl GitAdapter {
/// Make the next path-scoped commit walk, as if the sweep were due.
#[cfg(test)]
pub(crate) fn age_last_walk(&self) {
- self.written().last_walk = Instant::now().checked_sub(SWEEP_INTERVAL);
+ let mut written = self.written();
+ if let Some(aged) = Instant::now().checked_sub(SWEEP_INTERVAL) {
+ written.last_walk = Some(aged);
+ } else {
+ // A fresh Windows runner may not have ten minutes of clock history.
+ // Preserve the previous walk so the sweep still counts missed writes.
+ written.walk_needed = true;
+ }
}
/// What the sweeps found; see [`SweepSnapshot`].