Update Jeannie status help
Homelab Main / validate (push) Successful in 1m16s Details
Homelab Main / running-update (push) Successful in 3s Details
Homelab Main / debian-ops (push) Successful in 2m35s Details

This commit is contained in:
juvenal.diaz 2026-11-11 09:24:40 -06:00
parent 70d5843a5f
commit 3f51d17250
2 changed files with 59 additions and 0 deletions

View File

@ -2288,6 +2288,45 @@ else
fi" || printf 'unable to reach %s@%s\n' "${rpi_user}" "${rpi_host}"
}
status_usage() {
cat <<'EOF'
Usage: ./jeannie status [all|oci|rpi|opi5|debian|cluster] [options]
Without arguments, show a fast overview of all areas. A scope limits the
overview to that area; cluster uses the selected cluster profile.
all All areas, including Compose and Argo CD applications
oci OCI edge connectivity and Compose services
rpi Raspberry Pi services and Compose containers
opi5 Orange Pi host, Compose containers, and selected K3s runtime
debian Debian services and Compose containers
cluster Selected Kubernetes cluster and Argo CD applications
Scoped overview options:
--details Include detail fields.
--json Output structured JSON.
--all Include all results (the scoped overview default).
--no-local-rca Disable AI explanations (already disabled for scopes).
Unscoped diagnostic options retain the existing status report:
--fast Run the existing fast diagnostic checks.
--deep Run the deeper diagnostic checks.
--json Output the existing machine-readable diagnostic report.
--details Include detail fields.
--all Include passing and skipped checks.
--ai Request an unverified AI explanation.
--no-local-rca Disable AI explanations.
--verbose Show the older full diagnostic output.
--heal-plan Show the proposed healing plan using deep checks.
--heal Run the existing healing workflow using deep checks.
Examples:
./jeannie status oci --details
./jeannie remote status cluster --json
./jeannie status --deep --no-local-rca
EOF
}
status_report() {
local cascade_status=0
local heal_mode=""
@ -2296,6 +2335,13 @@ status_report() {
local status_json
local -a status_args=()
case "${1:-}" in
-h|--help) status_usage; return 0 ;;
all|oci|rpi|opi5|debian|cluster)
case "${2:-}" in -h|--help) status_usage; return 0 ;; esac
;;
esac
require_debian_server "status"
if (($# == 0)); then

View File

@ -45,6 +45,19 @@ status_focus_collect "$2"
class FocusedStatusTests(unittest.TestCase):
def test_help_describes_scopes_and_exits_successfully(self):
commands = ROOT / "lib" / "jeannie" / "commands.sh"
for args in (("--help",), ("-h",), ("oci", "--help")):
with self.subTest(args=args):
result = subprocess.run(
["bash", "-c", 'source "$1"; shift; status_report "$@"',
"test", str(commands), *args],
capture_output=True, text=True, check=True,
)
self.assertIn("all|oci|rpi|opi5|debian|cluster", result.stdout)
self.assertIn("--deep", result.stdout)
self.assertIn("--heal-plan", result.stdout)
def test_scopes_do_not_collect_other_hosts(self):
for scope, groups in (("debian", {"Debian", "Debian Compose"}),
("rpi", {"RPi4", "RPi4 Compose"}),