Skip to content

fix: filter system daemons from mic detection to prevent false notifications#3722

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1770518539-filter-system-daemons-mic-detection
Open

fix: filter system daemons from mic detection to prevent false notifications#3722
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1770518539-filter-system-daemons-mic-detection

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 8, 2026

fix: filter system daemons from mic detection

Summary

Fixes false "Meeting in progress?" notifications caused by avconferenced (macOS FaceTime audio daemon) being detected as a mic-using app.

Root cause: resolve_via_nsrunningapp_inner had a fallback that returned processes based solely on bundleIdentifier when no .app bundle was found. System daemons like avconferenced have a bundle identifier but no .app bundle, so they slipped through and started the 3-minute prolonged usage timer — triggering a notification even when no meeting was active.

Fix: Remove the bundleIdentifier-only fallback. Now resolve_via_nsrunningapp_inner only returns apps that have a valid .app bundle path via find_outermost_app. If bundleURL() is absent or the path doesn't contain an .app bundle, the function returns None. The existing resolve_via_sysinfo fallback in resolve_to_app still serves as a second resolution attempt using the exe path, which also requires finding a .app bundle.

Added test cases (2 non-ignored for find_outermost_app path filtering, 2 ignored for manual macOS verification).

Review & Testing Checklist for Human

  • Verify no legitimate apps are dropped: The removed fallback would catch apps that have a bundleIdentifier but whose bundleURL doesn't resolve to an .app bundle via find_outermost_app. Are there real meeting apps (Electron-based, non-standard installs) that could be affected? The resolve_via_sysinfo fallback mitigates this, but worth thinking through.
  • Manual macOS test: Run cargo test -p detect --features list,mic,app test_mic_using_apps_no_system_daemons -- --ignored --nocapture while a meeting app (Zoom, FaceTime) is using the mic. Verify real apps still appear and avconferenced does not.
  • Manual macOS test: Start a FaceTime call, end it, then wait 3+ minutes. Confirm the "Meeting in progress?" notification does NOT appear from avconferenced.

Notes


Open with Devin

…cations

Remove the fallback in resolve_via_nsrunningapp_inner that returned
processes based solely on bundleIdentifier when no .app bundle was found.
System daemons like avconferenced (FaceTime audio daemon) would slip
through this fallback and trigger false 'Meeting in progress?' notifications.

Now only processes with an actual .app bundle path are resolved to apps.

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit aa6c1cf
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6987f9dd4df2730008551255

@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit aa6c1cf
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6987f9dd070a0a0008aab62c

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

}
for app in &apps {
assert!(
!app.name.ends_with('d') || app.name.contains('.'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Test heuristic falsely flags legitimate apps like "Discord" as system daemons

The test_mic_using_apps_no_system_daemons test uses the heuristic !app.name.ends_with('d') || app.name.contains('.') to detect system daemons. This assertion fails for any legitimate app whose display name ends with 'd' and doesn't contain '.', such as "Discord", "Rewind", or "Alfred".

Detailed Explanation

The assertion at line 188:

!app.name.ends_with('d') || app.name.contains('.')

is logically equivalent to: "if the name ends with 'd', it must contain '.'". System daemons like avconferenced end with 'd' and don't contain '.', but so do many legitimate apps.

For example, if Discord is using the mic, read_bundle_info at crates/bundle/src/bundle.rs:24-27 would return name: "Discord" from CFBundleDisplayName or CFBundleName. This name ends with 'd' and doesn't contain '.', so the assertion would fire:

detected app 'Discord' (com.hnc.Discord) looks like a system daemon

While this test is #[ignore] and only run manually, its stated purpose is to verify that the daemon filtering works correctly during a meeting. A false failure when a legitimate app like Discord is using the mic defeats the test's purpose and could confuse developers running the manual verification.

Impact: Manual verification test produces false positives for legitimate apps, undermining confidence in the test results.

Prompt for agents
Replace the heuristic at line 188 in crates/detect/src/list/macos.rs with a more reliable check. Instead of checking if the app name ends with 'd' and doesn't contain '.', consider checking against a known list of system daemon paths or bundle IDs. For example, you could check that the app's bundle ID doesn't match known system daemon patterns like 'com.apple.avconferenced', or verify that the resolved app path starts with '/Applications' rather than '/usr/libexec' or '/System/Library'. Alternatively, simply remove the assertion and rely on the println output for manual inspection, since the test is already marked as #[ignore] for manual verification.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant