Skip to content

v0.4.0

Choose a tag to compare

@InvictusNavarchus InvictusNavarchus released this 28 Aug 02:43
· 195 commits to master since this release
5f92a24

v0.4.0

Telemetry: Native Linux Collectors Replace Glances

The external Glances HTTP dependency has been fully removed. All system metrics are now collected through direct Linux kernel interfaces with zero subprocess spawning:

  • CPU % — delta-based tick math via /proc/stat
  • Memory % — MemAvailable / MemTotal via /proc/meminfo
  • CPU Frequency — all-core scaling frequency averaging via sysfs cpufreq
  • GPU % — dynamic DRM sysfs device scan (gpu_busy_percent)
  • Top Processes — per-PID interval delta tracking via /proc/[pid]/stat (utime + stime), grouped by executable name with RSS memory

The process scanner now tracks tick-over-tick deltas instead of relying on ps %cpu, which reports a lifetime average. This correctly captures instantaneous CPU spikes for long-running processes during flight-recorder forensics. Telemetry latency drops from ~48 ms to ~13 ms per sample.

Deployment note: Glances is no longer required. Remove any Glances service or installation steps from your setup.

See docs/empirical-glances-vs-native-comparison.md for benchmark methodology and results.

Bug Fixes

  • Alert notification spam — non-charge alerts (battery temperature, health wear, charging over-voltage, CPU heat-soak) now evaluate previous state and only fire on threshold crossing, preventing repeated notifications every 60 s tick while conditions remain unchanged.
  • Database handle leak — setDbConnectionsForTesting now closes existing active connections before reassignment, preventing SQLite handle and lock leaks.

Internal / Developer Experience

  • Added unit test coverage for config, cycle estimation, migrations, alerts, DB operations, notify, and telemetry parsers.
  • Added scenario tests for daemon tick cadence and oneshot execution.
  • Introduced testability seams (injectable notifier, isolated DB handles, exported parser helpers, import.meta.main guard).
  • Refactored telemetry parsers with named destructuring, structured Map-based parsing, and named regex capture groups.
  • Removed unnecessary module exports.
  • Added knip (dead-code detection), lefthook (pre-commit formatting), and release-it (release workflow automation).
  • Updated README with testing/development instructions and revised dependency requirements.

Full diff: v0.3.0...v0.4.0