aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/maintenance-thresholds.toml6
-rw-r--r--todo.org4
2 files changed, 8 insertions, 2 deletions
diff --git a/configs/maintenance-thresholds.toml b/configs/maintenance-thresholds.toml
index f2b9a23..f729a01 100644
--- a/configs/maintenance-thresholds.toml
+++ b/configs/maintenance-thresholds.toml
@@ -18,11 +18,17 @@ df_warn_pct = 80
df_crit_pct = 90
btrfs_scrub_warn_days = 35
btrfs_scrub_crit_days = 60
+btrfs_unalloc_warn_gb = 10 # chunk headroom floor before ENOSPC weirdness
zfs_scrub_warn_days = 35
zfs_scrub_crit_days = 60
zfs_capacity_warn_pct = 80 # ZFS performance degrades past 80
zfs_capacity_crit_pct = 90
zfs_frag_info_pct = 50
+smart_wear_warn_pct = 80 # NVMe percentage_used (100 = rated life)
+smart_temp_warn_c = 70
+fstrim_stale_days = 10 # weekly timer + slack (continuous discard exempts)
+hog_roots = ["/home/cjennings", "/var"] # disk top-consumers scan roots (slow-local); depth-1 of /home is just the user dir, so scan inside it
+hog_top = 8 # digest rows kept
[snapshots]
# Sane snapper TIMELINE limits — the 2026-05-26 /home pile-up fix.
diff --git a/todo.org b/todo.org
index c379a3a..f2ac3c8 100644
--- a/todo.org
+++ b/todo.org
@@ -30,8 +30,8 @@ Build the maintenance console per [[file:docs/specs/2026-07-07-maintenance-conso
*** 2026-07-07 Tue @ 20:11:23 -0500 Built Phase 1 — package skeleton, thresholds, contract (dotfiles 43a39ac)
maint/ package + shim + tests/maint/ (48 tests, fake-tool harness); thresholds two-layer merge with disable flags + env overrides; capability probe (battery ⇔ type==Battery, verified against ratio's Mains+USB tree); =maint status --json= with disk-usage/pacman-cache/failed-units pilots. Seeded configs/maintenance-thresholds.toml in archsetup from the workflow's values and installed a copy to ~/.config/archsetup/ on ratio (installer wiring stays Phase 13). Full make test green (50 suites). Live on ratio: worst=warn from the real 10.75 GB cache; du grades on its printed total, not its exit code (root-owned partial-download dirs make it exit 1) — pinned in a test.
-*** TODO Phase 2 — collectors: storage & snapshots :solo:
-btrfs (unallocated, scrub age, device error counters vs SMART), ZFS (health/capacity/frag/autotrim/scrub), SMART + last self-test, fstrim.timer, disk top-consumers digest (slow-local tier), snapshot counts split timeline·single·pre-post. Both-host fixtures. Verify: unit green + read-only =maint status --json= on ratio.
+*** 2026-07-07 Tue @ 20:49:05 -0500 Built Phase 2 — storage & snapshot collectors (dotfiles 94e8371)
+All Phase 2 collectors TDD'd against the fake-tool harness (argv-matched cases added): btrfs unallocated/scrub-age/device-errors (SMART cross-check), per-disk SMART health + last self-test, fstrim posture (discard mount option = continuous trim, ratio's real setup), disk top-consumers on a new slow-local cache (=maint scan --slow=, ~/.local/state/maint), snapper counts split timeline·single·pre-post (split keys on cleanup, not type), full ZFS family. =priv.py= pulled forward from Phase 6 (read-only verbs =smart_json= + =btrfs_scrub_status=, validated args, MAINT_SUDO) so probes stay elevation-free. maint suites 48→118; make test green (51). Live read-only verified on BOTH hosts: ratio worst=warn (10.75 GB cache; scrub 0d, SMART ok), velox over tailscale shows the ZFS family live (ONLINE/autotrim-on/scrub 1d/231 snaps) with a genuine fstrim warn (timer off — Phase 6 Confirm remedy). TOML gained storage keys (btrfs_unalloc_warn_gb, smart_*, fstrim_stale_days, hog_*); installed copies refreshed on ratio + velox.
*** TODO Phase 3 — collectors: packages, security, systemd :solo:
Cache size, orphans (name+size), pacnew classification, keyring freshness, reboot-required, -Qkk (slow-local, parses output not exit code); network-tier cache readers (checkupdates, arch-audit CVEs, AUR, fwupd, topgrade freshness) with age; is-system-running + cause, failed-unit roster, maintenance-timers meta-metric, taint decode. Prereq: add arch-audit to archsetup deps + install. Verify: unit green + live read-only on ratio.