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

fix(ci): unblock 2-month-old Rust CI failures on Linux

Louis Beaumont08564bfb1934
diff --git a/crates/screenpipe-a11y/src/activity_feed.rs b/crates/screenpipe-a11y/src/activity_feed.rs
index 0321a3a9f..f24e23a5e 100644
--- a/crates/screenpipe-a11y/src/activity_feed.rs
+++ b/crates/screenpipe-a11y/src/activity_feed.rs
@@ -219,14 +219,14 @@ mod tests {
fn test_capture_params_typing() {
let feed = ActivityFeed::new();
- // Simulate typing burst
+ // Simulate typing burst — 5 key presses puts us in keyboard-burst branch
for _ in 0..5 {
feed.record(ActivityKind::KeyPress);
}
let params = feed.get_capture_params();
- assert_eq!(params.interval, Duration::from_millis(100));
- assert_eq!(params.skip_threshold, 0.005);
+ assert_eq!(params.interval, Duration::from_millis(200));
+ assert_eq!(params.skip_threshold, 0.02);
}
#[test]
diff --git a/crates/screenpipe-a11y/src/config.rs b/crates/screenpipe-a11y/src/config.rs
index 218f98d18..075348244 100644
--- a/crates/screenpipe-a11y/src/config.rs
+++ b/crates/screenpipe-a11y/src/config.rs
@@ -295,13 +295,20 @@ mod tests {
#[test]
fn test_window_exclusion() {
+ // Defaults have no window patterns — password/secret patterns were
+ // removed because of false positives (e.g. password-manager settings,
+ // "Secret Santa Planning", AWS Secrets Manager). Exercise the mechanism
+ // with explicit patterns instead.
let mut config = UiCaptureConfig::new();
+ config.excluded_window_pattern_strings = vec![
+ r"(?i)enter password".to_string(),
+ r"(?i)secret notes".to_string(),
+ ];
config.compile_patterns();
assert!(!config.should_capture_window("Enter Password - Chrome"));
assert!(!config.should_capture_window("Secret Notes - App"));
- // Note: "Private Browsing" and "Incognito" are now handled by
- // crate::incognito module, not by config excluded_window_patterns.
+ // "Private Browsing" and "Incognito" are handled by crate::incognito.
assert!(config.should_capture_window("GitHub - Chrome"));
}
diff --git a/crates/screenpipe-a11y/src/tree/linux.rs b/crates/screenpipe-a11y/src/tree/linux.rs
index b5df00785..f80974b43 100644
--- a/crates/screenpipe-a11y/src/tree/linux.rs
+++ b/crates/screenpipe-a11y/src/tree/linux.rs
@@ -1089,7 +1089,11 @@ mod tests {
#[test]
fn test_incognito_detection() {
use crate::incognito::is_title_private;
- assert!(is_title_private("Enter Password - Chrome"));
+ // is_title_private detects browser incognito/private-browsing windows,
+ // not password prompts — "Enter Password - Chrome" is a sign-in dialog
+ // and must NOT be flagged as private (that would be a false positive).
+ assert!(!is_title_private("Enter Password - Chrome"));
+ assert!(is_title_private("YouTube - Google Chrome (Incognito)"));
assert!(is_title_private("Private Browsing - Firefox"));
assert!(!is_title_private("Calculator"));
}
diff --git a/crates/screenpipe-engine/src/auth_key.rs b/crates/screenpipe-engine/src/auth_key.rs
index 43b2fb1d4..03639e9f6 100644
--- a/crates/screenpipe-engine/src/auth_key.rs
+++ b/crates/screenpipe-engine/src/auth_key.rs
@@ -21,10 +21,7 @@ use std::path::Path;
/// 3. plaintext `api_auth_key` in the `db.sqlite` secret store
/// 4. legacy `~/.screenpipe/auth.json`
/// 5. auto-generated `sp-<uuid8>`, persisted to the secret store before return
-pub async fn resolve_api_auth_key(
- data_dir: &Path,
- settings_key: Option<&str>,
-) -> Result<String> {
+pub async fn resolve_api_auth_key(data_dir: &Path, settings_key: Option<&str>) -> Result<String> {
let store = open_secret_store(data_dir).await.ok();
// Read the existing secret-store value once — used both as a fallback
diff --git a/crates/screenpipe-engine/src/lib.rs b/crates/screenpipe-engine/src/lib.rs
index 94f1af434..b3a426762 100644
--- a/crates/screenpipe-engine/src/lib.rs
+++ b/crates/screenpipe-engine/src/lib.rs
@@ -5,8 +5,8 @@
pub mod analytics;
#[cfg(feature = "apple-intelligence")]
mod apple_intelligence_api;
-pub mod auth_key;
pub mod archive;
+pub mod auth_key;
mod auto_destruct;
pub mod calendar_speaker_id;
pub mod cli;