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
fix(db): preserve timeline history with malformed audio offsets
louisc20e60348649
diff --git a/crates/screenpipe-db/src/db/frames.rs b/crates/screenpipe-db/src/db/frames.rsindex a7b279eb1..f362eaf13 100644--- a/crates/screenpipe-db/src/db/frames.rs+++ b/crates/screenpipe-db/src/db/frames.rs@@ -4,6 +4,60 @@use super::*;+// Timeline reads must tolerate malformed historical offsets without losing+// the transcript or aborting the entire frame request. Never rewrite the source+// row: fall back to its known chunk timestamp when its segment bounds are invalid.+fn timeline_audio_range(+ timestamp: DateTime<Utc>,+ start: Option<f64>,+ end: Option<f64>,+ duration: f64,+ is_live: bool,+) -> (DateTime<Utc>, DateTime<Utc>, bool) {+ let add_seconds = |seconds: f64| {+ if !seconds.is_finite() || !(seconds * 1000.0).is_finite() {+ return None;+ }+ let delta = chrono::Duration::try_milliseconds((seconds * 1000.0) as i64)?;+ timestamp.checked_add_signed(delta)+ };+ let valid_offsets = start.is_none_or(f64::is_finite)+ && end.is_none_or(f64::is_finite)+ && !matches!((start, end), (Some(a), Some(b)) if b < a);+ if valid_offsets {+ let from = if is_live {+ Some(timestamp)+ } else {+ add_seconds(start.unwrap_or(0.0))+ };+ let to = if let Some(end) = end {+ add_seconds(if is_live {+ end - start.unwrap_or(0.0)+ } else {+ end+ })+ } else {+ // A known start remains useful when the end is absent or chunk+ // duration predates it. Treat that segment as a point, not an+ // invalid offset pair, so we retain its precise capture timestamp.+ add_seconds(duration).map(|to| from.map_or(to, |from| to.max(from)))+ };+ if let (Some(from), Some(to)) = (from, to) {+ if to >= from {+ return (from, to, true);+ }+ }+ }+ let to = if duration >= 0.0 {+ add_seconds(duration)+ } else {+ None+ }+ .or_else(|| add_seconds(5.0))+ .unwrap_or(timestamp);+ (timestamp, to, false)+}+impl DatabaseManager {pub async fn insert_video_chunk(&self,@@ -1327,37 +1381,42 @@ impl DatabaseManager {// share the same aliased columns, so a single loop attaches both to frames.for row in audio_rows.into_iter().chain(live_rows) {let audio_timestamp: DateTime<Utc> = row.get("timestamp");- let start_offset: Option<f64> = row.try_get("start_time").ok();- let end_offset: Option<f64> = row.try_get("end_time").ok();+ let start_offset = row.try_get::<Option<f64>, _>("start_time").unwrap_or(None);+ let end_offset = row.try_get::<Option<f64>, _>("end_time").unwrap_or(None);- // Calculate audio time range- // start_time and end_time are offsets in seconds from the audio timestamplet is_live = row.try_get::<bool, _>("is_live").unwrap_or(false);- let audio_start = if is_live {- audio_timestamp- } else if let Some(start) = start_offset {- audio_timestamp + chrono::Duration::milliseconds((start * 1000.0) as i64)- } else {- audio_timestamp- };-- let audio_end = if let Some(end) = end_offset {- let remaining = if is_live {- end - start_offset.unwrap_or(0.0)- } else {- end- };- audio_timestamp- + chrono::Duration::milliseconds((remaining.max(0.0) * 1000.0) as i64)- } else {- // If no end_time, use duration_secs to calculate end- let duration: f64 = row.try_get("duration_secs").unwrap_or(5.0);- audio_timestamp + chrono::Duration::milliseconds((duration * 1000.0) as i64)- };-- // Pad the search range so nearby frames also get the audio indicator- let search_start = audio_start - chrono::Duration::seconds(AUDIO_FRAME_PAD_SECS);- let search_end = audio_end + chrono::Duration::seconds(AUDIO_FRAME_PAD_SECS);+ let duration_secs = row+ .try_get::<Option<f64>, _>("duration_secs")+ .ok()+ .flatten()+ .filter(|duration| {+ duration.is_finite()+ && *duration >= 0.0+ && chrono::Duration::try_milliseconds((*duration * 1000.0) as i64)+ .and_then(|delta| audio_timestamp.checked_add_signed(delta))+ .is_some()+ })+ .unwrap_or(5.0);+ let (audio_start, audio_end, valid_offsets) = timeline_audio_range(+ audio_timestamp,+ start_offset,+ end_offset,+ duration_secs,+ is_live,+ );+ if !valid_offsets {+ warn!(+ audio_chunk_id = row.get::<i64, _>("audio_chunk_id"),+ "invalid timeline audio offsets; preserving transcript at chunk timestamp"+ );+ }+ // Checked padding also handles records near DateTime's limits.+ let search_start = audio_start+ .checked_sub_signed(chrono::Duration::seconds(AUDIO_FRAME_PAD_SECS))+ .unwrap_or(DateTime::<Utc>::MIN_UTC);+ let search_end = audio_end+ .checked_add_signed(chrono::Duration::seconds(AUDIO_FRAME_PAD_SECS))+ .unwrap_or(DateTime::<Utc>::MAX_UTC);// Create the audio entry oncelet audio_entry = AudioEntry {@@ -1366,12 +1425,12 @@ impl DatabaseManager {device_name: row.get("audio_device"),is_input: row.get("is_input_device"),audio_file_path: row.get("audio_path"),- duration_secs: row.get("duration_secs"),+ duration_secs,audio_chunk_id: row.get("audio_chunk_id"),speaker_id: row.try_get("speaker_id").ok(),speaker_name: row.try_get("speaker_name").ok(),- start_time: start_offset,- end_time: end_offset,+ start_time: if valid_offsets { start_offset } else { None },+ end_time: if valid_offsets { end_offset } else { None },};// Find ALL frames within the padded audio time rangediff --git a/crates/screenpipe-db/tests/timeline_frameless_audio_test.rs b/crates/screenpipe-db/tests/timeline_frameless_audio_test.rsindex 5b96703ef..d01d5dc0c 100644--- a/crates/screenpipe-db/tests/timeline_frameless_audio_test.rs+++ b/crates/screenpipe-db/tests/timeline_frameless_audio_test.rs@@ -231,4 +231,108 @@ mod timeline_frameless_audio_tests {"nearby speech should attach to the real frame");}+ /// Broken offsets previously panicked the ordered-map lookup and hid every+ /// saved frame in the request. Preserve all transcripts using the known+ /// chunk timestamp, while leaving valid segments at their exact offset.+ #[tokio::test]+ async fn reversed_audio_offsets_do_not_abort_timeline_history() {+ assert_audio_offsets_survive(&[("reversed", 90.0, 1.0, false), ("valid", 2.0, 4.0, true)])+ .await;+ }++ #[tokio::test]+ async fn extreme_audio_offsets_do_not_abort_timeline_history() {+ assert_audio_offsets_survive(&[+ ("infinite", f64::INFINITY, 2.0, false),+ ("overflow", 1.0e30, 1.0e30, false),+ ("negative-overflow", -1.0e30, -1.0e30, false),+ ("valid", 2.0, 4.0, true),+ ])+ .await;+ }++ async fn assert_audio_offsets_survive(cases: &[(&str, f64, f64, bool)]) {+ use chrono::Timelike;+ let db = setup_test_db().await;+ let base = Utc::now().with_nanosecond(0).unwrap();+ for (index, (name, start, end, _)) in cases.iter().enumerate() {+ let at = base + Duration::seconds(index as i64 * 60);+ let chunk = db+ .insert_audio_chunk(&format!("{name}.mp4"), Some(at))+ .await+ .unwrap();+ db.insert_audio_transcription(+ chunk,+ name,+ 0,+ "test",+ &output_device(),+ None,+ Some(*start),+ Some(*end),+ Some(at),+ )+ .await+ .unwrap();+ }+ let chunks = db+ .find_video_chunks(base - Duration::seconds(1), base + Duration::minutes(5))+ .await+ .expect("one malformed segment must not discard timeline history");+ for (index, (name, start, end, valid)) in cases.iter().enumerate() {+ let audio = chunks+ .frames+ .iter()+ .flat_map(|frame| &frame.audio_entries)+ .find(|audio| audio.transcription == *name)+ .expect("each transcript must survive, including malformed timing");+ let at = base + Duration::seconds(index as i64 * 60);+ assert_eq!(+ audio.captured_at,+ Some(if *valid {+ at + Duration::seconds(2)+ } else {+ at+ })+ );+ assert_eq!(audio.start_time, if *valid { Some(*start) } else { None });+ assert_eq!(audio.end_time, if *valid { Some(*end) } else { None });+ }+ }+ #[tokio::test]+ async fn missing_audio_end_preserves_the_known_segment_start() {+ use chrono::Timelike;+ let db = setup_test_db().await;+ let base = Utc::now().with_nanosecond(0).unwrap();+ let chunk = db+ .insert_audio_chunk("start-only.mp4", Some(base))+ .await+ .unwrap();+ db.insert_audio_transcription(+ chunk,+ "known start",+ 0,+ "test",+ &output_device(),+ None,+ Some(90.0),+ None,+ Some(base),+ )+ .await+ .unwrap();+ let chunks = db+ .find_video_chunks(base - Duration::seconds(1), base + Duration::minutes(3))+ .await+ .unwrap();+ let audio = chunks+ .frames+ .iter()+ .flat_map(|frame| &frame.audio_entries)+ .find(|audio| audio.transcription == "known start")+ .unwrap();+ assert_eq!(audio.captured_at, Some(base + Duration::seconds(90)));+ assert_eq!(audio.start_time, Some(90.0));+ assert_eq!(audio.end_time, None);+ }}diff --git a/docs/COVERAGE.md b/docs/COVERAGE.mdindex 759ad3d83..87751ec39 100644--- a/docs/COVERAGE.md+++ b/docs/COVERAGE.md@@ -38,15 +38,15 @@ results and `cargo llvm-cov` data on top when judging release confidence.- Mapped suites: 36- Mapped Rust files: 374-- Active test blocks: 3692-- Ignored/manual test blocks: 165-- Weighted coverage points: 3047.5+- Active test blocks: 3696+- Ignored/manual test blocks: 167+- Weighted coverage points: 3051.5| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 32 | 3546 | 151 | 2981.2 | 21 | 11 | 100% |-| macos | 31 | 3585 | 126 | 2978.8 | 22 | 11 | 100% |-| linux | 28 | 3142 | 126 | 2613.7 | 20 | 11 | 100% |+| windows | 32 | 3550 | 153 | 2985.2 | 21 | 11 | 100% |+| macos | 31 | 3589 | 128 | 2982.8 | 22 | 11 | 100% |+| linux | 28 | 3146 | 128 | 2617.7 | 20 | 11 | 100% |## Refreshdiff --git a/docs/coverage/CORE.md b/docs/coverage/CORE.mdindex 10e51267e..59b4ec8a4 100644--- a/docs/coverage/CORE.md+++ b/docs/coverage/CORE.md@@ -9,10 +9,10 @@ confidence, and criticality.- Tracked crates: screenpipe-engine, screenpipe-db, screenpipe-sqlite-coordinator, screenpipe-audio, screenpipe-screen, screenpipe-a11y, screenpipe-fs- Mapped suites: 36- Mapped Rust files: 374-- Active test blocks: 3692-- Ignored/manual test blocks: 165-- Declared test blocks: 3857-- Weighted coverage points: 3047.5+- Active test blocks: 3696+- Ignored/manual test blocks: 167+- Declared test blocks: 3863+- Weighted coverage points: 3051.5Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.Criticality weights: high=1.0, medium=0.7, low=0.4.@@ -23,18 +23,18 @@ are explicitly enabled in a runtime lane.| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 32 | 3546 | 151 | 2981.2 | 21 | 11 | 100% |-| macos | 31 | 3585 | 126 | 2978.8 | 22 | 11 | 100% |-| linux | 28 | 3142 | 126 | 2613.7 | 20 | 11 | 100% |+| windows | 32 | 3550 | 153 | 2985.2 | 21 | 11 | 100% |+| macos | 31 | 3589 | 128 | 2982.8 | 22 | 11 | 100% |+| linux | 28 | 3146 | 128 | 2617.7 | 20 | 11 | 100% |## Crate Summary| Crate | Suites | Integration files | Source unit files | Active tests | Ignored tests | Weighted points | Flows || --- | --- | --- | --- | --- | --- | --- | --- || screenpipe-engine | 12 | 21 | 123 | 1779 | 51 | 1369.1 | 10 |-| screenpipe-db | 5 | 63 | 25 | 581 | 25 | 553.1 | 9 |+| screenpipe-db | 5 | 63 | 25 | 584 | 25 | 556.1 | 9 || screenpipe-sqlite-coordinator | 1 | 0 | 3 | 27 | 0 | 27.0 | 2 |-| screenpipe-audio | 7 | 25 | 53 | 671 | 46 | 587.8 | 5 |+| screenpipe-audio | 7 | 25 | 53 | 672 | 48 | 588.8 | 5 || screenpipe-screen | 6 | 9 | 18 | 257 | 9 | 232.1 | 4 || screenpipe-a11y | 4 | 2 | 31 | 374 | 34 | 275.3 | 3 || screenpipe-fs | 1 | 0 | 1 | 3 | 0 | 3.0 | 3 |@@ -63,25 +63,25 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| Layer | windows | macos | linux || --- | --- | --- | --- || accessibility | 4 suites / 371 active / 35 ignored / 337.1 pts | 4 suites / 412 active / 10 ignored / 333.4 pts | 4 suites / 331 active / 7 ignored / 303.5 pts |-| audio | 9 suites / 789 active / 47 ignored / 705.8 pts | 8 suites / 783 active / 47 ignored / 701.6 pts | 7 suites / 704 active / 46 ignored / 646.3 pts |+| audio | 9 suites / 790 active / 49 ignored / 706.8 pts | 8 suites / 784 active / 49 ignored / 702.6 pts | 7 suites / 705 active / 48 ignored / 647.3 pts || audio-device | 2 suites / 234 active / 7 ignored / 210.3 pts | 2 suites / 234 active / 7 ignored / 210.3 pts | 1 suites / 155 active / 6 ignored / 155.0 pts || configuration | 2 suites / 143 active / 3 ignored / 129.2 pts | 2 suites / 143 active / 3 ignored / 129.2 pts | 2 suites / 143 active / 3 ignored / 129.2 pts |-| database | 7 suites / 535 active / 21 ignored / 507.1 pts | 7 suites / 535 active / 21 ignored / 507.1 pts | 7 suites / 535 active / 21 ignored / 507.1 pts |+| database | 7 suites / 538 active / 21 ignored / 510.1 pts | 7 suites / 538 active / 21 ignored / 510.1 pts | 7 suites / 538 active / 21 ignored / 510.1 pts || db-search | 2 suites / 113 active / 9 ignored / 113.0 pts | 2 suites / 113 active / 9 ignored / 113.0 pts | 2 suites / 113 active / 9 ignored / 113.0 pts || engine-lifecycle | 6 suites / 247 active / 1 ignored / 222.0 pts | 6 suites / 247 active / 1 ignored / 222.0 pts | 6 suites / 243 active / 9 ignored / 221.1 pts || local-api | 3 suites / 467 active / 10 ignored / 329.3 pts | 3 suites / 467 active / 10 ignored / 329.3 pts | 3 suites / 467 active / 10 ignored / 329.3 pts |-| meeting | 6 suites / 1675 active / 21 ignored / 1368.4 pts | 6 suites / 1675 active / 21 ignored / 1368.4 pts | 4 suites / 1326 active / 17 ignored / 1043.1 pts |+| meeting | 6 suites / 1676 active / 23 ignored / 1369.4 pts | 6 suites / 1676 active / 23 ignored / 1369.4 pts | 4 suites / 1327 active / 19 ignored / 1044.1 pts || ocr | 4 suites / 125 active / 7 ignored / 119.0 pts | 4 suites / 129 active / 7 ignored / 124.5 pts | 3 suites / 120 active / 6 ignored / 115.5 pts || os-integration | 1 suites / 6 active / 0 ignored / 1.7 pts | 1 suites / 6 active / 0 ignored / 1.7 pts | - |-| performance | 13 suites / 1614 active / 78 ignored / 1427.3 pts | 14 suites / 1722 active / 82 ignored / 1470.5 pts | 13 suites / 1614 active / 78 ignored / 1427.3 pts |+| performance | 13 suites / 1617 active / 78 ignored / 1430.3 pts | 14 suites / 1725 active / 82 ignored / 1473.5 pts | 13 suites / 1617 active / 78 ignored / 1430.3 pts || pipes | 1 suites / 518 active / 3 ignored / 362.6 pts | 1 suites / 518 active / 3 ignored / 362.6 pts | 1 suites / 518 active / 3 ignored / 362.6 pts || privacy | 5 suites / 968 active / 42 ignored / 782.3 pts | 5 suites / 1009 active / 17 ignored / 778.6 pts | 5 suites / 928 active / 14 ignored / 748.6 pts || real-app | - | 1 suites / 108 active / 4 ignored / 43.2 pts | - |-| speaker | 2 suites / 383 active / 9 ignored / 383.0 pts | 2 suites / 383 active / 9 ignored / 383.0 pts | 2 suites / 383 active / 9 ignored / 383.0 pts |-| storage | 4 suites / 662 active / 38 ignored / 549.5 pts | 4 suites / 662 active / 38 ignored / 549.5 pts | 4 suites / 662 active / 38 ignored / 549.5 pts |+| speaker | 2 suites / 384 active / 11 ignored / 384.0 pts | 2 suites / 384 active / 11 ignored / 384.0 pts | 2 suites / 384 active / 11 ignored / 384.0 pts |+| storage | 4 suites / 665 active / 38 ignored / 552.5 pts | 4 suites / 665 active / 38 ignored / 552.5 pts | 4 suites / 665 active / 38 ignored / 552.5 pts || sync | 1 suites / 518 active / 3 ignored / 362.6 pts | 1 suites / 518 active / 3 ignored / 362.6 pts | 1 suites / 518 active / 3 ignored / 362.6 pts |-| timeline | 4 suites / 1205 active / 43 ignored / 986.9 pts | 4 suites / 1205 active / 43 ignored / 986.9 pts | 4 suites / 1205 active / 43 ignored / 986.9 pts |-| transcription | 6 suites / 862 active / 44 ignored / 675.0 pts | 5 suites / 856 active / 44 ignored / 670.8 pts | 5 suites / 856 active / 44 ignored / 670.8 pts |+| timeline | 4 suites / 1208 active / 43 ignored / 989.9 pts | 4 suites / 1208 active / 43 ignored / 989.9 pts | 4 suites / 1208 active / 43 ignored / 989.9 pts |+| transcription | 6 suites / 863 active / 46 ignored / 676.0 pts | 5 suites / 857 active / 46 ignored / 671.8 pts | 5 suites / 857 active / 46 ignored / 671.8 pts || ui-events | 4 suites / 784 active / 34 ignored / 594.7 pts | 3 suites / 717 active / 5 ignored / 547.8 pts | 3 suites / 717 active / 5 ignored / 547.8 pts || vision-capture | 6 suites / 553 active / 32 ignored / 437.5 pts | 6 suites / 557 active / 32 ignored / 443.0 pts | 5 suites / 548 active / 31 ignored / 434.0 pts |@@ -124,7 +124,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| a11y-macos-tree | screenpipe-a11y | macos | accessibility, privacy, real-app, performance | accessibility-ui-events, privacy-and-redaction, performance-liveness | high | conditional | mixed | 8 | 108 | 4 | macOS AX unit coverage, a scored 100-case click-attribution policy eval, and real TextEdit/Finder/Obsidian probes. Click attribution and Obsidian live tests are ignored by default when they require a logged-in desktop, app install, or AX permission. || a11y-windows-tree | screenpipe-a11y | windows | accessibility, privacy, ui-events | accessibility-ui-events, privacy-and-redaction | high | partial | unit | 7 | 67 | 29 | Windows UIA/accessibility parsing and privacy matching; some UIA tests are ignored where they require a live desktop. || audio-device-stream-health | screenpipe-audio | windows, macos, linux | audio-device, audio, performance | audio-device-health, audio-record-transcribe, performance-liveness | high | strong | mixed | 14 | 155 | 6 | Device monitor, device manager, stream buffering, source lag, audio metrics, Bluetooth gap/hallucination regressions, and cross-platform process-tap watchdog counters (process_tap.rs split into src/core/process_tap/ modules). |-| audio-meetings-speakers-dedup | screenpipe-audio | windows, macos, linux | audio, meeting, speaker, transcription | audio-record-transcribe, meeting-live-notes, performance-liveness | high | strong | mixed | 26 | 268 | 8 | Meeting streaming config/controller logic, speaker embedding state, cross-device dedupe simulations, and overlap cleanup coverage. |+| audio-meetings-speakers-dedup | screenpipe-audio | windows, macos, linux | audio, meeting, speaker, transcription | audio-record-transcribe, meeting-live-notes, performance-liveness | high | strong | mixed | 26 | 269 | 10 | Meeting streaming config/controller logic, speaker embedding state, cross-device dedupe simulations, and overlap cleanup coverage. || audio-models-filtering | screenpipe-audio | windows, macos, linux | audio, transcription, privacy | audio-record-transcribe, privacy-and-redaction | medium | partial | mixed | 6 | 20 | 10 | Model-download/TLS guards, ONNX startup smoke, and music-versus-speech filtering. || audio-pipeline-benchmarks | screenpipe-audio | windows, macos, linux | audio, transcription, performance | audio-record-transcribe, meeting-live-notes, performance-liveness | medium | partial | benchmark | 8 | 22 | 12 | Benchmark-backed regression probes for VAD, smart mode, meeting audio, quality, cross-device, and end-to-end pipeline timing. || audio-platform-output-capture | screenpipe-audio | windows, macos | audio-device, audio, meeting | audio-device-health, audio-record-transcribe, meeting-live-notes | high | partial | unit | 7 | 79 | 1 | OS-specific output/system-audio capture: CoreAudio process tap and SCK output watchdog plus VPIO health policy on macOS, per-process meeting audio taps on both platforms, and the Windows follow-the-audio output watchdog. Platform impl files are cfg-gated to their target OS. |@@ -134,7 +134,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| db-audio-meetings-speakers | screenpipe-db | windows, macos, linux | database, audio, meeting, speaker | audio-record-transcribe, audio-device-health, meeting-live-notes | high | strong | integration | 16 | 115 | 1 | Audio transcript dedupe, live meeting mirroring, end-generation and open-meeting invariants, liveness, and speaker reassignment coverage. || db-runtime-reliability | screenpipe-db | windows, macos, linux | database, performance | performance-liveness | high | partial | mixed | 16 | 47 | 6 | SQLite hard-fault classification, failpoint VFS injection, fresh-identity recovery verification with integrity/FK/write canaries, query cancellation, close-severs-connections regressions, multi-pool WAL parity, runtime version pinning, and WAL chaos plus memory-pressure probes, plus read-only quarantine self-heal verification for transient IOERR faults. || db-search-indexing | screenpipe-db | windows, macos, linux | db-search, ocr, accessibility, performance | local-api-search, capture-ocr-pipeline, accessibility-ui-events, performance-liveness | high | strong | mixed | 13 | 105 | 4 | FTS, tokenizer, OCR snapshot search, query planning, ordering, accessibility search, and contention coverage. |-| db-timeline-frames | screenpipe-db | windows, macos, linux | database, timeline, storage, performance | timeline-streaming, performance-liveness | high | strong | mixed | 36 | 287 | 12 | Frame/audio joins, timeline query shape, suggestions frames, write queue, DB primitives (src/db.rs split into src/db/ modules), feedback record upserts, media eviction anti-join regressions, SAF output registry, semantic storage, and timeline performance. |+| db-timeline-frames | screenpipe-db | windows, macos, linux | database, timeline, storage, performance | timeline-streaming, performance-liveness | high | strong | mixed | 36 | 290 | 12 | Frame/audio joins, timeline query shape, suggestions frames, write queue, DB primitives (src/db.rs split into src/db/ modules), feedback record upserts, media eviction anti-join regressions, SAF output registry, semantic storage, and timeline performance. || engine-api-routes | screenpipe-engine | windows, macos, linux | local-api, timeline, meeting, transcription | local-api-search, timeline-streaming, meeting-live-notes, audio-record-transcribe | high | partial | mixed | 41 | 425 | 5 | Route/unit coverage for search, health, streaming, meetings, time/timezone, and transcription. Legacy endpoint/websocket tests require local data and remain ignored. || engine-capture-timeline | screenpipe-engine | windows, macos, linux | vision-capture, timeline, storage, performance | capture-ocr-pipeline, timeline-streaming, performance-liveness | high | partial | mixed | 25 | 302 | 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 | 12 | 116 | 1 | Fast logic coverage for the config bridge, health-endpoint identity, tray health debounce, sleep/power policies, and queue backpressure. |@@ -227,9 +227,9 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| audio-models-filtering | screenpipe-audio | src/models/download.rs | source | 5 | 3 | 8 || audio-meetings-speakers-dedup | screenpipe-audio | src/segmentation/segmentation_manager.rs | source | 2 | 0 | 2 || audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/embedding_manager.rs | source | 9 | 0 | 9 |-| audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/embedding.rs | source | 1 | 0 | 1 |+| audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/embedding.rs | source | 1 | 2 | 3 || audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/identify_gate.rs | source | 7 | 0 | 7 |-| audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/mod.rs | source | 13 | 1 | 14 |+| audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/mod.rs | source | 14 | 1 | 15 || audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/models.rs | source | 3 | 0 | 3 || audio-meetings-speakers-dedup | screenpipe-audio | src/speaker/segment.rs | source | 2 | 0 | 2 || audio-transcription-pipeline | screenpipe-audio | src/transcription/deepgram/batch.rs | source | 11 | 0 | 11 |@@ -351,7 +351,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| db-timeline-frames | screenpipe-db | tests/suggestions_frames_table_test.rs | integration | 3 | 0 | 3 || db-search-indexing | screenpipe-db | tests/tag_autocomplete_query_test.rs | integration | 5 | 1 | 6 || db-search-indexing | screenpipe-db | tests/tag_filter_bench.rs | integration | 0 | 2 | 2 |-| db-timeline-frames | screenpipe-db | tests/timeline_frameless_audio_test.rs | integration | 3 | 0 | 3 |+| db-timeline-frames | screenpipe-db | tests/timeline_frameless_audio_test.rs | integration | 6 | 0 | 6 || db-audio-meetings-speakers | screenpipe-db | tests/timeline_live_meeting_index_test.rs | integration | 2 | 0 | 2 || db-audio-meetings-speakers | screenpipe-db | tests/timeline_live_meeting_test.rs | integration | 12 | 0 | 12 || db-timeline-frames | screenpipe-db | tests/timeline_parquet_test.rs | integration | 1 | 0 | 1 |