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(redact,image): default policy to Secret-only @ 0.9 — rfdetr_v8 was destroying timelines on real screenpipe content; bump app to v2.4.160
Louis Beaumont0d55e6c4bb78
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex 88e2944ae..42ea60a92 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -9976,7 +9976,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.4.159"+version = "2.4.160"dependencies = ["anyhow","arboard",diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 90c2133b1..7b570466c 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.4.159"+version = "2.4.160"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-redact/src/image/frame_redactor.rs b/crates/screenpipe-redact/src/image/frame_redactor.rsindex 9d2e9a6ef..432ce2f73 100644--- a/crates/screenpipe-redact/src/image/frame_redactor.rs+++ b/crates/screenpipe-redact/src/image/frame_redactor.rs@@ -191,15 +191,22 @@ mod tests {ImageRegion {bbox: [10, 10, 30, 20],label: SpanLabel::Email,- score: 0.9,+ score: 0.95,},ImageRegion {bbox: [50, 30, 20, 20],label: SpanLabel::Person,- score: 0.1,+ score: 0.5,}, // below floor];- let out = redact_frame(&p, ®ions, &ImageRedactionPolicy::default()).unwrap();+ // Policy needs to allow both Email and Person to exercise the+ // "filtered by score" path — the live default is intentionally+ // narrow (Secret only) so we make a wider policy here.+ let policy = ImageRedactionPolicy {+ allow: vec![SpanLabel::Email, SpanLabel::Person],+ min_score: 0.9,+ };+ let out = redact_frame(&p, ®ions, &policy).unwrap();assert_eq!(out.regions_redacted, 1);assert_eq!(out.regions_dropped, 1);assert!(out.redacted_pixels >= 30 * 20);@@ -248,7 +255,7 @@ mod tests {let p = make_test_jpg(d.path());let r = ImageRegion {bbox: [80, 70, 999, 999],- label: SpanLabel::Url,+ label: SpanLabel::Secret,score: 1.0,};let out = redact_frame(&p, &[r], &ImageRedactionPolicy::default()).unwrap();diff --git a/crates/screenpipe-redact/src/image/mod.rs b/crates/screenpipe-redact/src/image/mod.rsindex b830397d1..550e1ccd8 100644--- a/crates/screenpipe-redact/src/image/mod.rs+++ b/crates/screenpipe-redact/src/image/mod.rs@@ -92,7 +92,25 @@ pub trait ImageRedactor: Send + Sync {/// out. Same idea as the text-pipeline's per-label policy: the model/// detects everything it can, the policy decides what gets redacted.///-/// Default: redact everything the model finds at score ≥ 0.3.+/// Default is intentionally conservative: ONLY the `Secret` class,+/// and only at very high confidence (≥ 0.9). This is a hard-won+/// default — the original `[Person, Email, Phone, Address, Url,+/// Company, Repo, Handle, Channel, Id, Date, Secret]` allow-list at+/// `min_score=0.3` produced catastrophic over-redaction in the wild+/// (May 2026): rfdetr_v8 routinely flagged code identifiers / file+/// paths / version strings / sidebar nav items as `Url` / `Id` /+/// `Repo` / `Handle`, so a user who flipped the toggle on found their+/// timeline rendered useless within hours. Combined with destructive+/// writes the originals were unrecoverable. See commit history for+/// the regression incident.+///+/// Re-broadening this default requires:+/// 1. A precision benchmark on real screenpipe content (terminals,+/// IDEs, browser docs) showing < 1% false-positive rate for the+/// added classes at the chosen threshold, AND+/// 2. A user-facing policy preset selector in Settings → Privacy+/// so per-class trade-offs are user-controlled, not silently+/// destructive.#[derive(Debug, Clone, Serialize, Deserialize)]pub struct ImageRedactionPolicy {/// Labels whose detections become black boxes. Anything not in@@ -105,34 +123,23 @@ pub struct ImageRedactionPolicy {impl Default for ImageRedactionPolicy {fn default() -> Self {+ // Conservative hotfix default — see the type-level docs above+ // for why we shrank the allow-list and pushed min_score up.Self {- allow: vec![- SpanLabel::Person,- SpanLabel::Email,- SpanLabel::Phone,- SpanLabel::Address,- SpanLabel::Url,- SpanLabel::Company,- SpanLabel::Repo,- SpanLabel::Handle,- SpanLabel::Channel,- SpanLabel::Id,- SpanLabel::Date,- SpanLabel::Secret,- ],- min_score: 0.3,+ allow: vec![SpanLabel::Secret],+ min_score: 0.9,}}}impl ImageRedactionPolicy {- /// Convenience: redact ONLY the strict-secret class. Useful for- /// users who want at-rest protection of credentials but are OK- /// with names / company chrome staying visible.+ /// Convenience: same as the (conservative) `Default` for now —+ /// kept as a named entry point so callers that explicitly want+ /// "secrets only" survive future widening of the default.pub fn secrets_only() -> Self {Self {allow: vec![SpanLabel::Secret],- min_score: 0.3,+ min_score: 0.9,}}}