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(calendar): exclude personal reference reminders from meeting automation (#7563)
Louis Beaumont8362e8061b63
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/calendar/reminders/tests.rs b/apps/screenpipe-app-tauri/src-tauri/src/calendar/reminders/tests.rsindex 8a4086475..0231a92d8 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/calendar/reminders/tests.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/calendar/reminders/tests.rs@@ -33,6 +33,24 @@ fn snapshot(events: Vec<CalendarEventItem>) -> snapshots::CalendarSnapshots {}}+#[test]+fn reference_reminder_does_not_schedule_or_suppress_the_later_call() {+ let items = crate::google_calendar::parse_meeting_events(json!([+ {"id":"prep", "start":"2026-10-08T16:15:00-07:00", "end":"2026-10-08T16:25:00-07:00", "meetingUrl":"https://meet.google.com/abc-defg-hij", "excludeFromMeetingDetection":true},+ {"id":"call", "start":"2026-10-08T17:00:00-07:00", "end":"2026-10-08T17:30:00-07:00", "meetingUrl":"https://meet.google.com/abc-defg-hij"}+ ])).unwrap();+ let snapshot = snapshot(items);+ let prep_time = DateTime::parse_from_rfc3339("2026-10-08T16:14:30-07:00")+ .unwrap()+ .timestamp();+ let mut ledger = Ledger::default();+ ledger.reconcile(&snapshot, prep_time);+ assert!(ledger.due(&snapshot, prep_time, 30).is_empty());+ let due = ledger.due(&snapshot, prep_time + 45 * 60, 30);+ assert_eq!(due.len(), 1);+ assert_eq!(due[0].1.id, "call");+}+#[test]fn reminder_clock_fires_at_configured_offset_without_another_calendar_refresh() {let snapshot = snapshot(vec![event("one", 120)]);diff --git a/apps/screenpipe-app-tauri/src-tauri/src/google_calendar.rs b/apps/screenpipe-app-tauri/src-tauri/src/google_calendar.rsindex 3712854ff..b6fdc0293 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/google_calendar.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/google_calendar.rs@@ -62,6 +62,8 @@ struct GoogleCalendarEventDto {calendar_name: Option<String>,#[serde(default)]is_all_day: bool,+ #[serde(default)]+ exclude_from_meeting_detection: bool,}pub async fn start_google_calendar_publisher(app: AppHandle) {@@ -142,14 +144,11 @@ fn account_updates(.map(|source| (source.clone(), Ok(Vec::new()))).collect();for snapshot in snapshots {- let result = snapshot- .events- .map(|events| events.into_iter().map(into_calendar_event_item).collect())- .ok_or_else(|| {- snapshot- .error- .unwrap_or_else(|| "account snapshot unavailable".into())- });+ let result = snapshot.events.map(meeting_event_items).ok_or_else(|| {+ snapshot+ .error+ .unwrap_or_else(|| "account snapshot unavailable".into())+ });updates.push((account_source(snapshot.instance.as_deref()), result));}*previous = current;@@ -183,6 +182,23 @@ async fn local_api_config(app: &AppHandle) -> Option<(u16, Option<String>)> {Some((core.port, core.local_api_key.clone()))}+fn meeting_event_items(events: Vec<GoogleCalendarEventDto>) -> Vec<CalendarEventItem> {+ events+ .into_iter()+ .filter(|event| !event.exclude_from_meeting_detection)+ .map(into_calendar_event_item)+ .collect()+}++// The startup fallback and the scheduled publisher must apply the same policy.+// Clearing only the URL would still let time-only matching bind a preparation+// reminder to a detected call.+pub(crate) fn parse_meeting_events(+ value: serde_json::Value,+) -> Result<Vec<CalendarEventItem>, serde_json::Error> {+ serde_json::from_value(value).map(meeting_event_items)+}+fn into_calendar_event_item(event: GoogleCalendarEventDto) -> CalendarEventItem {// Display fields are best-effort: the meeting detector and prewarm// logic only ever read `start`/`end` (RFC3339), so the local-time@@ -227,6 +243,33 @@ mod tests {use super::*;use serde_json::json;+ #[test]+ fn reference_reminders_are_excluded_from_publisher_and_fresh_meeting_lookup() {+ let events = json!([+ {"id":"prep", "title":"Prepare", "start":"2026-10-08T16:15:00-07:00", "end":"2026-10-08T16:25:00-07:00", "meetingUrl":"https://meet.google.com/abc-defg-hij", "excludeFromMeetingDetection":true},+ {"id":"call", "title":"Call", "start":"2026-10-08T17:00:00-07:00", "end":"2026-10-08T17:30:00-07:00", "meetingUrl":"https://meet.google.com/abc-defg-hij", "excludeFromMeetingDetection":false},+ {"id":"next-call", "title":"Call", "start":"2026-10-08T17:30:00-07:00", "end":"2026-10-08T18:00:00-07:00", "meetingUrl":"https://meet.google.com/abc-defg-hij"}+ ]);+ let fresh = parse_meeting_events(events.clone()).unwrap();+ assert_eq!(+ fresh.iter().map(|e| e.id.as_str()).collect::<Vec<_>>(),+ ["call", "next-call"]+ );+ let snapshots = serde_json::from_value(json!([+ {"instance":"[email protected]", "events":[events[0]], "error":null},+ {"instance":"[email protected]", "events":[events[1], events[2]], "error":null}+ ]))+ .unwrap();+ let updates = account_updates(&mut BTreeSet::new(), snapshots);+ assert!(updates[0].1.as_ref().unwrap().is_empty());+ let published = updates[1].1.as_ref().unwrap();+ assert_eq!(+ published.iter().map(|e| e.id.as_str()).collect::<Vec<_>>(),+ ["call", "next-call"]+ );+ assert_eq!(published[0].meeting_url, published[1].meeting_url);+ }+#[tokio::test]async fn failed_account_does_not_block_healthy_refresh_or_clear_its_previous_snapshot() {use wiremock::{matchers::query_param, Mock, MockServer, ResponseTemplate};diff --git a/apps/screenpipe-app-tauri/src-tauri/src/meeting_live_notes.rs b/apps/screenpipe-app-tauri/src-tauri/src/meeting_live_notes.rsindex c3fc2a57e..87c7722f6 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/meeting_live_notes.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/meeting_live_notes.rs@@ -583,8 +583,14 @@ async fn fetch_google_calendar_events(app: &AppHandle) -> Vec<CalendarEventSignareturn Vec::new();}- match resp.json::<Vec<CalendarEventSignal>>().await {- Ok(events) => events,+ match resp.json::<serde_json::Value>().await {+ Ok(value) => match crate::google_calendar::parse_meeting_events(value) {+ Ok(events) => events.into_iter().map(CalendarEventSignal::from).collect(),+ Err(err) => {+ warn!("meeting live notes: failed to parse Google Calendar events: {err}");+ Vec::new()+ }+ },Err(err) => {warn!("meeting live notes: failed to parse Google Calendar events: {err}");Vec::new()diff --git a/crates/screenpipe-engine/src/connections_api.rs b/crates/screenpipe-engine/src/connections_api.rsindex 36014edf2..343c15650 100644--- a/crates/screenpipe-engine/src/connections_api.rs+++ b/crates/screenpipe-engine/src/connections_api.rs@@ -1491,6 +1491,7 @@ fn google_calendar_event_json(item: &Value, calendar_label: &str) -> Value {"attendees": attendees,"location": item["location"].as_str(),"meetingUrl": meeting_url,+ "excludeFromMeetingDetection": google_calendar_event_is_reference_reminder(item),"calendarName": calendar_label,"isAllDay": is_all_day,})@@ -1536,7 +1537,29 @@ fn gcal_event_start_epoch(event: &Value) -> i64 {i64::MAX}+// A free personal reminder may reference a later call in its notes. Decide+// before normalization loses URL provenance; keep the event and reference URL+// available to calendar readers, but not to automatic meeting consumers.+fn google_calendar_event_is_reference_reminder(item: &Value) -> bool {+ item["transparency"].as_str() == Some("transparent")+ && !item["attendees"].as_array().is_some_and(|attendees| {+ attendees.iter().any(|attendee| {+ attendee["self"].as_bool() != Some(true)+ && attendee["resource"].as_bool() != Some(true)+ })+ })+ && google_calendar_conference_url(item).is_none()+ && extract_meeting_url(item["location"].as_str()).is_none()+ && extract_meeting_url(item["description"].as_str()).is_some()+}+fn google_calendar_meeting_url(item: &Value) -> Option<String> {+ google_calendar_conference_url(item)+ .or_else(|| extract_meeting_url(item["location"].as_str()))+ .or_else(|| extract_meeting_url(item["description"].as_str()))+}++fn google_calendar_conference_url(item: &Value) -> Option<String> {item["hangoutLink"].as_str().and_then(|s| normalize_meeting_url(Some(s.to_string())))@@ -1552,8 +1575,6 @@ fn google_calendar_meeting_url(item: &Value) -> Option<String> {.and_then(|uri| normalize_meeting_url(Some(uri.to_string())))})})- .or_else(|| extract_meeting_url(item["location"].as_str()))- .or_else(|| extract_meeting_url(item["description"].as_str()))}fn normalize_meeting_url(raw: Option<String>) -> Option<String> {@@ -4384,6 +4405,63 @@ mod tests {assert_eq!(summaries[0]["enabled"], true);}+ #[test]+ fn google_calendar_reference_reminder_keeps_reference_but_excludes_automatic_meetings() {+ let raw = json!({+ "id": "prep", "summary": "Prepare for the later call",+ "start": {"dateTime": "2026-10-08T16:15:00-07:00"},+ "end": {"dateTime": "2026-10-08T16:25:00-07:00"},+ "transparency": "transparent", "attendees": [],+ "description": "Review notes for https://meet.google.com/abc-defg-hij"+ });+ assert!(google_calendar_event_is_available(&raw));+ let event = google_calendar_event_json(&raw, "Personal");+ assert_eq!(event["excludeFromMeetingDetection"], true);+ assert_eq!(event["meetingUrl"], "https://meet.google.com/abc-defg-hij");+ assert_eq!(event["start"], raw["start"]["dateTime"]);+ assert_eq!(event["title"], raw["summary"]);+ }++ #[test]+ fn google_calendar_reference_reminder_policy_preserves_real_meeting_links() {+ let reference = json!({+ "transparency": "transparent",+ "description": "https://meet.google.com/abc-defg-hij"+ });+ for (key, value) in [+ ("transparency", json!("opaque")),+ ("transparency", Value::Null),+ ("attendees", json!([{"email": "[email protected]"}])),+ ("hangoutLink", json!("https://meet.google.com/abc-defg-hij")),+ (+ "conferenceData",+ json!({"entryPoints": [{"entryPointType": "video", "uri": "https://meet.google.com/abc-defg-hij"}]}),+ ),+ ("location", json!("https://meet.google.com/abc-defg-hij")),+ ] {+ let mut raw = reference.clone();+ raw[key] = value;+ assert!(!google_calendar_event_is_reference_reminder(&raw), "{key}");+ assert_eq!(+ google_calendar_meeting_url(&raw).as_deref(),+ Some("https://meet.google.com/abc-defg-hij")+ );+ }+ // Provider representations can include the owner or a room resource.+ for attendees in [+ json!([]),+ json!([{"self": true}]),+ json!([{"resource": true}]),+ ] {+ let mut raw = reference.clone();+ raw["attendees"] = attendees;+ assert!(google_calendar_event_is_reference_reminder(&raw));+ }+ assert!(!google_calendar_event_is_reference_reminder(&json!({+ "transparency": "transparent", "description": "https://docs.google.com/document/test"+ })));+ }+#[test]fn google_calendar_meeting_url_prefers_conference_video() {let item = json!({diff --git a/docs/COVERAGE.md b/docs/COVERAGE.mdindex fed885b37..5e692859d 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: 389-- Active test blocks: 3829+- Active test blocks: 3831- Ignored/manual test blocks: 177-- Weighted coverage points: 3164.1+- Weighted coverage points: 3165.5| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 32 | 3683 | 163 | 3097.8 | 21 | 11 | 100% |-| macos | 31 | 3709 | 138 | 3086.3 | 22 | 11 | 100% |-| linux | 28 | 3266 | 138 | 2721.2 | 20 | 11 | 100% |+| windows | 32 | 3685 | 163 | 3099.2 | 21 | 11 | 100% |+| macos | 31 | 3711 | 138 | 3087.7 | 22 | 11 | 100% |+| linux | 28 | 3268 | 138 | 2722.6 | 20 | 11 | 100% |## Refreshdiff --git a/docs/coverage/CORE.md b/docs/coverage/CORE.mdindex ac960a203..75252c887 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: 389-- Active test blocks: 3829+- Active test blocks: 3831- Ignored/manual test blocks: 177-- Declared test blocks: 4006-- Weighted coverage points: 3164.1+- Declared test blocks: 4008+- Weighted coverage points: 3165.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,15 +23,15 @@ are explicitly enabled in a runtime lane.| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 32 | 3683 | 163 | 3097.8 | 21 | 11 | 100% |-| macos | 31 | 3709 | 138 | 3086.3 | 22 | 11 | 100% |-| linux | 28 | 3266 | 138 | 2721.2 | 20 | 11 | 100% |+| windows | 32 | 3685 | 163 | 3099.2 | 21 | 11 | 100% |+| macos | 31 | 3711 | 138 | 3087.7 | 22 | 11 | 100% |+| linux | 28 | 3268 | 138 | 2722.6 | 20 | 11 | 100% |## Crate Summary| Crate | Suites | Integration files | Source unit files | Active tests | Ignored tests | Weighted points | Flows || --- | --- | --- | --- | --- | --- | --- | --- |-| screenpipe-engine | 12 | 21 | 128 | 1836 | 52 | 1414.1 | 10 |+| screenpipe-engine | 12 | 21 | 128 | 1838 | 52 | 1415.5 | 10 || screenpipe-db | 5 | 67 | 27 | 617 | 29 | 588.6 | 9 || screenpipe-sqlite-coordinator | 1 | 0 | 3 | 27 | 0 | 27.0 | 2 || screenpipe-audio | 7 | 28 | 53 | 686 | 53 | 601.3 | 5 |@@ -70,19 +70,19 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| db-search | 2 suites / 118 active / 9 ignored / 118.0 pts | 2 suites / 118 active / 9 ignored / 118.0 pts | 2 suites / 118 active / 9 ignored / 118.0 pts || engine-lifecycle | 6 suites / 265 active / 1 ignored / 238.5 pts | 6 suites / 265 active / 1 ignored / 238.5 pts | 6 suites / 261 active / 9 ignored / 237.6 pts || local-api | 3 suites / 478 active / 11 ignored / 338.2 pts | 3 suites / 478 active / 11 ignored / 338.2 pts | 3 suites / 478 active / 11 ignored / 338.2 pts |-| meeting | 6 suites / 1736 active / 31 ignored / 1420.7 pts | 6 suites / 1736 active / 31 ignored / 1420.7 pts | 4 suites / 1387 active / 27 ignored / 1095.4 pts |+| meeting | 6 suites / 1738 active / 31 ignored / 1422.1 pts | 6 suites / 1738 active / 31 ignored / 1422.1 pts | 4 suites / 1389 active / 27 ignored / 1096.8 pts || ocr | 4 suites / 140 active / 7 ignored / 129.8 pts | 4 suites / 133 active / 7 ignored / 127.6 pts | 3 suites / 124 active / 6 ignored / 118.6 pts || os-integration | 1 suites / 6 active / 0 ignored / 1.7 pts | 1 suites / 6 active / 0 ignored / 1.7 pts | - || performance | 13 suites / 1661 active / 80 ignored / 1469.6 pts | 14 suites / 1769 active / 84 ignored / 1512.8 pts | 13 suites / 1661 active / 80 ignored / 1469.6 pts |-| pipes | 1 suites / 542 active / 3 ignored / 379.4 pts | 1 suites / 542 active / 3 ignored / 379.4 pts | 1 suites / 542 active / 3 ignored / 379.4 pts |-| privacy | 5 suites / 1004 active / 42 ignored / 810.5 pts | 5 suites / 1043 active / 17 ignored / 805.4 pts | 5 suites / 962 active / 14 ignored / 775.4 pts |+| pipes | 1 suites / 544 active / 3 ignored / 380.8 pts | 1 suites / 544 active / 3 ignored / 380.8 pts | 1 suites / 544 active / 3 ignored / 380.8 pts |+| privacy | 5 suites / 1006 active / 42 ignored / 811.9 pts | 5 suites / 1045 active / 17 ignored / 806.8 pts | 5 suites / 964 active / 14 ignored / 776.8 pts || real-app | - | 1 suites / 108 active / 4 ignored / 43.2 pts | - || speaker | 2 suites / 415 active / 18 ignored / 415.0 pts | 2 suites / 415 active / 18 ignored / 415.0 pts | 2 suites / 415 active / 18 ignored / 415.0 pts || storage | 4 suites / 682 active / 39 ignored / 567.7 pts | 4 suites / 682 active / 39 ignored / 567.7 pts | 4 suites / 682 active / 39 ignored / 567.7 pts |-| sync | 1 suites / 542 active / 3 ignored / 379.4 pts | 1 suites / 542 active / 3 ignored / 379.4 pts | 1 suites / 542 active / 3 ignored / 379.4 pts |+| sync | 1 suites / 544 active / 3 ignored / 380.8 pts | 1 suites / 544 active / 3 ignored / 380.8 pts | 1 suites / 544 active / 3 ignored / 380.8 pts || timeline | 4 suites / 1230 active / 45 ignored / 1009.2 pts | 4 suites / 1230 active / 45 ignored / 1009.2 pts | 4 suites / 1230 active / 45 ignored / 1009.2 pts || transcription | 6 suites / 882 active / 52 ignored / 691.9 pts | 5 suites / 876 active / 52 ignored / 687.8 pts | 5 suites / 876 active / 52 ignored / 687.8 pts |-| ui-events | 4 suites / 819 active / 34 ignored / 621.4 pts | 3 suites / 750 active / 5 ignored / 573.1 pts | 3 suites / 750 active / 5 ignored / 573.1 pts |+| ui-events | 4 suites / 821 active / 34 ignored / 622.8 pts | 3 suites / 752 active / 5 ignored / 574.5 pts | 3 suites / 752 active / 5 ignored / 574.5 pts || vision-capture | 6 suites / 576 active / 32 ignored / 453.6 pts | 6 suites / 569 active / 32 ignored / 451.4 pts | 5 suites / 560 active / 31 ignored / 442.4 pts |## Critical Flow Matrix@@ -142,7 +142,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| 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-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 | 12 | 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 | 542 | 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. |+| 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 | 544 | 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. || engine-meeting-watcher | screenpipe-engine | windows, macos | meeting | meeting-live-notes | high | strong | mixed | 10 | 270 | 3 | Successor of src/meeting_detector.rs and src/meeting_telemetry.rs. Audio-process and UI-scan backend state machines, candidate resolution, shared telemetry, and a scored trajectory eval. ui_scan/macos.rs and ui_scan/windows.rs are cfg-gated and only execute on their target OS; both backends are null on Linux. || engine-retention-storage | screenpipe-engine | windows, macos, linux | storage, engine-lifecycle, performance | engine-health-lifecycle, performance-liveness | medium | strong | mixed | 5 | 39 | 0 | Local retention deletion (including lean-mode heavy-text stripping), cloud archive watermarking, atomic state-file replacement, and the low-disk capture monitor. || engine-telemetry-observability | screenpipe-engine | windows, macos, linux | engine-lifecycle, performance | engine-health-lifecycle, performance-liveness | medium | strong | unit | 6 | 35 | 0 | PostHog capture gating, telemetry context shaping, piggyback telemetry forwarding, crash-log helpers, resource monitoring, and the recording-coverage reliability metric. |@@ -395,7 +395,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| engine-meeting-privacy-sync | screenpipe-engine | src/cli/view.rs | source | 2 | 0 | 2 || engine-meeting-privacy-sync | screenpipe-engine | src/cloud_search.rs | source | 3 | 0 | 3 || engine-capture-timeline | screenpipe-engine | src/compaction_encoder.rs | source | 8 | 0 | 8 |-| engine-meeting-privacy-sync | screenpipe-engine | src/connections_api.rs | source | 93 | 0 | 93 |+| engine-meeting-privacy-sync | screenpipe-engine | src/connections_api.rs | source | 95 | 0 | 95 || engine-telemetry-observability | screenpipe-engine | src/crash_log.rs | source | 4 | 0 | 4 || engine-retention-storage | screenpipe-engine | src/disk_pressure.rs | source | 11 | 0 | 11 || engine-meeting-privacy-sync | screenpipe-engine | src/drm_detector.rs | source | 19 | 2 | 21 |