Tests show real desktop notifications on the developer machine #874

Open
opened 2026-11-18 06:34:17 +00:00 by charles · 0 comments
Owner

Reported by Charles, 2026-11-18: "I keep seeing this notification: Got a minute? The release notes need a second pair of eyes."

That text is a fixture message (fixtures/scenarios/textchat.toml). Runtime defaults to fluxer_platform::system_notifier, so every test or dev-server run that does not inject a fake notifier shows a real notification on the desktop session it runs in. Before PR #756 the Linux notifier panicked on the first notification, which hid this; since then every gate run (cargo xtask ci) by any agent pops notifications on the machine owner's desktop.

Wanted. No test, gate or headless run ever reaches the real notification service:

  1. the runtime builders used by tests and by --devserver in tests default to a silent notifier unless a test injects one;
  2. a process-wide off switch honoured by system_notifier itself (an environment variable such as FLUXER_NO_DESKTOP_NOTIFICATIONS=1) that cargo xtask ci and the test harnesses set, as a second line of defence;
  3. the same audit for anything else tests could do to the live session: sounds played on the real output device, tray icons, global shortcuts, opening URLs or folders (xdg-open), clipboard writes, window focus requests;
  4. a test that fails if the real notifier is constructed while the switch is set.
**Reported by Charles, 2026-11-18:** "I keep seeing this notification: Got a minute? The release notes need a second pair of eyes." That text is a fixture message (`fixtures/scenarios/textchat.toml`). `Runtime` defaults to `fluxer_platform::system_notifier`, so every test or dev-server run that does not inject a fake notifier shows a real notification on the desktop session it runs in. Before PR #756 the Linux notifier panicked on the first notification, which hid this; since then every gate run (`cargo xtask ci`) by any agent pops notifications on the machine owner's desktop. **Wanted.** No test, gate or headless run ever reaches the real notification service: 1. the runtime builders used by tests and by `--devserver` in tests default to a silent notifier unless a test injects one; 2. a process-wide off switch honoured by `system_notifier` itself (an environment variable such as `FLUXER_NO_DESKTOP_NOTIFICATIONS=1`) that `cargo xtask ci` and the test harnesses set, as a second line of defence; 3. the same audit for anything else tests could do to the live session: sounds played on the real output device, tray icons, global shortcuts, opening URLs or folders (xdg-open), clipboard writes, window focus requests; 4. a test that fails if the real notifier is constructed while the switch is set.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#874
No description provided.