Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

chore(health): reword vision-stall WARN — describe what it actually means

Louis Beaumonta08ec91400be
diff --git a/crates/screenpipe-engine/src/routes/health.rs b/crates/screenpipe-engine/src/routes/health.rs
index 01bf139a5..04abf4b11 100644
--- a/crates/screenpipe-engine/src/routes/health.rs
+++ b/crates/screenpipe-engine/src/routes/health.rs
@@ -295,12 +295,19 @@ async fn health_check_inner(state: &Arc<AppState>) -> HealthCheckResponse {
if now_ts.saturating_sub(prev) >= 60 {
LAST_VISION_STALL_LOG.store(now_ts, Ordering::Relaxed);
let (rs, ri, ws, wi) = state.db.pool_stats();
+ // last_db_write_ts only advances when a UNIQUE frame is
+ // actually inserted; dedup-skipped captures don't update it.
+ // So a long delta here typically means the screen is static
+ // (idle user, slide deck, video call, IDE waiting) — NOT a
+ // stuck pipeline. Phrase it that way to stop the false-alarm
+ // panic, and keep the pool stats inline since they're still
+ // useful when the cause IS real backpressure.
warn!(
- "health_check: vision DB writes stalled — capture heartbeat {}s ago but last DB write {}s ago ({}) | pool: read={}/{} idle, write={}/{} idle",
- now_ts.saturating_sub(vision_snap.last_capture_attempt_ts),
+ "health_check: no unique vision frame in {}s (capture heartbeat {}s ago — usually means a static screen / idle user, not a pipeline stall) | pool: read={}/{} idle, write={}/{} idle | suspected: {}",
now_ts.saturating_sub(vision_snap.last_db_write_ts),
- suspected_stall_cause(ri, wi),
+ now_ts.saturating_sub(vision_snap.last_capture_attempt_ts),
ri, rs, wi, ws,
+ suspected_stall_cause(ri, wi),
);
}
}