TweakTools

tweaktools / tweakos / 0x02

0x02 // health & recoveryearly · monitor-only

TweakWatcher

An Erlang/OTP health-monitoring and recovery coordinator for the Tweak ecosystem.

language
Erlang/OTP 27
build
rebar3
mode
monitor-only
tweakos
optional integration
I.

About

TweakWatcher keeps watch over the system: it probes health, records what changes, and will coordinate recovery when something fails. It's built on Erlang/OTP, whose supervision trees were made for exactly this job.

It's developed and versioned independently from TweakOS, with optional integrations for systemd, TweakPkg and snapshot/rollback tooling. The core never depends on TweakOS services.

Right now it's monitor-only: it makes no privileged changes to the host and does no automatic remediation. Recovery automation stays off by default until its policies and failure-injection tests pass.

II.

Where it stands

today
  • OTP supervision tree with health and incident workers
  • Periodic probes for VM uptime, process and atom capacity, and memory
  • Configurable thresholds for process/atom pressure and memory
  • Bounded health history and an in-memory incident ledger
  • CI with EUnit tests on Erlang/OTP 27
next
  • Host probes: systemd service state, disk pressure, TweakOS signals
  • Integration tests with injected crashes and probe failures
  • Durable incident history with rotation and integrity checks
  • Policy-controlled recovery with bounded retries, backoff, audit and loop prevention
  • Optional packaging through TweakPkg