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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
test(macos): exercise native multi-display focus and capture recovery
Louis Beaumont4e82a52d8dc7
diff --git a/crates/screenpipe-engine/src/lib.rs b/crates/screenpipe-engine/src/lib.rsindex d6141e588..a397bc2a2 100644--- a/crates/screenpipe-engine/src/lib.rs+++ b/crates/screenpipe-engine/src/lib.rs@@ -133,3 +133,6 @@ pub use snapshot_compaction::start_snapshot_compaction;pub use ui_recorder::{start_ui_recording, UiRecorderConfig, UiRecorderHandle};pub use video::{video_quality_to_crf, video_quality_to_jpeg_q, video_quality_to_preset};pub mod search_only;++#[cfg(all(test, target_os = "macos"))]+mod multi_monitor_vm_test;diff --git a/crates/screenpipe-engine/src/multi_monitor_vm_test.rs b/crates/screenpipe-engine/src/multi_monitor_vm_test.rsnew file mode 100644index 000000000..d18bbc24f--- /dev/null+++ b/crates/screenpipe-engine/src/multi_monitor_vm_test.rs@@ -0,0 +1,426 @@+// screenpipe — AI that knows everything you've seen, said, or heard+// https://screenpipe.com+//! Opt-in native acceptance in a disposable macOS guest. No mocked topology.+use crate::focus_aware_controller::FocusAwareController;+use crate::focus_tracker::{new_tracker, FocusTracker};+use screenpipe_screen::monitor::{list_monitors, SafeMonitor};+use serde_json::Value;+use std::io::{BufRead, BufReader, Write};+use std::process::{Child, ChildStdin, Command, Stdio};+use std::sync::{mpsc, Arc};+use std::time::{Duration, Instant};+struct Fixture {+ child: Child,+ input: ChildStdin,+ output: mpsc::Receiver<String>,+ reader: Option<std::thread::JoinHandle<()>>,+}+impl Fixture {+ fn start() -> (Self, Value) {+ assert_eq!(+ std::env::var("SCREENPIPE_ISOLATED_VM_TEST").as_deref(),+ Ok("1")+ );+ let mut child = Command::new(std::env::var("SCREENPIPE_DISPLAY_FIXTURE").unwrap())+ .stdin(Stdio::piped())+ .stdout(Stdio::piped())+ .spawn()+ .unwrap();+ let input = child.stdin.take().unwrap();+ let stdout = child.stdout.take().unwrap();+ let (sender, output) = mpsc::channel();+ let reader = std::thread::spawn(move || {+ for line in BufReader::new(stdout).lines() {+ match line {+ Ok(line) => {+ if sender.send(line).is_err() {+ break;+ }+ }+ Err(_) => break,+ }+ }+ });+ let mut fixture = Self {+ child,+ input,+ output,+ reader: Some(reader),+ };+ let initial = fixture.read();+ (fixture, initial)+ }+ fn read(&mut self) -> Value {+ let line = self+ .output+ .recv_timeout(Duration::from_secs(15))+ .expect("native display fixture failed to answer within 15 seconds");+ let v = serde_json::from_str(&line).unwrap();+ eprintln!("native topology: {line}");+ v+ }+ fn command(&mut self, command: &str) -> Value {+ writeln!(self.input, "{command}").unwrap();+ self.input.flush().unwrap();+ self.read()+ }+}+impl Drop for Fixture {+ fn drop(&mut self) {+ let _ = writeln!(self.input, "quit");+ let _ = self.input.flush();+ let _ = self.child.kill();+ let _ = self.child.wait();+ if let Some(reader) = self.reader.take() {+ let _ = reader.join();+ }+ }+}+async fn wait_mapping(+ controller: &FocusAwareController,+ monitors: &[SafeMonitor],+ expected: Option<u32>,+) {+ let deadline = Instant::now() + Duration::from_secs(12);+ loop {+ let focused: Vec<_> = monitors+ .iter()+ .filter(|m| controller.hosts_focus_for_monitor(m))+ .map(|m| m.id())+ .collect();+ if focused == expected.into_iter().collect::<Vec<_>>() {+ return;+ }+ assert!(+ Instant::now() < deadline,+ "controller mapping expected {expected:?}, got {focused:?}"+ );+ tokio::time::sleep(Duration::from_millis(100)).await;+ }+}+fn verify_capture_marker(image: &image::DynamicImage, native: &Value) {+ // The helper paints a 200-point square at (+20,+20) on each display.+ // Sample its center in backing pixels, away from the cursor at (+100,+100).+ let x = (120. * image.width() as f64 / native["w"].as_f64().unwrap()) as u32;+ let y = (120. * image.height() as f64 / native["h"].as_f64().unwrap()) as u32;+ assert!(x < image.width() && y < image.height());+ let rgb = image.to_rgb8();+ let [red, green, blue] = rgb.get_pixel(x, y).0;+ let primary = native["main"].as_i64() == Some(1);+ let (dominant, other) = if primary { (red, blue) } else { (blue, red) };+ assert!(+ dominant > 150+ && dominant.saturating_sub(other) > 80+ && dominant.saturating_sub(green) > 80,+ "wrong display content: id={} primary={primary} pixel=({red},{green},{blue}) at ({x},{y})",+ native["id"]+ );+}+async fn wait_focus(tracker: &Arc<dyn FocusTracker>, expected: Option<u32>) {+ let deadline = Instant::now() + Duration::from_secs(12);+ loop {+ if tracker.current().map(|m| m.id) == expected {+ return;+ }+ assert!(+ Instant::now() < deadline,+ "focus expected {expected:?}, got {:?}",+ tracker.current()+ );+ tokio::time::sleep(Duration::from_millis(100)).await;+ }+}+async fn verify_displays(native: &Value) -> Vec<SafeMonitor> {+ let monitors = list_monitors().await;+ let displays = native["displays"].as_array().unwrap();+ assert_eq!(+ monitors.len(),+ displays.len(),+ "capture backend must see actual CG displays"+ );+ for d in displays {+ let m = monitors+ .iter()+ .find(|m| m.id() as u64 == d["id"].as_u64().unwrap())+ .expect("missing native display");+ eprintln!(+ "capture topology id={} origin=({}, {}) dimensions={}x{} sck={}",+ m.id(),+ m.x(),+ m.y(),+ m.width(),+ m.height(),+ m.uses_sck_backend()+ );+ assert_eq!(m.x() as i64, d["x"].as_i64().unwrap());+ assert_eq!(m.y() as i64, d["y"].as_i64().unwrap());+ assert_eq!(+ m.width() as i64,+ d["w"].as_i64().unwrap(),+ "focus bounds must use display points"+ );+ assert_eq!(+ m.height() as i64,+ d["h"].as_i64().unwrap(),+ "focus bounds must use display points"+ );+ }+ monitors+}+#[tokio::test(flavor = "multi_thread", worker_threads = 4)]+#[ignore = "requires isolated logged-in Mac VM and native display fixture"]+async fn native_multi_monitor_focus_capture_gap_and_hotplug() {+ let (mut fixture, initial) = Fixture::start();+ assert_eq!(+ initial["displays"].as_array().unwrap().len(),+ 2,+ "requires one base and one virtual display"+ );+ let primary = initial["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| d["main"].as_i64() == Some(1))+ .unwrap()+ .clone();+ let primary_id = primary["id"].as_u64().unwrap() as u32;+ let width = primary["w"].as_i64().unwrap();+ verify_displays(&initial).await;+ let tracker = new_tracker();+ let controller = FocusAwareController::new(tracker.clone());+ for (label, x, y) in [+ ("right", width, 0),+ ("left", -1280, 0),+ ("above", 0, -720),+ ("offset", width, 400),+ ] {+ eprintln!("CASE {label}");+ let native = fixture.command(&format!("layout {x} {y}"));+ let requested = native["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| d["id"] == native["extra"])+ .unwrap();+ assert_eq!(+ requested["x"].as_i64(),+ Some(x),+ "requested layout was not applied"+ );+ assert_eq!(+ requested["y"].as_i64(),+ Some(y),+ "requested layout was not applied"+ );+ assert_eq!(+ requested["mirror"].as_u64(),+ Some(0),+ "extended displays required"+ );+ let monitors = verify_displays(&native).await;+ for d in native["displays"].as_array().unwrap() {+ let px = d["x"].as_f64().unwrap() + 100.;+ let py = d["y"].as_f64().unwrap() + 100.;+ let actual = fixture.command(&format!("warp {px} {py}"));+ assert_eq!(actual["cursor_x"].as_f64().unwrap(), px);+ assert_eq!(actual["cursor_y"].as_f64().unwrap(), py);+ let id = d["id"].as_u64().unwrap() as u32;+ wait_focus(&tracker, Some(id)).await;+ wait_mapping(&controller, &monitors, Some(id)).await;+ assert!(!controller.resolution_degraded());+ for m in &monitors {+ assert_eq!(controller.hosts_focus_for_monitor(m), m.id() == id);+ }+ let m = monitors.iter().find(|m| m.id() == id).unwrap();+ let frame = tokio::time::timeout(Duration::from_secs(20), m.capture_image())+ .await+ .unwrap()+ .unwrap();+ assert!(frame.width() > 0 && frame.height() > 0);+ verify_capture_marker(&frame, d);+ if let Ok(dir) = std::env::var("SCREENPIPE_VM_EVIDENCE_DIR") {+ std::fs::create_dir_all(&dir).unwrap();+ frame.save(format!("{dir}/{label}-{id}.png")).unwrap();+ }+ eprintln!(+ "CAPTURE {label} display={id} actual={}x{}",+ frame.width(),+ frame.height()+ );+ }+ }+ // An offset layout leaves a real rectangle outside every display. Confirm+ // where the OS cursor actually lands, rather than injecting tracker state.+ let gap = fixture.command(&format!("warp {} 200", width + 50));+ let gap_monitors = verify_displays(&gap).await;+ let actual_x = gap["cursor_x"].as_f64().unwrap();+ let actual_y = gap["cursor_y"].as_f64().unwrap();+ let literal_gap_supported = actual_x == (width + 50) as f64 && actual_y == 200.;+ eprintln!(+ "LITERAL_GAP requested=({},200) actual=({actual_x},{actual_y}) clamped={}",+ width + 50,+ !literal_gap_supported+ );+ if literal_gap_supported {+ wait_focus(&tracker, None).await;+ wait_mapping(&controller, &gap_monitors, None).await;+ assert!(!controller.resolution_degraded());+ tokio::time::sleep(Duration::from_secs(31)).await;+ assert!(controller.resolution_degraded());+ assert!(gap_monitors+ .iter()+ .all(|m| !controller.hosts_focus_for_monitor(m)));+ eprintln!("LITERAL_GAP: native off-display cursor held; grace degraded as expected");+ } else {+ let landing = gap["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| {+ let x = d["x"].as_f64().unwrap();+ let y = d["y"].as_f64().unwrap();+ actual_x >= x+ && actual_x < x + d["w"].as_f64().unwrap()+ && actual_y >= y+ && actual_y < y + d["h"].as_f64().unwrap()+ })+ .expect("clamped cursor must land on an actual display");+ let landing_id = landing["id"].as_u64().unwrap() as u32;+ wait_focus(&tracker, Some(landing_id)).await;+ wait_mapping(&controller, &gap_monitors, Some(landing_id)).await;+ assert!(!controller.resolution_degraded());+ eprintln!("LITERAL_GAP UNSUPPORTED: macOS clamped the cursor onto a real display; no literal-gap reproduction or pass claimed");+ }+ fixture.command("warp 100 100");+ wait_focus(&tracker, Some(primary_id)).await;+ wait_mapping(&controller, &gap_monitors, Some(primary_id)).await;+ assert!(!controller.resolution_degraded());+ eprintln!("PRIMARY: cursor and attribution resolved on primary");+ // This intentionally omits the monitor watcher's fresh discovery while+ // rearranging real displays. It tests native resolution against stale+ // cached geometry, not a mocked tracker or the customer's literal gap.+ eprintln!("STALE_TOPOLOGY: withholding watcher discovery; native displays/cursor, not literal-gap/customer reproduction");+ let stale_native = fixture.command("layout -1280 0");+ let stale_extra_id = stale_native["extra"].as_u64().unwrap() as u32;+ let stale_extra = stale_native["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| d["id"].as_u64() == Some(stale_extra_id as u64))+ .unwrap();+ assert_eq!(stale_extra["x"].as_i64(), Some(-1280));+ assert_eq!(stale_extra["y"].as_i64(), Some(0));+ assert_eq!(stale_extra["mirror"].as_u64(), Some(0));+ let stale_cursor = fixture.command("warp -1180 100");+ assert_eq!(stale_cursor["cursor_x"].as_f64(), Some(-1180.));+ assert_eq!(stale_cursor["cursor_y"].as_f64(), Some(100.));+ // Do not call list_monitors/verify_displays until after the grace check.+ wait_focus(&tracker, None).await;+ wait_mapping(&controller, &gap_monitors, None).await;+ assert!(!controller.resolution_degraded());+ tokio::time::sleep(Duration::from_secs(31)).await;+ assert!(+ controller.resolution_degraded(),+ "stale cached topology must degrade after grace"+ );+ assert!(gap_monitors+ .iter()+ .all(|m| !controller.hosts_focus_for_monitor(m)));+ let fresh_monitors = verify_displays(&stale_cursor).await;+ wait_focus(&tracker, Some(stale_extra_id)).await;+ wait_mapping(&controller, &fresh_monitors, Some(stale_extra_id)).await;+ assert!(!controller.resolution_degraded());+ let unchanged_cursor = fixture.command("report");+ assert_eq!(unchanged_cursor["cursor_x"].as_f64(), Some(-1180.));+ assert_eq!(unchanged_cursor["cursor_y"].as_f64(), Some(100.));+ eprintln!("STALE_TOPOLOGY PASS: native unresolved grace and attribution recovery after fresh discovery, without moving cursor");+ let restored = fixture.command(&format!("layout {width} 400"));+ let restored_extra = restored["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| d["id"] == restored["extra"])+ .unwrap();+ assert_eq!(restored_extra["x"].as_i64(), Some(width));+ assert_eq!(restored_extra["y"].as_i64(), Some(400));+ let gap_monitors = verify_displays(&restored).await;+ // Remove the display that actually holds focus; removing an already-idle+ // display cannot expose stale focused identities after hot-unplug.+ let extra_before_remove = gap["extra"].as_u64().unwrap() as u32;+ fixture.command(&format!("warp {} 500", width + 100));+ wait_focus(&tracker, Some(extra_before_remove)).await;+ wait_mapping(&controller, &gap_monitors, Some(extra_before_remove)).await;+ let removed = fixture.command("remove");+ let remaining = verify_displays(&removed).await;+ assert_eq!(remaining.len(), 1);+ assert_eq!(remaining[0].id(), primary_id);+ // Explicitly return the pointer to the remaining display. The test makes+ // no promise that macOS automatically relocates a warped off-screen cursor.+ fixture.command("warp 100 100");+ wait_focus(&tracker, Some(primary_id)).await;+ wait_mapping(&controller, &remaining, Some(primary_id)).await;+ assert!(!controller.resolution_degraded());+ let recovered_frame =+ tokio::time::timeout(Duration::from_secs(20), remaining[0].capture_image())+ .await+ .unwrap()+ .unwrap();+ let remaining_native = &removed["displays"].as_array().unwrap()[0];+ verify_capture_marker(&recovered_frame, remaining_native);+ eprintln!("HOT_UNPLUG: focused secondary removed; primary focus and red capture recovered");+ let retina = fixture.command("add-retina");+ assert_eq!(verify_displays(&retina).await.len(), 2);+ let positioned = fixture.command(&format!("layout {width} 0"));+ let monitors = verify_displays(&positioned).await;+ let extra = positioned["extra"].as_u64().unwrap() as u32;+ let native_retina = positioned["displays"]+ .as_array()+ .unwrap()+ .iter()+ .find(|d| d["id"].as_u64() == Some(extra as u64))+ .unwrap();+ assert_eq!(native_retina["x"].as_i64(), Some(width));+ assert_eq!(native_retina["y"].as_i64(), Some(0));+ assert_eq!(+ native_retina["pixels_w"].as_u64().unwrap(),+ native_retina["w"].as_u64().unwrap() * 2,+ "retina must be actual 2x backing scale"+ );+ fixture.command(&format!("warp {} 100", width + 100));+ wait_focus(&tracker, Some(extra)).await;+ wait_mapping(&controller, &monitors, Some(extra)).await;+ let m = monitors.iter().find(|m| m.id() == extra).unwrap();+ let image = tokio::time::timeout(Duration::from_secs(20), m.capture_image())+ .await+ .unwrap()+ .unwrap();+ assert_eq!(+ image.width() as u64,+ native_retina["pixels_w"].as_u64().unwrap()+ );+ assert_eq!(+ image.height() as u64,+ native_retina["pixels_h"].as_u64().unwrap()+ );+ verify_capture_marker(&image, native_retina);+ eprintln!("HIDPI_CAPTURE {}x{}", image.width(), image.height());+ assert!(!controller.resolution_degraded());+ controller.shutdown();+ tracker.stop();+ // Drop reaps the helper process. Independently verify its virtual display+ // disappeared through the production enumeration path, creating no helper.+ drop(fixture);+ let cleanup_deadline = Instant::now() + Duration::from_secs(12);+ loop {+ let remaining = list_monitors().await;+ if remaining.len() == 1 && remaining[0].id() == primary_id {+ break;+ }+ assert!(+ Instant::now() < cleanup_deadline,+ "fixture display survived helper cleanup"+ );+ tokio::time::sleep(Duration::from_millis(100)).await;+ }+ eprintln!("PASS multi-monitor layouts, captures, stale-topology grace/recovery, hotplug and Retina; literal_gap={}", if literal_gap_supported { "native gap exercised" } else { "UNSUPPORTED (OS clamped cursor), not reproduced" });+}diff --git a/docs/COVERAGE.md b/docs/COVERAGE.mdindex 9a5a6043b..d4cb345ed 100644--- a/docs/COVERAGE.md+++ b/docs/COVERAGE.md@@ -37,15 +37,15 @@ results and `cargo llvm-cov` data on top when judging release confidence.### Core Engine- Mapped suites: 37-- Mapped Rust files: 400+- Mapped Rust files: 401- Active test blocks: 3894-- Ignored/manual test blocks: 185+- Ignored/manual test blocks: 186- Weighted coverage points: 3208.0| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 33 | 3731 | 167 | 3135.0 | 21 | 11 | 100% |-| macos | 32 | 3774 | 146 | 3130.3 | 22 | 11 | 100% |+| windows | 33 | 3731 | 168 | 3135.0 | 21 | 11 | 100% |+| macos | 32 | 3774 | 147 | 3130.3 | 22 | 11 | 100% || linux | 29 | 3309 | 142 | 2753.3 | 20 | 11 | 100% |## Refreshdiff --git a/docs/coverage/CORE.md b/docs/coverage/CORE.mdindex 29d2d7297..15c0075b9 100644--- a/docs/coverage/CORE.md+++ b/docs/coverage/CORE.md@@ -8,10 +8,10 @@ confidence, and criticality.- Manifest: `docs/coverage/core-engine-map.json`- Tracked crates: screenpipe-engine, screenpipe-db, screenpipe-sqlite-coordinator, screenpipe-audio, screenpipe-screen, screenpipe-a11y, screenpipe-fs- Mapped suites: 37-- Mapped Rust files: 400+- Mapped Rust files: 401- Active test blocks: 3894-- Ignored/manual test blocks: 185-- Declared test blocks: 4079+- Ignored/manual test blocks: 186+- Declared test blocks: 4080- Weighted coverage points: 3208.0Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.@@ -23,15 +23,15 @@ are explicitly enabled in a runtime lane.| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 33 | 3731 | 167 | 3135.0 | 21 | 11 | 100% |-| macos | 32 | 3774 | 146 | 3130.3 | 22 | 11 | 100% |+| windows | 33 | 3731 | 168 | 3135.0 | 21 | 11 | 100% |+| macos | 32 | 3774 | 147 | 3130.3 | 22 | 11 | 100% || linux | 29 | 3309 | 142 | 2753.3 | 20 | 11 | 100% |## Crate Summary| Crate | Suites | Integration files | Source unit files | Active tests | Ignored tests | Weighted points | Flows || --- | --- | --- | --- | --- | --- | --- | --- |-| screenpipe-engine | 12 | 22 | 131 | 1863 | 53 | 1434.8 | 10 |+| screenpipe-engine | 12 | 22 | 132 | 1863 | 54 | 1434.8 | 10 || screenpipe-db | 5 | 69 | 28 | 629 | 32 | 599.4 | 9 || screenpipe-sqlite-coordinator | 1 | 0 | 3 | 27 | 0 | 27.0 | 2 || screenpipe-audio | 8 | 29 | 53 | 695 | 53 | 606.9 | 5 |@@ -68,11 +68,11 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| configuration | 2 suites / 153 active / 3 ignored / 138.7 pts | 2 suites / 153 active / 3 ignored / 138.7 pts | 2 suites / 153 active / 3 ignored / 138.7 pts || database | 7 suites / 585 active / 28 ignored / 555.4 pts | 7 suites / 585 active / 28 ignored / 555.4 pts | 7 suites / 585 active / 28 ignored / 555.4 pts || db-search | 2 suites / 120 active / 9 ignored / 120.0 pts | 2 suites / 120 active / 9 ignored / 120.0 pts | 2 suites / 120 active / 9 ignored / 120.0 pts |-| engine-lifecycle | 6 suites / 270 active / 1 ignored / 242.0 pts | 6 suites / 270 active / 1 ignored / 242.0 pts | 6 suites / 266 active / 9 ignored / 241.1 pts |+| engine-lifecycle | 6 suites / 270 active / 2 ignored / 242.0 pts | 6 suites / 270 active / 2 ignored / 242.0 pts | 6 suites / 266 active / 9 ignored / 241.1 pts || local-api | 3 suites / 485 active / 12 ignored / 343.4 pts | 3 suites / 485 active / 12 ignored / 343.4 pts | 3 suites / 485 active / 12 ignored / 343.4 pts || meeting | 6 suites / 1757 active / 32 ignored / 1437.2 pts | 6 suites / 1757 active / 32 ignored / 1437.2 pts | 4 suites / 1403 active / 28 ignored / 1106.9 pts || ocr | 4 suites / 141 active / 7 ignored / 130.8 pts | 4 suites / 134 active / 7 ignored / 128.6 pts | 3 suites / 125 active / 6 ignored / 119.6 pts |-| os-integration | 1 suites / 6 active / 0 ignored / 1.7 pts | 1 suites / 6 active / 0 ignored / 1.7 pts | - |+| os-integration | 1 suites / 6 active / 1 ignored / 1.7 pts | 1 suites / 6 active / 1 ignored / 1.7 pts | - || performance | 13 suites / 1686 active / 83 ignored / 1488.5 pts | 14 suites / 1811 active / 91 ignored / 1538.5 pts | 13 suites / 1686 active / 83 ignored / 1488.5 pts || pipes | 1 suites / 551 active / 3 ignored / 385.7 pts | 1 suites / 551 active / 3 ignored / 385.7 pts | 1 suites / 551 active / 3 ignored / 385.7 pts || privacy | 5 suites / 1013 active / 42 ignored / 816.8 pts | 5 suites / 1069 active / 21 ignored / 818.5 pts | 5 suites / 971 active / 14 ignored / 781.7 pts |@@ -140,7 +140,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| engine-capture-timeline | screenpipe-engine | windows, macos, linux | vision-capture, timeline, storage, performance | capture-ocr-pipeline, timeline-streaming, performance-liveness | high | partial | mixed | 25 | 307 | 26 | Covers capture trigger logic, frame/audio linking, hot cache, timeline refresh regressions, fragmented MP4 extraction, and HD-mode control. Several real-data tests are intentionally ignored by default. || engine-config-lifecycle | screenpipe-engine | windows, macos, linux | configuration, engine-lifecycle, performance | settings-to-engine-config, engine-health-lifecycle, performance-liveness | high | strong | mixed | 13 | 125 | 1 | Fast logic coverage for the config bridge, health-endpoint identity, tray health debounce, sleep/power policies, and queue backpressure. || engine-db-recovery-cli | screenpipe-engine | windows, macos, linux | database, engine-lifecycle | engine-health-lifecycle, performance-liveness | high | strong | unit | 1 | 33 | 0 | Exact DB/WAL/SHM working-copy preservation, rollback on archive failure, and restart repair for crashes during the multi-file generation swap. |-| engine-focus-os | screenpipe-engine | windows, macos | engine-lifecycle, os-integration | engine-health-lifecycle, performance-liveness | medium | conditional | unit | 3 | 6 | 0 | Platform focus-tracker parsing/helpers. These files are cfg-gated and only execute on their target OS. |+| engine-focus-os | screenpipe-engine | windows, macos | engine-lifecycle, os-integration | engine-health-lifecycle, performance-liveness | medium | conditional | unit | 4 | 6 | 1 | Platform focus-tracker parsing/helpers. These files are cfg-gated and only execute on their target OS. || engine-linux-keep-awake | screenpipe-engine | linux | engine-lifecycle | engine-health-lifecycle | high | conditional | mixed | 1 | 2 | 8 | Existing isolated-process missing/stalled bus regressions plus ignored live logind inhibitor tests. Live tests require logind and explicit execution. || engine-local-api-search-integration | screenpipe-engine | windows, macos, linux | local-api, db-search | local-api-search | high | strong | integration | 1 | 13 | 5 | Active /search route test builds an audio-disabled router, seeds captured-screen-shaped OCR data into an in-memory DB, and asserts the HTTP response and pagination. || engine-meeting-privacy-sync | screenpipe-engine | windows, macos, linux | meeting, privacy, ui-events, pipes, sync | meeting-live-notes, privacy-and-redaction, accessibility-ui-events, performance-liveness | medium | strong | unit | 33 | 551 | 3 | Unit-heavy coverage for privacy filter policy, capture exclusions, UI recorder safety, pipes/live-view/structured-output helpers, sync helpers, and CLI parsing. Meeting detection moved to the engine-meeting-watcher suite. |@@ -437,6 +437,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| engine-meeting-watcher | screenpipe-engine | src/meeting_watcher/ui_scan/macos.rs | source | 2 | 2 | 4 || engine-meeting-watcher | screenpipe-engine | src/meeting_watcher/ui_scan/tests.rs | source | 137 | 0 | 137 || engine-meeting-watcher | screenpipe-engine | src/meeting_watcher/ui_scan/windows.rs | source | 0 | 1 | 1 |+| engine-focus-os | screenpipe-engine | src/multi_monitor_vm_test.rs | source | 0 | 1 | 1 || engine-config-lifecycle | screenpipe-engine | src/permission_monitor.rs | source | 1 | 0 | 1 || engine-telemetry-observability | screenpipe-engine | src/piggyback_telemetry.rs | source | 1 | 0 | 1 || engine-workflows | screenpipe-engine | src/pipe_permissions_middleware.rs | source | 6 | 0 | 6 |diff --git a/docs/coverage/core-engine-map.json b/docs/coverage/core-engine-map.jsonindex dcaacb454..5d4c4c307 100644--- a/docs/coverage/core-engine-map.json+++ b/docs/coverage/core-engine-map.json@@ -431,6 +431,7 @@"crate": "screenpipe-engine","files": ["src/focus_tracker/darwin.rs",+ "src/multi_monitor_vm_test.rs","src/focus_tracker/windows.rs","src/process_priority.rs"],