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(audio): release capture when smart recording cannot deliver the meeting (#6095)
Louis Beaumont5dcf2787a91c
diff --git a/COVERAGE.md b/COVERAGE.mdindex 75703b9d2..3d3e3ca23 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: 318-- Active test blocks: 3008+- Active test blocks: 3013- Ignored/manual test blocks: 137-- Weighted coverage points: 2474.7+- Weighted coverage points: 2479.7| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 29 | 2877 | 132 | 2414.7 | 21 | 11 | 100% |-| macos | 29 | 2931 | 112 | 2425.8 | 22 | 11 | 100% |-| linux | 25 | 2564 | 105 | 2132.2 | 20 | 11 | 100% |+| windows | 29 | 2882 | 132 | 2419.7 | 21 | 11 | 100% |+| macos | 29 | 2936 | 112 | 2430.8 | 22 | 11 | 100% |+| linux | 25 | 2569 | 105 | 2137.2 | 20 | 11 | 100% |## Refreshdiff --git a/TESTING.md b/TESTING.mdindex f00ae4d7d..fc075f5d4 100644--- a/TESTING.md+++ b/TESTING.md@@ -120,23 +120,29 @@ commits: `28e5c247`- [ ] **piggyback takes precedence over capture mode** — flag on, capture mode "always" (continuous): joining a meeting engages the piggyback exactly as in meetings-only (Meeting Tap + resolved mic, global output and non-resolved mics suspended); on meeting end continuous capture resumes on the user's configured devices with no leftover session streams or suspensions.- [ ] **manual meeting piggyback (all mic-holders)** — flag on, start a MANUAL meeting while an app holds the mic: within ~6s (two-tick pid adoption) a Meeting Tap session starts over ALL mic-holding processes and their resolved mics are captured; a second app opening a mic mid-meeting rebuilds the tap over the widened set (one `rebuilding tap` log, NO strike, no System Audio resume/suspend churn); ending the manual meeting reverts everything. Screenpipe's own processes must never appear in the tapped set.- [ ] **enabled resolved mic displaces others (D1, latched)** — two mics enrolled, meeting app using one of them (no session stream needed): once the resolved mic delivers, the OTHER enrolled mic is suspended ONCE (single transcription stream, no re-suspend churn); a transient stall of the resolved mic (BT renegotiation) does NOT resume the others — they come back only when the app releases its mics, the resolved capture stays dead for 60s+, or the meeting ends; after such a lift, the meeting app recovering onto an enrolled mic re-latches displacement once.-> **NO FALLBACK since #6072.** Smart recording is the *sole* capture owner for a-> confirmed meeting: `meeting_piggyback_owns_normal_capture()` is-> `piggyback_enabled && meeting_state == Some(true)`, with no term for whether the-> tap actually built. When the tap cannot build, normal capture stays suspended and-> **the meeting records nothing**. The four items below previously asserted the-> opposite; they were stale from #6072 until 2026-08-09. Verified live on 2.6.1: an-> 86s manual meeting produced 3,584 samples (~0.22s) and an empty transcript, while-> the identical audio captured normally with no meeting active.--- [ ] **tap build failure records nothing** — flag on, force tap failure (revoke System Audio Recording permission): normal capture stays suspended for the whole meeting and no audio is recorded. Confirm ≤3 retries per meeting with 60s cooldown, and that the emitted `piggyback_meeting_summary` carries `captured_no_audio: true`. This is the current contract, not the desired one — see the follow-up issue on restoring a real fallback.-- [ ] **tap build failure is backend-neutral** — repeat with `experimentalCoreaudioSystemAudio` ON: behaviour must be identical (no capture, `captured_no_audio: true`) regardless of which System Audio backend the user's settings select. If a fallback is ever restored, this is where backend re-derivation gets re-verified.-- [ ] **app quits mid-meeting** — kill the meeting app: tap stream tears down within ~2s; no crash, no rebuild storm. Normal capture does NOT resume until the watcher ends the meeting.-- [ ] **no pid (ui_scan/reattach) records nothing** — a DETECTED meeting whose sensor can't identify the process (ui_scan, post-restart reattach) keeps normal capture suspended and records nothing; outcome is `no_pid` with `captured_no_audio: true`. It does NOT behave like flag-off. Manual meetings are NOT in this bucket — they derive their pid set from the live mic-holder enumeration (see the manual-piggyback item above).-- [ ] **silent meetings are detectable** — for every case above, `piggyback_meeting_summary` must carry `captured_no_audio: true`. The `outcome` strings (`stable_fallback`, `no_pid`, `unavailable`) are all reported for meetings that captured nothing and all read as benign, so `outcome` alone cannot distinguish a silent meeting from a healthy one.+> **OWNERSHIP REQUIRES DELIVERY.** Smart recording is the sole capture owner for a+> confirmed meeting (#6072), but only while it can actually deliver:+> `piggyback_may_own_capture(tap_available, meeting_pid_count, tap_ever_started)`.+> Once a tap has started for the meeting, ownership is kept through any later gap —+> resuming there would re-create the device churn #6072 removed. Ownership is+> released only when the piggyback has never delivered AND cannot contend: no+> meeting pids (nothing is holding the devices) or no tap support on this OS.+>+> #6072 originally took ownership unconditionally, so a meeting whose tap never+> built recorded nothing: on 2.6.1 an 86s manual meeting produced 3,584 samples+> (~0.22s) and an empty transcript, while identical audio captured normally with no+> meeting active. Exhausted strikes deliberately still hold ownership — a meeting+> app really is holding devices there, so resuming needs device-level validation.++- [ ] **tap build failure keeps recording** — flag on, force tap failure (revoke System Audio Recording permission) BEFORE any tap starts: the user's configured capture keeps running for the whole meeting and audio is recorded. Confirm ≤3 retries per meeting with 60s cooldown, and that `piggyback_meeting_summary` does NOT carry `captured_no_audio: true`.+- [ ] **tap build failure is backend-neutral** — repeat with `experimentalCoreaudioSystemAudio` ON: normal capture keeps running either way, and the System Audio stream comes up on whichever backend the user's settings select.+- [ ] **app quits mid-meeting** — kill the meeting app: tap stream tears down within ~2s; no crash, no rebuild storm. A tap HAS started for this meeting, so suspensions are deliberately kept until the watcher ends it.+- [ ] **no pid (ui_scan/reattach) keeps recording** — a DETECTED meeting whose sensor can't identify the process (ui_scan, post-restart reattach) leaves normal capture running; nothing is holding the devices, so there is nothing to contend with. Manual meetings are NOT in this bucket — they derive their pid set from the live mic-holder enumeration (see the manual-piggyback item above).+- [ ] **a gap AFTER a working tap still suspends** — join a real call so the tap starts, then make the pid set go empty: suspensions must be KEPT (no resume churn). This is the anti-SCO-storm behaviour from #6072 and must not regress while fixing the silent-meeting case.+- [ ] **silent meetings are detectable** — if a meeting ever DOES capture nothing, `piggyback_meeting_summary` must carry `captured_no_audio: true`. The `outcome` strings (`stable_fallback`, `no_pid`, `unavailable`) are all reported for meetings that captured nothing and all read as benign, so `outcome` alone cannot distinguish a silent meeting from a healthy one.- [ ] **the gate is visible in logs** — with a meeting active and the flag on, released builds (INFO level) must log `smart recording owns capture for this meeting — not starting normal audio device: <device>`. This used to be DEBUG, i.e. invisible in shipped builds, which is why a silent meeting left no trace anywhere.- [ ] **browser pop-out / Little Arc meeting detection** — join a Google Meet call in a Chrome pop-out window or an Arc "Little Arc" window, then focus a different app: the meeting is detected within one poll of the mic being held (log shows the `UnresolvedBrowser` -> `Active` promotion); a non-meeting window whose title merely looks like a meeting code (e.g. a doc named "abc-defg-hij") with no mic held must NOT trigger detection. (`ff0337416`)-- [ ] **piggyback on unsupported OS** — flag on, macOS <14.4 / Windows <20348: one-time "using the stable capture path" log. NOTE: despite that log, capture is NOT identical to flag-off since #6072 — the meeting still keeps normal capture suspended and records nothing (`outcome: unavailable`, `captured_no_audio: true`). The Meeting Tap stream must not silently downgrade to endpoint-wide loopback.+- [ ] **piggyback on unsupported OS** — flag on, macOS <14.4 / Windows <20348: one-time "using the stable capture path" log. The meeting now genuinely rides the stable path: normal capture keeps running and audio is recorded (`outcome: unavailable`, and NOT `captured_no_audio`). The Meeting Tap stream must not silently downgrade to endpoint-wide loopback.- [ ] **mid-call mic switch in the app** — change Zoom's mic mid-call: capture follows within ~6s (two confirmation ticks AFTER Zoom has the new device — the app always acquires first; old session mic stops after two missed resolver ticks, new one starts); changing the OS default while Zoom is pinned elsewhere does NOT switch capture. Switching onto a mic the sweep had displaced only clears its suspension flag — no immediate restart racing the app.- [ ] **mic switch must not flap the meeting** — switch the meeting app's mic (AirPods → phone → built-in, several times): `meeting_status_changed` stays active=true throughout — NO end/re-start pair ~20s after each switch, no Meeting Tap teardown/rebuild, no System Audio resume/suspend churn. (Root cause was device-derived session keys: macOS synthesized the audio-session id from the device set and WASAPI GUIDs are per-endpoint, so a mic switch re-keyed the session and the meeting rode the 20s ending grace into EndMeeting + instant restart.)- [ ] **piggyback never acts on silence** — during a piggybacked call, silence must never make the piggyback rebuild, restart, probe, or notify: mute in the meeting app (or leave a silent tab rendering nothing) for 5+ min → NO notification, NO Meeting Tap rebuild, NO resolved-mic restart, and the logs contain no silence-driven piggyback actions. A silent meeting device is the user's own in-meeting feedback loop — they fix it in the app and the mic/output follow tracks the switch. (The GLOBAL System Audio tap's silence watchdog — item above, `75a52603b` — is unchanged and out of scope here.) Dead-stream handling still applies: hard open failures notify once via `audio_capture_health_mic_capture_failed`, and dead capture streams retry through `MicFollow`'s backoff.diff --git a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsxindex 19153237e..42a2bfe9a 100644--- a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx+++ b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx@@ -3585,7 +3585,7 @@ Your screen is a pipe. Everything you see, hear, and type flows through it. Scre</Badge></h3><p className="text-xs text-muted-foreground">- during meetings, records your meeting's audio and whichever microphone you pick in the meeting app — taking precedence over your other audio settings. while a meeting is running this replaces your normal capture, so if the meeting audio can't be captured that meeting may record nothing.+ during meetings, records your meeting's audio and whichever microphone you pick in the meeting app — taking precedence over your other audio settings. falls back to your configured capture automatically if unavailable.</p>{settings.disableMeetingDetector && (<p className="text-xs text-amber-600 dark:text-amber-500">diff --git a/crates/screenpipe-audio/src/audio_manager/manager.rs b/crates/screenpipe-audio/src/audio_manager/manager.rsindex a790c5643..fe7705507 100644--- a/crates/screenpipe-audio/src/audio_manager/manager.rs+++ b/crates/screenpipe-audio/src/audio_manager/manager.rs@@ -131,11 +131,19 @@ fn meetings_only_capture_waiting(matches!(capture_mode, AudioCaptureMode::MeetingsOnly) && meeting_state != Some(true)}+/// Whether smart recording currently owns the user's normal capture.+///+/// `sweep_owns_capture` is the piggyback sweep's answer to "can I actually+/// deliver this meeting" (see `meeting_piggyback::piggyback_may_own_capture`).+/// Without it this gate suspended normal capture for every confirmed meeting+/// regardless of whether the Meeting Tap had been built, so a meeting whose tap+/// never came up recorded nothing at all.fn meeting_piggyback_owns_normal_capture(piggyback_enabled: bool,meeting_state: Option<bool>,+ sweep_owns_capture: bool,) -> bool {- piggyback_enabled && meeting_state == Some(true)+ piggyback_enabled && meeting_state == Some(true) && sweep_owns_capture}/// Final privacy boundary before an audio chunk can reach disk or@@ -180,6 +188,18 @@ pub struct AudioManager {/// "am I the last instance?" — clones share it, so `Drop` can skip the/// teardown while any other clone is still alive.liveness: Arc<()>,+ /// Published by the piggyback sweep each tick: whether the piggyback is+ /// currently entitled to own the user's normal capture.+ ///+ /// The ownership gate cannot decide this alone — it only sees the flag and+ /// the meeting state, which is why #6072 suspended normal capture even+ /// when the Meeting Tap could not be built and the meeting then recorded+ /// nothing. The sweep is the only place that knows whether a tap exists,+ /// so it publishes the answer here.+ ///+ /// Defaults to false so the window between a meeting starting and the+ /// first sweep keeps the user's capture running rather than dropping it.+ piggyback_owns_capture: Arc<AtomicBool>,options: Arc<RwLock<AudioManagerOptions>>,device_manager: Arc<DeviceManager>,segmentation_manager: Arc<SegmentationManager>,@@ -403,6 +423,7 @@ impl AudioManager {let manager = Self {liveness: Arc::new(()),+ piggyback_owns_capture: Arc::new(AtomicBool::new(false)),options: Arc::new(RwLock::new(options)),device_manager: Arc::new(device_manager),segmentation_manager,@@ -1883,7 +1904,17 @@ impl AudioManager {.meeting_detector().await.map(|detector| detector.is_in_meeting());- meeting_piggyback_owns_normal_capture(enabled, meeting_state)+ meeting_piggyback_owns_normal_capture(+ enabled,+ meeting_state,+ self.piggyback_owns_capture.load(Ordering::Relaxed),+ )+ }++ /// Sweep -> gate handoff for piggyback capture ownership. See the+ /// `piggyback_owns_capture` field.+ pub(crate) fn set_piggyback_owns_capture(&self, owns: bool) {+ self.piggyback_owns_capture.store(owns, Ordering::Relaxed);}/// Whether Bluetooth mics are exempt from the meeting gate (see@@ -2508,10 +2539,45 @@ mod tests {#[test]fn piggyback_ownership_requires_both_flag_and_confirmed_meeting() {- assert!(meeting_piggyback_owns_normal_capture(true, Some(true)));- assert!(!meeting_piggyback_owns_normal_capture(false, Some(true)));- assert!(!meeting_piggyback_owns_normal_capture(true, Some(false)));- assert!(!meeting_piggyback_owns_normal_capture(true, None));+ assert!(meeting_piggyback_owns_normal_capture(+ true,+ Some(true),+ true+ ));+ assert!(!meeting_piggyback_owns_normal_capture(+ false,+ Some(true),+ true+ ));+ assert!(!meeting_piggyback_owns_normal_capture(+ true,+ Some(false),+ true+ ));+ assert!(!meeting_piggyback_owns_normal_capture(true, None, true));+ }++ /// Regression: the gate used to hold capture on flag + meeting alone, so a+ /// meeting whose Meeting Tap never built recorded nothing. Measured on+ /// 2.6.1: an 86s manual meeting produced 3,584 samples (~0.22s) and an+ /// empty transcript, where the same audio captured fine with no meeting.+ #[test]+ fn a_piggyback_that_cannot_deliver_does_not_hold_capture() {+ assert!(+ !meeting_piggyback_owns_normal_capture(true, Some(true), false),+ "sweep reports it cannot deliver — normal capture must keep running"+ );+ }++ /// The flag defaults to false, so the window between a meeting starting+ /// and the first sweep must not drop the user's capture.+ #[test]+ fn capture_is_not_held_before_the_first_sweep_reports() {+ assert!(!meeting_piggyback_owns_normal_capture(+ true,+ Some(true),+ false+ ));}#[test]diff --git a/crates/screenpipe-audio/src/audio_manager/meeting_piggyback.rs b/crates/screenpipe-audio/src/audio_manager/meeting_piggyback.rsindex e30be509d..9ce9a549c 100644--- a/crates/screenpipe-audio/src/audio_manager/meeting_piggyback.rs+++ b/crates/screenpipe-audio/src/audio_manager/meeting_piggyback.rs@@ -474,6 +474,14 @@ pub(crate) struct PiggybackObservation {pub stable_outputs: Vec<String>,pub tap_strikes: u32,pub tap_cooldown_elapsed: bool,+ /// Whether a Meeting Tap has started at any point in THIS meeting.+ ///+ /// Distinguishes a transient gap under a working piggyback (keep every+ /// suspension — resuming would re-create the device churn this feature+ /// exists to prevent) from a piggyback that has never delivered at all+ /// (holding capture suspended just makes the meeting silent). See+ /// [`piggyback_may_own_capture`].+ pub tap_ever_started: bool,/// Pids the currently-registered Meeting Tap was built over (sorted)./// Empty when no tap is registered. Lets the decider notice the/// mic-holder set changing mid-meeting (manual meetings track it live)@@ -509,6 +517,43 @@ pub(crate) enum PiggybackAction {/// Pure decision function. Given a snapshot of everything relevant this tick,/// returns the actions the sweep must apply. No OS, no manager, no locks —/// exhaustively unit-tested against the decision matrix.+/// Whether the piggyback is entitled to own (and therefore suspend) the user's+/// normal capture for this tick.+///+/// #6072 made the piggyback the sole capture owner for a confirmed meeting so+/// two subsystems could never fight over the same devices — the churn behind+/// the Bluetooth SCO storms that starved Zoom and Meet. It took ownership+/// unconditionally though, so when the tap could not be built the meeting+/// recorded *nothing*: measured live on 2.6.1, an 86s manual meeting produced+/// 3,584 samples (~0.22s) and an empty transcript, where 2.5.x manual meetings+/// captured millions.+///+/// Ownership is kept whenever the piggyback is delivering or has delivered:+/// `tap_ever_started` means a real tap exists for this meeting, so a pid gap is+/// transient and resuming normal capture would reintroduce exactly the churn+/// #6072 removed.+///+/// It is released only when the piggyback has never delivered AND cannot+/// contend for anything right now:+/// * no meeting pids — nothing is holding the devices, so normal capture+/// cannot fight anyone, and staying suspended only produces silence;+/// * no tap support on this OS — the tap never opens, so there is likewise+/// nothing to contend with.+///+/// Deliberately NOT released on exhausted strikes: there the meeting app really+/// is holding devices, so resuming would put two recorders back on the same+/// hardware. That case needs device-level validation before it changes.+pub(crate) fn piggyback_may_own_capture(+ tap_available: bool,+ meeting_pid_count: usize,+ tap_ever_started: bool,+) -> bool {+ if tap_ever_started {+ return true;+ }+ tap_available && meeting_pid_count > 0+}+pub(crate) fn decide_piggyback(obs: &PiggybackObservation) -> Vec<PiggybackAction> {let mut actions = Vec::new();let engaged = obs.flag_on;@@ -532,6 +577,24 @@ pub(crate) fn decide_piggyback(obs: &PiggybackObservation) -> Vec<PiggybackActioreturn actions;}+ // Release capture entirely when the piggyback has never delivered and has+ // nothing to contend with (see `piggyback_may_own_capture`). Placed BEFORE+ // the suspend pass so those ticks never suspend-then-resume: the user's+ // configured capture simply keeps running, and the meeting is recorded by+ // the normal path instead of being silent.+ if !piggyback_may_own_capture(obs.tap_available, meeting_pids.len(), obs.tap_ever_started) {+ for dev in &obs.session_devices {+ actions.push(PiggybackAction::StopSessionDevice(dev.clone()));+ }+ for dev in &obs.suspended {+ actions.push(PiggybackAction::Resume(dev.clone()));+ }+ if !meeting_pids.is_empty() && !obs.tap_available {+ actions.push(PiggybackAction::WarnUnavailableOnce);+ }+ return actions;+ }+// The meeting owns capture immediately, before either piggyback stream is// proven healthy. This prevents default-device changes and tap gaps from// creating a second recorder.@@ -1161,10 +1224,27 @@ pub(crate) async fn run_meeting_piggyback_sweep(stable_outputs,tap_strikes: state.tap_strikes,tap_cooldown_elapsed: cooldown_elapsed,+ tap_ever_started: state.telemetry.tap_started_count > 0,tap_built_pids: state.tap_pids.clone(),retap_target_pids,};+ // Publish ownership for the manager's device-start gate. That gate only+ // sees the flag and the meeting state; this sweep is the only place that+ // knows whether a tap exists, so without this handoff the gate suspends+ // normal capture even when the piggyback cannot deliver, and the meeting+ // records nothing. Ownership requires an active meeting too — outside one+ // the gate must never hold capture.+ audio_manager.set_piggyback_owns_capture(+ flag_on+ && obs.meeting.is_some()+ && piggyback_may_own_capture(+ obs.tap_available,+ obs.meeting.as_deref().unwrap_or(&[]).len(),+ obs.tap_ever_started,+ ),+ );+let tap_device_str = format!("{} (output)", MEETING_TAP_DEVICE_NAME);let tap_streaming = session_streaming.contains(&tap_device_str);@@ -1498,12 +1578,54 @@ mod tests {}#[test]- fn meeting_without_pid_keeps_normal_capture_suspended() {+ /// With no meeting pids nothing is holding the devices, so there is no+ /// contention for the piggyback to prevent — suspending here only produced+ /// a silent meeting. Reproduced on 2.6.1: an 86s manual meeting captured+ /// 3,584 samples (~0.22s) with an empty transcript.+ fn meeting_without_pid_leaves_normal_capture_running() {let mut obs = base();obs.meeting = Some(vec![]);- let actions = decide_piggyback(&obs);+ assert_eq!(decide_piggyback(&obs), vec![]);+ }++ #[test]+ fn ownership_matrix() {+ // delivering, or has delivered -> owns capture+ assert!(piggyback_may_own_capture(true, 1, false));+ assert!(piggyback_may_own_capture(true, 1, true));+ // a gap after a working tap is transient -> still owns+ assert!(piggyback_may_own_capture(true, 0, true));+ assert!(piggyback_may_own_capture(false, 0, true));+ // never delivered and nothing to contend with -> releases+ assert!(!piggyback_may_own_capture(true, 0, false));+ assert!(!piggyback_may_own_capture(false, 1, false));+ assert!(!piggyback_may_own_capture(false, 0, false));+ }++ /// Devices already suspended when the piggyback turns out to be unable to+ /// deliver must be released, not merely left alone — otherwise capture+ /// stays dead for the rest of the meeting.+ #[test]+ fn releasing_ownership_resumes_devices_already_suspended() {+ let mut obs = base();+ obs.meeting = Some(vec![]);+ obs.suspended = HashSet::from(["System Audio (output)".to_string()]);assert_eq!(- actions,+ decide_piggyback(&obs),+ vec![PiggybackAction::Resume("System Audio (output)".to_string())]+ );+ }++ /// Once a tap has worked this meeting, a pid gap is transient: keep every+ /// suspension rather than churning devices back on, which is the behaviour+ /// #6072 introduced to stop Bluetooth SCO storms.+ #[test]+ fn pid_gap_after_a_working_tap_keeps_capture_suspended() {+ let mut obs = base();+ obs.meeting = Some(vec![]);+ obs.tap_ever_started = true;+ assert_eq!(+ decide_piggyback(&obs),vec![PiggybackAction::Suspend("System Audio (output)".to_string())]@@ -1657,15 +1779,15 @@ mod tests {}#[test]- fn platform_unavailable_warns_and_keeps_normal_capture_suspended() {+ /// On an OS without per-process capture the tap never opens, so there is+ /// nothing to contend with and nothing to wait for. Holding capture there+ /// guaranteed a silent meeting on every macOS <14.4 / Windows <20348 host.+ fn platform_unavailable_warns_and_leaves_normal_capture_running() {let mut obs = base();obs.tap_available = false;assert_eq!(decide_piggyback(&obs),- vec![- PiggybackAction::Suspend("System Audio (output)".to_string()),- PiggybackAction::WarnUnavailableOnce,- ]+ vec![PiggybackAction::WarnUnavailableOnce]);}@@ -1682,12 +1804,11 @@ mod tests {let mut obs = base();obs.meeting = Some(vec![100, 200]);obs.tap_available = false;+ // Riding the stable path now means literally that: normal capture is+ // left running. Previously this suspended it and recorded nothing.assert_eq!(decide_piggyback(&obs),- vec![- PiggybackAction::Suspend("System Audio (output)".to_string()),- PiggybackAction::WarnUnavailableOnce,- ]+ vec![PiggybackAction::WarnUnavailableOnce]);}diff --git a/docs/coverage/CORE.md b/docs/coverage/CORE.mdindex 5f8074a03..9dd12c977 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: 318-- Active test blocks: 3008+- Active test blocks: 3013- Ignored/manual test blocks: 137-- Declared test blocks: 3145-- Weighted coverage points: 2474.7+- Declared test blocks: 3150+- Weighted coverage points: 2479.7Confidence 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,9 +23,9 @@ are explicitly enabled in a runtime lane.| Platform | Suites | Active tests | Ignored tests | Weighted points | Layers | Flows | Critical score || --- | --- | --- | --- | --- | --- | --- | --- |-| windows | 29 | 2877 | 132 | 2414.7 | 21 | 11 | 100% |-| macos | 29 | 2931 | 112 | 2425.8 | 22 | 11 | 100% |-| linux | 25 | 2564 | 105 | 2132.2 | 20 | 11 | 100% |+| windows | 29 | 2882 | 132 | 2419.7 | 21 | 11 | 100% |+| macos | 29 | 2936 | 112 | 2430.8 | 22 | 11 | 100% |+| linux | 25 | 2569 | 105 | 2137.2 | 20 | 11 | 100% |## Crate Summary@@ -34,7 +34,7 @@ are explicitly enabled in a runtime lane.| screenpipe-engine | 10 | 18 | 102 | 1437 | 42 | 1101.8 | 10 || screenpipe-db | 5 | 51 | 14 | 423 | 16 | 402.7 | 9 || screenpipe-sqlite-coordinator | 1 | 0 | 2 | 11 | 0 | 11.0 | 2 |-| screenpipe-audio | 6 | 25 | 49 | 570 | 43 | 498.2 | 5 |+| screenpipe-audio | 6 | 25 | 49 | 575 | 43 | 503.2 | 5 || screenpipe-screen | 6 | 9 | 18 | 234 | 9 | 213.5 | 4 || screenpipe-a11y | 4 | 2 | 28 | 333 | 27 | 247.6 | 3 |@@ -62,25 +62,25 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| Layer | windows | macos | linux || --- | --- | --- | --- || accessibility | 4 suites / 336 active / 29 ignored / 309.4 pts | 4 suites / 386 active / 9 ignored / 315.0 pts | 4 suites / 312 active / 7 ignored / 287.5 pts |-| audio | 7 suites / 666 active / 44 ignored / 594.2 pts | 7 suites / 666 active / 44 ignored / 594.2 pts | 6 suites / 591 active / 43 ignored / 541.7 pts |-| audio-device | 2 suites / 209 active / 7 ignored / 186.5 pts | 2 suites / 209 active / 7 ignored / 186.5 pts | 1 suites / 134 active / 6 ignored / 134.0 pts |+| audio | 7 suites / 671 active / 44 ignored / 599.2 pts | 7 suites / 671 active / 44 ignored / 599.2 pts | 6 suites / 596 active / 43 ignored / 546.7 pts |+| audio-device | 2 suites / 211 active / 7 ignored / 188.5 pts | 2 suites / 211 active / 7 ignored / 188.5 pts | 1 suites / 136 active / 6 ignored / 136.0 pts || configuration | 2 suites / 135 active / 3 ignored / 122.8 pts | 2 suites / 135 active / 3 ignored / 122.8 pts | 2 suites / 135 active / 3 ignored / 122.8 pts || database | 6 suites / 341 active / 12 ignored / 320.7 pts | 6 suites / 341 active / 12 ignored / 320.7 pts | 6 suites / 341 active / 12 ignored / 320.7 pts || db-search | 2 suites / 107 active / 9 ignored / 107.0 pts | 2 suites / 107 active / 9 ignored / 107.0 pts | 2 suites / 107 active / 9 ignored / 107.0 pts || engine-lifecycle | 6 suites / 205 active / 1 ignored / 180.0 pts | 6 suites / 205 active / 1 ignored / 180.0 pts | 5 suites / 199 active / 1 ignored / 178.3 pts || local-api | 2 suites / 322 active / 9 ignored / 227.2 pts | 2 suites / 322 active / 9 ignored / 227.2 pts | 2 suites / 322 active / 9 ignored / 227.2 pts |-| meeting | 6 suites / 1377 active / 19 ignored / 1121.4 pts | 6 suites / 1377 active / 19 ignored / 1121.4 pts | 4 suites / 1099 active / 15 ignored / 865.9 pts |+| meeting | 6 suites / 1380 active / 19 ignored / 1124.4 pts | 6 suites / 1380 active / 19 ignored / 1124.4 pts | 4 suites / 1102 active / 15 ignored / 868.9 pts || ocr | 4 suites / 120 active / 7 ignored / 114.3 pts | 4 suites / 124 active / 7 ignored / 119.8 pts | 3 suites / 115 active / 6 ignored / 110.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 / 1353 active / 67 ignored / 1195.7 pts | 14 suites / 1451 active / 70 ignored / 1234.9 pts | 13 suites / 1353 active / 67 ignored / 1195.7 pts |+| performance | 13 suites / 1355 active / 67 ignored / 1197.7 pts | 14 suites / 1453 active / 70 ignored / 1236.9 pts | 13 suites / 1355 active / 67 ignored / 1197.7 pts || pipes | 1 suites / 461 active / 3 ignored / 322.7 pts | 1 suites / 461 active / 3 ignored / 322.7 pts | 1 suites / 461 active / 3 ignored / 322.7 pts || privacy | 5 suites / 869 active / 36 ignored / 706.1 pts | 5 suites / 919 active / 16 ignored / 711.7 pts | 5 suites / 845 active / 14 ignored / 684.3 pts || real-app | - | 1 suites / 98 active / 3 ignored / 39.2 pts | - |-| speaker | 2 suites / 322 active / 8 ignored / 322.0 pts | 2 suites / 322 active / 8 ignored / 322.0 pts | 2 suites / 322 active / 8 ignored / 322.0 pts |+| speaker | 2 suites / 325 active / 8 ignored / 325.0 pts | 2 suites / 325 active / 8 ignored / 325.0 pts | 2 suites / 325 active / 8 ignored / 325.0 pts || storage | 3 suites / 472 active / 29 ignored / 382.9 pts | 3 suites / 472 active / 29 ignored / 382.9 pts | 3 suites / 472 active / 29 ignored / 382.9 pts || sync | 1 suites / 461 active / 3 ignored / 322.7 pts | 1 suites / 461 active / 3 ignored / 322.7 pts | 1 suites / 461 active / 3 ignored / 322.7 pts || timeline | 4 suites / 925 active / 33 ignored / 753.1 pts | 4 suites / 925 active / 33 ignored / 753.1 pts | 4 suites / 925 active / 33 ignored / 753.1 pts |-| transcription | 5 suites / 677 active / 40 ignored / 532.9 pts | 5 suites / 677 active / 40 ignored / 532.9 pts | 5 suites / 677 active / 40 ignored / 532.9 pts |+| transcription | 5 suites / 680 active / 40 ignored / 535.9 pts | 5 suites / 680 active / 40 ignored / 535.9 pts | 5 suites / 680 active / 40 ignored / 535.9 pts || ui-events | 4 suites / 696 active / 28 ignored / 531.1 pts | 3 suites / 648 active / 5 ignored / 497.5 pts | 3 suites / 648 active / 5 ignored / 497.5 pts || vision-capture | 5 suites / 482 active / 32 ignored / 384.4 pts | 5 suites / 486 active / 32 ignored / 389.9 pts | 4 suites / 477 active / 31 ignored / 380.9 pts |@@ -122,8 +122,8 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| a11y-linux-tree | screenpipe-a11y | linux | accessibility, privacy | accessibility-ui-events, privacy-and-redaction | medium | partial | unit | 4 | 24 | 1 | Linux-specific accessibility/incognito normalization tests. || a11y-macos-tree | screenpipe-a11y | macos | accessibility, privacy, real-app, performance | accessibility-ui-events, privacy-and-redaction, performance-liveness | high | conditional | mixed | 6 | 98 | 3 | macOS AX unit coverage plus real TextEdit/Finder/Obsidian probes. Obsidian tests are ignored by default because they require a local app install and AX permission. || a11y-windows-tree | screenpipe-a11y | windows | accessibility, privacy, ui-events | accessibility-ui-events, privacy-and-redaction | high | partial | unit | 6 | 48 | 23 | 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 | 134 | 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 | 25 | 226 | 7 | Meeting streaming config/controller logic, speaker embedding state, cross-device dedupe simulations, and overlap cleanup coverage. |+| 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 | 136 | 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 | 25 | 229 | 7 | 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 | 75 | 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. |@@ -186,8 +186,8 @@ bun run coverage:core -- --llvm-cov-summary ../../docs/coverage/core-llvm-cov-su| a11y-macos-tree | screenpipe-a11y | tests/e2e_obsidian.rs | integration | 0 | 3 | 3 || a11y-macos-tree | screenpipe-a11y | tests/e2e_tree_walker.rs | integration | 8 | 0 | 8 || audio-device-stream-health | screenpipe-audio | src/audio_manager/device_monitor.rs | source | 43 | 0 | 43 |-| audio-device-stream-health | screenpipe-audio | src/audio_manager/manager.rs | source | 20 | 1 | 21 |-| audio-meetings-speakers-dedup | screenpipe-audio | src/audio_manager/meeting_piggyback.rs | source | 46 | 0 | 46 |+| audio-device-stream-health | screenpipe-audio | src/audio_manager/manager.rs | source | 22 | 1 | 23 |+| audio-meetings-speakers-dedup | screenpipe-audio | src/audio_manager/meeting_piggyback.rs | source | 49 | 0 | 49 || audio-meetings-speakers-dedup | screenpipe-audio | src/audio_manager/piggyback_listeners.rs | source | 2 | 0 | 2 || audio-meetings-speakers-dedup | screenpipe-audio | src/audio_manager/reconciliation.rs | source | 22 | 1 | 23 || audio-platform-output-capture | screenpipe-audio | src/audio_manager/windows_output_follow.rs | source | 15 | 0 | 15 |