* feat(maintenance): German/English display language, chosen at installation
German source text is the catalog key and English comes from catalog_en.py, so a
missing entry falls back to German. The installer asks 'Language / Sprache' in a
terminal or takes --lang de|en and stores the choice in /etc/pman/language;
PMAN_LANG overrides it per run. Persisted source-check statuses stay language
neutral and are translated on display. Tests check catalog completeness,
placeholder parity, the installer flow (including the interactive prompt) and
English golden snapshots. Module version 1.0.5.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(maintenance): parenthesise the 'last checked' fallback in the source report
The stored check time was concatenated before the 'or' fallback, so an empty
state raised TypeError instead of showing 'not checked yet'. Regression test
covers both languages.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(installer): avoid A && B || C in the language handling (SC2015)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(installer): validate the language file directory before install, rollback and removal
A staged uninstall followed an etc/pman symlink and deleted a language file
outside --destdir. The directory chain is now checked with the other
destinations before any operation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(maintenance): re-pin Helper-Scripts to reviewed 2026-11-04 state
Upstream changed core.func and four tools; all eight launchers were blocked.
Reviewed the diffs (clear fallback, probe cache, non-fatal logging); no new
network access or code paths. Pins and blob SHAs updated.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* refactor(maintenance): add Helper-Scripts identity, groups, hazard levels and verified-launch API
Group and label the eight launchers, add SourceBlocked with file and revision
details, stored_status() for a network-free menu header, and prepare_launch /
run_launch so the verified bytes can be previewed and then executed unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* feat(maintenance): clearer Helper-Scripts menu with provenance, hazard tags and confirmation
Pure render layer (view.py) feeds curses and the golden snapshot tests.
Menu names the source, licence and website, groups tools by intent, shows
text hazard tags and the stored source check. Confirmation shows URL, command
and root-on-host notice; v previews the verified script. NO_COLOR, ASCII
glyphs and optional OSC 8 links; badge colours are fixed pairs >= 4.5:1.
Module version 1.0.4.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test(maintenance): derive the bumped version in the installer rollback test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(maintenance): judge the stored source check against the current manifest
A re-pin after the last daily check must not leave the old verdict standing:
compare the observed blob with the reviewed pin instead of the stored status text.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs: describe the Helper-Scripts menu, hazard levels, confirmation and display options
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(demo): record the new Helper-Scripts flow and close an anonymizer gap
The demo now shows the grouped menu, the confirmation screen and the source
preview for Kernel Clean, then cancels without starting anything.
The stream anonymizer now holds back a partial 'Node:' header line until it is
complete; a read ending between the colour codes leaked the real node name into
the recording. The privacy scan strips control sequences before matching (it
missed the leak before) and also checks the confirmation screen.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(ci): commit demo markers for verification and de-flake the cancel PTY test
verify_demo reads the confirmation time recorded by the driver, so the file
belongs with the other demo artifacts. The PTY cancel test sent its 'q' in the
same instant the UI flushes queued input and could lose it on a busy runner;
it now repeats the key like a user would.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(maintenance): qualify the Disk Health hazard level
Disk Health can install smartmontools/nvme-cli on request, so its level text no
longer promises that nothing changes: 'LESEN – Diagnose; installiert nur auf
Nachfrage Pakete'. Docs and golden snapshots follow.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* feat(maintenance): badges in the maintenance menu and a calmer Helper-Scripts overview
Changing actions get [ÄNDERT] and the Helper-Scripts entry gets a blue [FREMD]
badge (white on xterm-256 25, 6.45:1), aligned in a column; the overview lists
name, licence, URL and groups once instead of repeating them.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(demo): re-record with the badged maintenance menu
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
- maintenance: a disk whose smartctl output is not JSON no longer aborts
the whole report; the device is named as unreadable and the remaining
disks plus their state file keep working (regression test added).
- site: repository-relative file links (CHANGELOG.md and friends) point
at the GitHub blob, headings get GitHub-style anchors so the upstream
#-installation, #health-monitoring--alerts and
#relaying-through-an-external-smtp-provider links resolve again.
- pages workflow: rebuild on README/README.de.md changes because the
guide reads them at build time; pin all actions to commit SHAs.
- ci: new documentation-site job builds Astro, verifies the five routes,
key commands and anchors, and runs npm audit on pull requests.
- readme: keep HEALTH_MAIL_TO commented out in the alert quick start so
--test-notify proves ntfy instead of failing on a missing MTA.
Bump the script header version (drives --version), move the stop-action fix
from Unreleased to 2.13.2, add the missing 2.13.1 entry and compare links,
and update the README banner, "New in" line and changelog section.
Co-authored-by: Tim Baumann <tim@timintech.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The stop action called `qm stop` / `pct stop`, which kills the guest
immediately; the `--overrule-shutdown 1` retry after the Bash timeout only
aborts running shutdown tasks and forced nothing. Stop now runs
`qm|pct shutdown --timeout STOP_TIMEOUT --forceStop 1`, so Proxmox shuts the
guest down cleanly and hard-stops it only after the timeout.
The qm/pct mocks now log their argv and can fail on demand; new tests cover
stop (VM and CT), the timeout value, the failure path, a declined
confirmation and restart.
Claude-Session: https://claude.ai/code/session_01S8LmYGQA8hFstiLCCyzUYZ
Co-authored-by: Claude <noreply@anthropic.com>
Home servers usually cannot deliver mail directly. Adds a step-by-step
smarthost section: app-password authentication entered by the admin, the
postfix settings (SASL, TLS, envelope rewriting, IPv4), the root alias and a
verification with a real status=sent log line. Lists the failure modes seen in
practice: non-app password, deferred delivery without an IPv6 route, and the
provider rewriting the From header.
Co-authored-by: Tim Baumann <tim@timintech.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* docs(readme): add health and alert screenshots, regenerate v2.13.0 TUI shots
Real captures from pve (PVE 9.2.20): pman --health, --check WARN -> RESOLVED,
status health line, ntfy web app and the alert e-mail (sender redacted).
Demo pushes used a throwaway ntfy topic and an isolated state directory.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(readme): feature health monitoring and alerts prominently
- screenshot gallery with health view, check, ntfy and e-mail
- health/alerts first in the feature table, 'alerts in 3 steps' quick start
- architecture diagram shows --health/--check, pvesh and notifications
- reference section illustrated; postfix relay hint for e-mail
- README is markdownlint-clean; tables are exempt from MD013
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(changelog): make CHANGELOG markdownlint-clean
Formatting only, no wording changes: blank line after each section heading,
wrapped at 80 columns. MD024 gets siblings_only so the repeated Added/Changed/
Fixed headings of Keep a Changelog are allowed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Tim Baumann <tim@timintech.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
_term_cols is always called as $(_term_cols), where stdout is a pipe,
so tput was never consulted and the width was fixed at 80. Also check
stderr for a terminal. Found while verifying --health on a real PVE 9.2
node at 60 columns.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- http:// NTFY_URL together with NTFY_TOKEN_FILE is a config error
(--check exits 3, --test-notify exits 1).
- Token file: directory must be owned by root/current user and not
group/world-writable; the token is read through one opened descriptor
that is verified via /proc/self/fd (regular file, owner, mode 0600).
- Lock file opened for append (never truncated); the parent of
HEALTH_STATE_DIR must not be group/world-writable.
- qm/pct config fallback runs with timeout 10.
- curl: -q first, --proto =https when a token is used, no --retry.
- json_escape escapes remaining control characters as \u00XX.
- --test-notify removes its temp body file on exit and on INT/TERM.
- _truncate keeps UTF-8 characters intact.
- Tests for each item where practical.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Metric alerts resolve when a guest stops (CPU counter restarts); an
n/a metric on a running guest keeps its state without being reported.
- Unexpected-stop detection uses the most recent lifecycle task per
guest (no time window, OK or WARNINGS; suspend, reboot in progress and
stop-mode backups included); a stop task clears an existing latch.
onboot=1 guests stopped by a task are WARN instead of CRIT.
- Tasks are read with --source all so running tasks are visible.
- --force warning goes to stderr for --json/--health --json/--check.
- --check: INT/TERM and usage errors exit 3 from the very start.
- Total delivery failure saves the state but keeps the unsent changes
(and the task watermark) pending, so they fire once on the next run.
- Lock on fd 9, closed for pvesh/python3/qm/pct/curl/sendmail.
- onboot read from /etc/pve/{qemu-server,lxc}/ID.conf (current section)
with qm/pct fallback; node name from `uname -n` up to the first dot.
- Findings shorten the guest name, never the text; narrow terminals drop
UPTIME/DISK%/TYPE; ignored guests are not counted; an empty node is
not an error for --health.
- Regression tests for each item.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Version header 2.13.0 with changelog line; CHANGELOG [2.13.0] with
Added, Changed and Security.
- README: features and usage rows, new "Health monitoring & alerts"
section (checks, thresholds, exit codes, state, ntfy/mail setup, cron
example, limitations), full config key list with chmod 600 advice,
updated security note, requirements, test count and banner version.
- Bash/Zsh completions: --name, --health, --check, --dry-run,
--test-notify.
- CI runs tests/run.sh after shfmt.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- _notify_ntfy: curl with URL, Title/Priority/Tags and the optional
Bearer token passed only via the stdin config; body from a private
temp file; no redirects; only the host is logged. A token is never
sent over plain http (channel fails instead).
- _notify_mail: local sendmail (fallback /usr/sbin/sendmail) with
validated single-line headers, UTF-8 body and Auto-Submitted.
- _notify_all tries every configured channel and fails only when all
of them fail, so --check keeps its state and retries next run.
- --test-notify sends a real test message.
- A running or successful vzdump task explains a stopped guest
(backup stop mode).
- Tests: curl/sendmail mocks, delivery, dedup, recovery, partial and
total failure, token handling, header injection, vzdump.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- --check evaluates all local guests plus recent node tasks and alerts
only on changes: new/escalated, improved, RESOLVED with duration.
- CPU needs HEALTH_CPU_RUNS consecutive runs; mem/disk alert at once; a
metric that is n/a keeps its previous state; a running guest that
stops without a successful stop/shutdown/destroy/migrate task is WARN
(latched), onboot=1 and stopped is CRIT.
- Failed tasks since the last run are one-shot events (WARNINGS -> WARN,
otherwise CRIT); the first run is a baseline; watermark by endtime+UPID.
- Versioned TSV state (0600 in a 0700 dir), regex-validated on load,
never sourced, written atomically; flock against parallel runs; INT/TERM
and unexpected aborts exit 3.
- Nagios-style summary; exit 0/1/2/3. --dry-run prints the composed
message and writes neither state nor lock nor notifications.
- _notify_all is a stub until the ntfy/sendmail senders land; with a
channel configured it reports failure so state is kept for a retry.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Read local guests from `pvesh get /cluster/resources` (30 s timeout),
parse JSON on stdin with python3 into TSV; templates and guests on
other nodes are skipped, names sanitized.
- _health_checks is the single source for cpu/mem/disk/down levels;
stopped guests with onboot=1 are CRIT.
- --health (boxed), --health --list (plain) with findings and totals,
--health --json with null for n/a metrics; --filter/--name apply.
- Main menu key "h" opens the health overview; the status action adds a
"Health:" line and stays silent without pvesh/python3.
- Tests: pvesh mock with fixtures, onboot support in qm/pct mocks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- New allowlisted config keys: HEALTH_{CPU,MEM,DISK}_{WARN,CRIT},
HEALTH_CPU_RUNS, HEALTH_IGNORE_IDS, HEALTH_STATE_DIR, NTFY_URL,
NTFY_TOKEN_FILE, HEALTH_MAIL_TO, HEALTH_MAIL_FROM; inline NTFY_TOKEN
is ignored and rejected in notification modes.
- _validate_health_config runs only in health/check/test-notify modes.
- New flags --health, --check, --dry-run, --test-notify with mode
resolution and invalid-combination checks; fatal setup errors exit 3
in --check mode.
- Extract _fmt_duration and _owner_mode_ok helpers.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Action and snapshot menu rows are padded via _box_content and get a
right border; long guest names in titles are truncated.
- Regenerate README screenshots from v2.12.1 on a real PVE 9.2 host.
- Remove obsolete, unreferenced docs/screenshots/Screenshot.png.
- Bump version to 2.12.1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Pad header and table rows by visible width (ANSI codes stripped,
UTF-8 chars counted despite LC_ALL=C) so right borders line up.
- Close the table with legend/count inside the frame and a bottom border.
- Grow the NAME column with long guest names, capped at terminal width,
truncating beyond that; align header/data columns in --list too.
- Parse pveversion via "/" separator instead of showing "(running".
- Show compact uptime (e.g. "12d 1h 25m") and shorten the info line
when it would overflow the header box.
Fixes#33
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>