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 macOS remote announcement delivery (#6390)
Ezra Ellette7d4d1a557289
diff --git a/COVERAGE.md b/COVERAGE.mdindex 2e6fdef41..748de6545 100644--- a/COVERAGE.md+++ b/COVERAGE.md@@ -32,15 +32,15 @@ results and `cargo llvm-cov` data on top when judging release confidence.- Mapped suites: 32- Mapped Rust files: 327-- Active test blocks: 3159+- Active test blocks: 3161- Ignored/manual test blocks: 137-- Weighted coverage points: 2594.5+- Weighted coverage points: 2595.9| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 29 | 3023 | 132 | 2532.5 | 21 | 11 | 100% |-| macos | 29 | 3081 | 112 | 2544.9 | 22 | 11 | 100% |-| linux | 25 | 2696 | 105 | 2236.3 | 20 | 11 | 100% |+| windows | 29 | 3025 | 132 | 2533.9 | 21 | 11 | 100% |+| macos | 29 | 3083 | 112 | 2546.3 | 22 | 11 | 100% |+| linux | 25 | 2698 | 105 | 2237.7 | 20 | 11 | 100% |## Refreshdiff --git a/apps/screenpipe-app-tauri/lib/__tests__/announcements.test.ts b/apps/screenpipe-app-tauri/lib/__tests__/announcements.test.tsindex 454df7b95..d342ab668 100644--- a/apps/screenpipe-app-tauri/lib/__tests__/announcements.test.ts+++ b/apps/screenpipe-app-tauri/lib/__tests__/announcements.test.ts@@ -37,7 +37,24 @@ describe("areRemoteAnnouncementsDisabled", () => {vi.stubEnv("NEXT_PUBLIC_SCREENPIPE_E2E", "false");vi.stubEnv("NEXT_PUBLIC_SCREENPIPE_DISABLE_REMOTE_ANNOUNCEMENTS", "false");- expect(areRemoteAnnouncementsDisabled(process.env, "tauri.localhost")).toBe(false);+ expect(+ areRemoteAnnouncementsDisabled(+ process.env,+ "tauri.localhost",+ "http:",+ ),+ ).toBe(false);+ });++ it("allows remote announcements on the production macOS Tauri origin", () => {+ vi.stubEnv("NODE_ENV", "production");+ vi.stubEnv("TAURI_ENV_DEBUG", "false");+ vi.stubEnv("NEXT_PUBLIC_SCREENPIPE_E2E", "false");+ vi.stubEnv("NEXT_PUBLIC_SCREENPIPE_DISABLE_REMOTE_ANNOUNCEMENTS", "false");++ expect(+ areRemoteAnnouncementsDisabled(process.env, "localhost", "tauri:"),+ ).toBe(false);});it("disables remote announcements in development", () => {@@ -60,19 +77,23 @@ describe("areRemoteAnnouncementsDisabled", () => {expect(areRemoteAnnouncementsDisabled()).toBe(true);});- it("disables remote announcements on localhost dev hosts outside tests", () => {- expect(- areRemoteAnnouncementsDisabled(- {- NODE_ENV: "production",- TAURI_ENV_DEBUG: "false",- NEXT_PUBLIC_SCREENPIPE_E2E: "false",- NEXT_PUBLIC_SCREENPIPE_DISABLE_REMOTE_ANNOUNCEMENTS: "false",- },- "localhost",- ),- ).toBe(true);- });+ it.each(["localhost", "127.0.0.1", "::1"])(+ "disables remote announcements on browser dev host %s outside tests",+ (hostname) => {+ expect(+ areRemoteAnnouncementsDisabled(+ {+ NODE_ENV: "production",+ TAURI_ENV_DEBUG: "false",+ NEXT_PUBLIC_SCREENPIPE_E2E: "false",+ NEXT_PUBLIC_SCREENPIPE_DISABLE_REMOTE_ANNOUNCEMENTS: "false",+ },+ hostname,+ "http:",+ ),+ ).toBe(true);+ },+ );});describe("isDevOrE2EAppIdentity", () => {diff --git a/apps/screenpipe-app-tauri/lib/announcements.ts b/apps/screenpipe-app-tauri/lib/announcements.tsindex 6af6984a4..acb5c7566 100644--- a/apps/screenpipe-app-tauri/lib/announcements.ts+++ b/apps/screenpipe-app-tauri/lib/announcements.ts@@ -196,16 +196,24 @@ export function areRemoteAnnouncementsDisabled(hostname: string | undefined = typeof window !== "undefined"? window.location.hostname: undefined,+ protocol: string | undefined = typeof window !== "undefined"+ ? window.location.protocol+ : undefined,): boolean {const isLocalDevHost =hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";+ // Tauri's production origin is `tauri://localhost` on macOS. Only browser+ // origins on a loopback host are local dev; treating the hostname alone as+ // dev disables every remote announcement in the production macOS app.+ const isLocalBrowserDevHost =+ isLocalDevHost && (protocol === "http:" || protocol === "https:");return (env.TAURI_ENV_DEBUG === "true" ||env.NODE_ENV === "development" ||env.NEXT_PUBLIC_SCREENPIPE_E2E === "true" ||env.NEXT_PUBLIC_SCREENPIPE_DISABLE_REMOTE_ANNOUNCEMENTS === "true" ||- (env.NODE_ENV !== "test" && isLocalDevHost)+ (env.NODE_ENV !== "test" && isLocalBrowserDevHost));}diff --git a/docs/coverage/CORE.md b/docs/coverage/CORE.mdindex f7237316d..84038c738 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- Mapped suites: 32- Mapped Rust files: 327-- Active test blocks: 3159+- Active test blocks: 3161- Ignored/manual test blocks: 137-- Declared test blocks: 3296-- Weighted coverage points: 2594.5+- Declared test blocks: 3298+- Weighted coverage points: 2595.9Confidence 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 | 29 | 3023 | 132 | 2532.5 | 21 | 11 | 100% |-| macos | 29 | 3081 | 112 | 2544.9 | 22 | 11 | 100% |-| linux | 25 | 2696 | 105 | 2236.3 | 20 | 11 | 100% |+| windows | 29 | 3025 | 132 | 2533.9 | 21 | 11 | 100% |+| macos | 29 | 3083 | 112 | 2546.3 | 22 | 11 | 100% |+| linux | 25 | 2698 | 105 | 2237.7 | 20 | 11 | 100% |## Crate Summary| Crate | Suites | Integration files | Source unit files | Active tests | Ignored tests | Weighted points | Flows || --- | --- | --- | --- | --- | --- | --- | --- |-| screenpipe-engine | 10 | 19 | 106 | 1512 | 42 | 1158.2 | 10 |+| screenpipe-engine | 10 | 19 | 106 | 1514 | 42 | 1159.6 | 10 || screenpipe-db | 5 | 52 | 15 | 450 | 16 | 427.2 | 9 || screenpipe-sqlite-coordinator | 1 | 0 | 2 | 16 | 0 | 16.0 | 2 || screenpipe-audio | 6 | 25 | 51 | 591 | 43 | 517.4 | 5 |@@ -68,21 +68,21 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| database | 6 suites / 369 active / 12 ignored / 346.2 pts | 6 suites / 369 active / 12 ignored / 346.2 pts | 6 suites / 369 active / 12 ignored / 346.2 pts || db-search | 2 suites / 111 active / 9 ignored / 111.0 pts | 2 suites / 111 active / 9 ignored / 111.0 pts | 2 suites / 111 active / 9 ignored / 111.0 pts || engine-lifecycle | 6 suites / 208 active / 1 ignored / 183.6 pts | 6 suites / 208 active / 1 ignored / 183.6 pts | 5 suites / 202 active / 1 ignored / 181.9 pts |-| local-api | 2 suites / 351 active / 9 ignored / 247.5 pts | 2 suites / 351 active / 9 ignored / 247.5 pts | 2 suites / 351 active / 9 ignored / 247.5 pts |-| meeting | 6 suites / 1449 active / 19 ignored / 1183.5 pts | 6 suites / 1449 active / 19 ignored / 1183.5 pts | 4 suites / 1158 active / 15 ignored / 915.0 pts |+| local-api | 2 suites / 352 active / 9 ignored / 248.2 pts | 2 suites / 352 active / 9 ignored / 248.2 pts | 2 suites / 352 active / 9 ignored / 248.2 pts |+| meeting | 6 suites / 1450 active / 19 ignored / 1184.2 pts | 6 suites / 1450 active / 19 ignored / 1184.2 pts | 4 suites / 1159 active / 15 ignored / 915.7 pts || ocr | 4 suites / 124 active / 7 ignored / 118.3 pts | 4 suites / 128 active / 7 ignored / 123.8 pts | 3 suites / 119 active / 6 ignored / 114.8 pts || os-integration | 1 suites / 6 active / 0 ignored / 1.7 pts | 1 suites / 6 active / 0 ignored / 1.7 pts | - |-| performance | 13 suites / 1411 active / 67 ignored / 1240.8 pts | 14 suites / 1514 active / 70 ignored / 1282.0 pts | 13 suites / 1411 active / 67 ignored / 1240.8 pts |+| performance | 13 suites / 1412 active / 67 ignored / 1241.5 pts | 14 suites / 1515 active / 70 ignored / 1282.7 pts | 13 suites / 1412 active / 67 ignored / 1241.5 pts || pipes | 1 suites / 465 active / 3 ignored / 325.5 pts | 1 suites / 465 active / 3 ignored / 325.5 pts | 1 suites / 465 active / 3 ignored / 325.5 pts || privacy | 5 suites / 881 active / 36 ignored / 716.6 pts | 5 suites / 935 active / 16 ignored / 723.5 pts | 5 suites / 856 active / 14 ignored / 694.1 pts || real-app | - | 1 suites / 103 active / 3 ignored / 41.2 pts | - || speaker | 2 suites / 348 active / 8 ignored / 348.0 pts | 2 suites / 348 active / 8 ignored / 348.0 pts | 2 suites / 348 active / 8 ignored / 348.0 pts |-| storage | 3 suites / 504 active / 29 ignored / 406.2 pts | 3 suites / 504 active / 29 ignored / 406.2 pts | 3 suites / 504 active / 29 ignored / 406.2 pts |+| storage | 3 suites / 505 active / 29 ignored / 406.9 pts | 3 suites / 505 active / 29 ignored / 406.9 pts | 3 suites / 505 active / 29 ignored / 406.9 pts || sync | 1 suites / 465 active / 3 ignored / 325.5 pts | 1 suites / 465 active / 3 ignored / 325.5 pts | 1 suites / 465 active / 3 ignored / 325.5 pts |-| timeline | 4 suites / 995 active / 33 ignored / 805.1 pts | 4 suites / 995 active / 33 ignored / 805.1 pts | 4 suites / 995 active / 33 ignored / 805.1 pts |-| transcription | 5 suites / 724 active / 40 ignored / 569.4 pts | 5 suites / 724 active / 40 ignored / 569.4 pts | 5 suites / 724 active / 40 ignored / 569.4 pts |+| timeline | 4 suites / 997 active / 33 ignored / 806.5 pts | 4 suites / 997 active / 33 ignored / 806.5 pts | 4 suites / 997 active / 33 ignored / 806.5 pts |+| transcription | 5 suites / 725 active / 40 ignored / 570.1 pts | 5 suites / 725 active / 40 ignored / 570.1 pts | 5 suites / 725 active / 40 ignored / 570.1 pts || ui-events | 4 suites / 704 active / 28 ignored / 536.0 pts | 3 suites / 655 active / 5 ignored / 501.7 pts | 3 suites / 655 active / 5 ignored / 501.7 pts |-| vision-capture | 5 suites / 530 active / 32 ignored / 418.0 pts | 5 suites / 534 active / 32 ignored / 423.5 pts | 4 suites / 525 active / 31 ignored / 414.5 pts |+| vision-capture | 5 suites / 531 active / 32 ignored / 418.7 pts | 5 suites / 535 active / 32 ignored / 424.2 pts | 4 suites / 526 active / 31 ignored / 415.2 pts |## Critical Flow Matrix@@ -133,8 +133,8 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| db-runtime-reliability | screenpipe-db | windows, macos, linux | database, performance | performance-liveness | high | partial | mixed | 13 | 30 | 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 | 19 | 178 | 3 | 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 | 34 | 345 | 4 | 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 | 288 | 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-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 | 34 | 346 | 4 | 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 | 289 | 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 | 11 | 111 | 1 | Fast logic coverage for the config bridge, 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 | 8 | 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. |@@ -413,7 +413,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| engine-api-routes | screenpipe-engine | src/routes/search.rs | source | 25 | 0 | 25 || engine-api-routes | screenpipe-engine | src/routes/semantic.rs | source | 2 | 0 | 2 || engine-api-routes | screenpipe-engine | src/routes/speakers.rs | source | 4 | 0 | 4 |-| engine-api-routes | screenpipe-engine | src/routes/streaming.rs | source | 17 | 0 | 17 |+| engine-api-routes | screenpipe-engine | src/routes/streaming.rs | source | 18 | 0 | 18 || engine-api-routes | screenpipe-engine | src/routes/structured_outputs.rs | source | 1 | 0 | 1 || engine-api-routes | screenpipe-engine | src/routes/time.rs | source | 12 | 0 | 12 || engine-api-routes | screenpipe-engine | src/routes/timezone.rs | source | 8 | 0 | 8 |@@ -446,7 +446,7 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| engine-meeting-watcher | screenpipe-engine | tests/meeting_detection_eval.rs | integration | 2 | 0 | 2 || engine-retention-storage | screenpipe-engine | tests/retention_lean_test.rs | integration | 4 | 0 | 4 || engine-api-routes | screenpipe-engine | tests/router_contract_test.rs | integration | 1 | 0 | 1 |-| engine-capture-timeline | screenpipe-engine | tests/stream_frames_test.rs | integration | 1 | 5 | 6 |+| engine-capture-timeline | screenpipe-engine | tests/stream_frames_test.rs | integration | 2 | 5 | 7 || engine-api-routes | screenpipe-engine | tests/tags_test.rs | integration | 5 | 0 | 5 || engine-capture-timeline | screenpipe-engine | tests/timeline_refresh_bug_test.rs | integration | 16 | 0 | 16 || engine-api-routes | screenpipe-engine | tests/transcribe_test.rs | integration | 5 | 1 | 6 |