Bug: Low-storage alert fires on read-only / DMG-mounted volumes (false positive, e.g. 'Ghostty') #33

Closed
opened 2026-09-08 14:49:12 +01:00 by gronod · 0 comments
Owner

Purpose

The low-storage alert rule evaluates every mounted volume, including read-only DMG images and app-translocation mounts whose ~0% free space is normal. Observed false positive: notification "Low disk space on 'Ghostty'" — the Ghostty.app volume is a read-only DMG mount.

Root Cause

  • AlertEngine.buildCandidates (Sources/Intelligence/AlertEngine.swift, low-storage rule) iterates all ctx.volumes without checking writability.
  • StorageVolumeContext (Sources/Intelligence/AlertModels.swift) does not carry isReadOnly, even though StorageVolumeItem.isReadOnly exists (SystemTelemetryStore.swift) and MMStorageTelemetryProvider emits isReadOnly (MMStorageTelemetryProvider.m:71).

Suggested Fix

  • Add isReadOnly (and consider fileSystem/mount characteristics) to StorageVolumeContext and populate it in SystemTelemetryStore.decodeSnapshot's context builder.
  • In the low-storage rule, skip volumes where isReadOnly == true (mounted disk images, snapshot volumes). Optionally also skip pseudo-filesystems and volumes below a minimum capacity floor (e.g. < 1 GB total, where % thresholds are meaningless).
  • Regression tests in Tests/MMAlertsTests.swift:
    • read-only volume below both thresholds → no alert
    • writable volume below threshold → alert fires
    • tiny-capacity volume (if floor adopted) → no alert

Acceptance Criteria

  • Read-only mounts (DMGs, x86_64 app translocation images) never produce low-storage alerts.
  • Writable volumes still alert correctly per configured GB/% thresholds.
  • History log records no spurious lowStorage:<dmg-mount> events.

Dependencies

  • None.
### Purpose The low-storage alert rule evaluates **every** mounted volume, including read-only DMG images and app-translocation mounts whose ~0% free space is normal. Observed false positive: notification "Low disk space on 'Ghostty'" — the Ghostty.app volume is a read-only DMG mount. ### Root Cause - `AlertEngine.buildCandidates` (`Sources/Intelligence/AlertEngine.swift`, low-storage rule) iterates all `ctx.volumes` without checking writability. - `StorageVolumeContext` (`Sources/Intelligence/AlertModels.swift`) does not carry `isReadOnly`, even though `StorageVolumeItem.isReadOnly` exists (`SystemTelemetryStore.swift`) and `MMStorageTelemetryProvider` emits `isReadOnly` (`MMStorageTelemetryProvider.m:71`). ### Suggested Fix - Add `isReadOnly` (and consider `fileSystem`/mount characteristics) to `StorageVolumeContext` and populate it in `SystemTelemetryStore.decodeSnapshot`'s context builder. - In the low-storage rule, skip volumes where `isReadOnly == true` (mounted disk images, snapshot volumes). Optionally also skip pseudo-filesystems and volumes below a minimum capacity floor (e.g. < 1 GB total, where % thresholds are meaningless). - Regression tests in `Tests/MMAlertsTests.swift`: - read-only volume below both thresholds → **no** alert - writable volume below threshold → alert fires - tiny-capacity volume (if floor adopted) → no alert ### Acceptance Criteria - [ ] Read-only mounts (DMGs, `x86_64` app translocation images) never produce low-storage alerts. - [ ] Writable volumes still alert correctly per configured GB/% thresholds. - [ ] History log records no spurious `lowStorage:<dmg-mount>` events. ### Dependencies - None.
gronod added this to the M6: Bugfix & Stability milestone 2026-09-08 14:49:12 +01:00
gronod added the Bug/BackendKind/Bug
Priority
Medium
3
Project/Antigravity
labels 2026-09-08 14:49:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/MacMonitor#33