M5: Intelligence, Alerts & Hardening — milestone integration #27

Merged
gronod merged 3 commits from milestone/m5-alerts-hardening into develop 2026-09-08 14:04:49 +01:00
Owner

Summary

Milestone 5 integration into develop. Completes the final milestone of the build plan.

Contents (via PR #26)

  • Issue #24 — Threshold Alerts & macOS Notification Center Integration
    • Sources/Intelligence/: AlertEngine (5 configurable rules: CPU temp, fan stall, memory, storage, battery), AlertConfiguration (UserDefaults-persisted), AlertNotificationDispatching protocol + UNUserNotificationCenter delivery with foreground banners and action routing (Open MacMonitor, View Processes).
    • Per-alert cooldown (15 min default), edge-triggered resolve detection, capped 200-event history log.
    • New macOS Settings scene (AlertsSettingsView), new "Alerts & Notifications" sidebar tab, header badge, and menu bar ⚠ indicator.
    • Bug fix: memory pressureLevel now decodes memoryPressureStatus.
  • Release packagingrelease-package CI job on v* tags: Release x86_64 build → ad-hoc codesign → MacMonitor-intel-x86_64.zip → artifact + Gitea release asset.

Quality Gate M5

  • xcodebuild build test -scheme MacMonitor -destination 'platform=macOS,arch=x86_64'87 tests, 0 failures.
  • swiftlint lint0 violations.
  • Distribution artifact (MacMonitor-intel-x86_64.zip) is produced automatically when a v* tag is pushed.

Closes #24.

## Summary Milestone 5 integration into `develop`. Completes the final milestone of the build plan. ### Contents (via PR #26) - **Issue #24 — Threshold Alerts & macOS Notification Center Integration** - `Sources/Intelligence/`: `AlertEngine` (5 configurable rules: CPU temp, fan stall, memory, storage, battery), `AlertConfiguration` (UserDefaults-persisted), `AlertNotificationDispatching` protocol + `UNUserNotificationCenter` delivery with foreground banners and action routing (`Open MacMonitor`, `View Processes`). - Per-alert cooldown (15 min default), edge-triggered resolve detection, capped 200-event history log. - New macOS Settings scene (`AlertsSettingsView`), new "Alerts & Notifications" sidebar tab, header badge, and menu bar ⚠ indicator. - Bug fix: memory `pressureLevel` now decodes `memoryPressureStatus`. - **Release packaging** — `release-package` CI job on `v*` tags: Release x86_64 build → ad-hoc codesign → `MacMonitor-intel-x86_64.zip` → artifact + Gitea release asset. ### Quality Gate M5 - `xcodebuild build test -scheme MacMonitor -destination 'platform=macOS,arch=x86_64'` — **87 tests, 0 failures**. - `swiftlint lint` — **0 violations**. - Distribution artifact (`MacMonitor-intel-x86_64.zip`) is produced automatically when a `v*` tag is pushed. Closes #24.
gronod added 3 commits 2026-09-08 14:04:36 +01:00
Introduce Sources/Intelligence with an @Observable AlertEngine that evaluates
five configurable rules (CPU temperature, fan stall, low memory, low storage,
low battery) against a Sendable AlertEvaluationContext built after each
telemetry decode pass. Breached conditions dispatch through a mockable
AlertNotificationDispatching protocol to UNUserNotificationCenter with
per-alert cooldowns, edge-triggered resolve detection, and a capped
in-memory history log.

Add a macOS Settings scene (AlertsSettingsView) for thresholds, cooldown,
permission status, and test notifications; a new Alerts and Notifications
sidebar tab with active-alert cards and the history log; header and menu bar
warning indicators; and an AppNavigationBus so notification actions
(Open MacMonitor, View Processes) steer the main window.

Also fix the memory snapshot decode to read memoryPressureStatus so
pressureLevel is populated correctly.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add a release-package job (gated on v* tags, after build-and-test) that
builds the Release configuration for x86_64, ad-hoc signs the app bundle so
UNUserNotificationCenter works in the distributed build, archives
MacMonitor.app via ditto, uploads it as a workflow artifact, and creates a
Gitea release with the zip attached via the API token.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
gronod merged commit d7b87ca917 into develop 2026-09-08 14:04:49 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/MacMonitor#27