Skip to content

v0.5.0

Choose a tag to compare

@InvictusNavarchus InvictusNavarchus released this 31 Aug 03:23
· 162 commits to master since this release
eac804b

v0.5.0

🎉 Highlights

This release introduces a stateful alert engine with hysteresis-based deadbands, replaces the lm-sensors dependency with a native sysfs hwmon parser (~7.2× faster, zero subprocess spawns), and adds dynamic battery discovery so the daemon works out-of-the-box on non-standard hardware (MacBook macsmc-battery, BAT1, auxiliary cells, etc.).


✨ Features

  • Stateful AlertManager with hysteresis & severity suppression (98ab6da)
    Replace pairwise edge-detection with a latch-based AlertManager class. Deadband thresholds eliminate notification storms for charge %, battery/CPU temperature, and battery health. Critical alerts now suppress lower-severity duplicates.

  • Auto-discover battery sysfs path (7706638)
    Scan /sys/class/power_supply at startup instead of hardcoding BAT0. Prioritises internal system batteries over peripherals (e.g. wireless mice). Supports BAT1, macsmc-battery, bat.0@aux:1, and other vendor naming schemes.

  • Native sysfs hwmon parser replaces lm-sensors (bb534de)
    Parse /sys/class/hwmon directly for AMD, Intel, ARM, and NVMe thermal/power sensors. Removes the sensors CLI dependency entirely. See empirical benchmark.


🐛 Bug Fixes

  • Alert tick interval corrected to 1 s (273aded)
  • High-charge alert no longer unlatches on Full status or brief AC toggles (fe30f6e) – re-arm now strictly requires discharge below the 75 % deadband.
  • UPower D-Bus object path matches daemon normalisation (29a75c6) – special characters (-, ., :, @) are sanitised to _, fixing resolution for non-standard battery names.
  • Guard against 0 / negative voltage_design_v (8d08454) – prevents permanent overvoltage false alarms on unsupported firmware. Overheat advice now differs between charging and discharging states.
  • GPU pairing preserved on multi-GPU / multi-AMDGPU systems (b379434, c107375) – temperature and power are always committed from the same device; deterministic hwmon enumeration order.
  • Accept 0 W GPU power (D3cold / runtime-PM sleep) and valid sub-zero temps down to −50 °C (5b810e0, 4d73568).

♻️ Refactoring & Cleanup

  • Extract formatUpowerDevicePath as a pure helper; keep upowerProp single-purpose (aea6d7e).
  • Remove legacy alert() wrapper and module-scoped defaultAlertManager singleton; standardise on AlertManager class (9027a31).
  • Remove redundant getLatestSample() DB query on daemon startup (3904130).
  • Integrate AlertManager into daemon lifecycle; decouple alert evaluation from historical SQLite rows; reset latches on battery removal (5df3bf4).
  • Extract named constants MIN_BAT_TEMP_TENTHS_C / MIN_HWMON_TEMP_MC with ACPI & hwmon unit-scaling docs (b83531e).

📝 Documentation

  • Document stateful hysteresis alert engine, deadband thresholds, and priority suppression in README (1c97a70).
  • Clarify overvoltage re-arm boundary ("at or below 10 % above design voltage") (3863c6a).
  • Update battery telemetry source labels to reflect dynamic discovery (555af7b).
  • Document UPower up_device_compute_object_path sanitisation algorithm (103029b).
  • Add empirical lm-sensors vs native hwmon evaluation with benchmark data (3c7b474).
  • Qualify hwmon driver-specific channel mappings and refine execution-latency claim (~5–8 ms/cycle) (0d10130, 4bd65b4).
  • Clarify discovery rationale and test-environment fallback in config (7830783).

🔧 Build & Install

  • Remove lm_sensors prerequisite check from install.sh (19243b3).
  • Remove unused release-assets block from .release-it.json (a68a3bf).

🧪 Tests

  • Comprehensive AlertManager suites: hysteresis bands, glitch debouncing, latch reset, priority suppression, and legacy-call persistence (98ab6da, 7526b04, fe30f6e).
  • UPower D-Bus path sanitisation for BAT0, macsmc-battery, bat.0@aux:1 (cd6c9ce, 29a75c6).
  • Multi-battery discovery and fallback handling (7706638).
  • Dual-AMDGPU and hybrid iGPU + dGPU pairing fixtures (c107375, b379434).
  • Replace spawnSync mocks with realistic sysfs directory-structure tests for AMD, Intel, ARM, NVMe, and edge-failure cases (381e8c1).