From a0e1fa6b62257e90e415c6db4c4206afcffdffb6 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 17:19:15 -0400 Subject: feat(errors): actionable fatals, log-capture for direct mutations error_fatal gained an optional recovery-hint arg and now prints the last log lines, the full log path, and the resume pointer on every fatal; all 17 call sites carry specific hints. The silent sed/file-write mutations (locale.gen, pacman.conf, waybar battery, regdom, geoclue, paccache, udev, fstab, mkinitcpio, sudoers) now capture stderr to the log and warn on failure, and the run summary tells the reader how to find each error's output. No new shellcheck findings; 10 unit suites green. --- todo.org | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 1776486..d592ff8 100644 --- a/todo.org +++ b/todo.org @@ -829,19 +829,19 @@ Some entries are libraries likely pulled in as dependencies (blas-openblas, open - [ ] webkit2gtk - [ ] whisper.cpp -** TODO [#B] All error messages should be actionable with recovery steps +** DONE [#B] All error messages should be actionable with recovery steps +CLOSED: [2026-07-02 Thu] :PROPERTIES: :LAST_REVIEWED: 2026-06-24 :END: -Currently just reports errors without guidance on how to fix them +Shipped 2026-07-02 (speedrun). Structural fix at the helper: =error_fatal= now takes an optional third recovery-hint arg and every fatal prints the last five log lines inline, the full log path, the per-site "Fix:" when given, and the resume pointer (step markers mean a re-run continues where it stopped) — so even a hint-less fatal is actionable. All 17 fatal call sites got specific hints (keyring reinit, mirrorlist switch, userdel/USERNAME conflict, base-devel for makepkg, DESKTOP_ENV values, dotfiles-dir cleanup, tmpfs sizing, aur.archlinux.org reachability). The end-of-run Error Summary now closes with the grep-the-log line and the fix-and-re-run pointer. =error_warn= already carried what-failed + exit code into the summary; unchanged. -** TODO [#B] Improve logging consistency +** DONE [#B] Improve logging consistency +CLOSED: [2026-07-02 Thu] :PROPERTIES: :LAST_REVIEWED: 2026-06-24 :END: -Some operations log to ~$logfile~, others don't - standardize logging -All package installs should log, all system modifications should log, all errors should log with context -Makes debugging failed installations easier +Shipped 2026-07-02 (speedrun), paired with the actionable-errors task. Audit result: the install helpers (pacman_install/aur_install/retry_install/run_task/git_install/pipx) and error helpers already tee/append everything to $logfile — the gaps were direct mutations whose stderr went to the console and vanished. Swept every =sed -i= and file-write mutation lacking capture (locale.gen uncomment, pacman.conf ParallelDownloads/Color + multilib, waybar battery removal x3, wireless-regdom, geoclue BeaconDB, paccache, BRIO udev rule, fstab fmask, mkinitcpio HOOKS, sudoers append, ufw status read): each now sends stderr to $logfile, and the previously-silent ones (locale.gen, pacman.conf, multilib, waybar, regdom, geoclue, paccache, udev) gained =error_warn= handlers so failures land in the summary instead of passing silently. Verified: bash -n clean, 10 unit suites green, shellcheck warning-diff vs HEAD empty (no new findings). ** TODO [#B] Security hardening + audit :security: :PROPERTIES: -- cgit v1.2.3