Add Jeannie last change review
This commit is contained in:
parent
1954a2e975
commit
fb57233ce8
|
|
@ -277,6 +277,7 @@ Run a read-only health snapshot from the Debian server with:
|
||||||
./jeannie recover-plan
|
./jeannie recover-plan
|
||||||
./jeannie recover-power --dry-run
|
./jeannie recover-power --dry-run
|
||||||
./jeannie impact --since HEAD~1
|
./jeannie impact --since HEAD~1
|
||||||
|
./jeannie review-last-change
|
||||||
./jeannie scorecard
|
./jeannie scorecard
|
||||||
./jeannie explain scorecard
|
./jeannie explain scorecard
|
||||||
./jeannie gitops-status
|
./jeannie gitops-status
|
||||||
|
|
@ -346,6 +347,9 @@ edge/public checks. Use `recover-power --dry-run` to preview the sequence.
|
||||||
`./jeannie impact --since HEAD~1` for the last commit or pass paths
|
`./jeannie impact --since HEAD~1` for the last commit or pass paths
|
||||||
like `bootstrap/edge` and `apps/website`.
|
like `bootstrap/edge` and `apps/website`.
|
||||||
|
|
||||||
|
`review-last-change` summarizes the last commit, runs impact analysis for the
|
||||||
|
touched files, and prints validation plus rollback hints.
|
||||||
|
|
||||||
`scorecard` rolls up backup readiness, GitOps health, DNS/RPi health, cluster
|
`scorecard` rolls up backup readiness, GitOps health, DNS/RPi health, cluster
|
||||||
health, edge health, capacity pressure, security posture, public certificates,
|
health, edge health, capacity pressure, security posture, public certificates,
|
||||||
inventory, and docs freshness into a compact pass/warn/fail report.
|
inventory, and docs freshness into a compact pass/warn/fail report.
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,7 @@ Run a read-only health snapshot from the Debian server with:
|
||||||
./{{ main_script }} recover-plan
|
./{{ main_script }} recover-plan
|
||||||
./{{ main_script }} recover-power --dry-run
|
./{{ main_script }} recover-power --dry-run
|
||||||
./{{ main_script }} impact --since HEAD~1
|
./{{ main_script }} impact --since HEAD~1
|
||||||
|
./{{ main_script }} review-last-change
|
||||||
./{{ main_script }} scorecard
|
./{{ main_script }} scorecard
|
||||||
./{{ main_script }} explain scorecard
|
./{{ main_script }} explain scorecard
|
||||||
./{{ main_script }} gitops-status
|
./{{ main_script }} gitops-status
|
||||||
|
|
@ -346,6 +347,9 @@ edge/public checks. Use `recover-power --dry-run` to preview the sequence.
|
||||||
`./{{ main_script }} impact --since HEAD~1` for the last commit or pass paths
|
`./{{ main_script }} impact --since HEAD~1` for the last commit or pass paths
|
||||||
like `bootstrap/edge` and `apps/website`.
|
like `bootstrap/edge` and `apps/website`.
|
||||||
|
|
||||||
|
`review-last-change` summarizes the last commit, runs impact analysis for the
|
||||||
|
touched files, and prints validation plus rollback hints.
|
||||||
|
|
||||||
`scorecard` rolls up backup readiness, GitOps health, DNS/RPi health, cluster
|
`scorecard` rolls up backup readiness, GitOps health, DNS/RPi health, cluster
|
||||||
health, edge health, capacity pressure, security posture, public certificates,
|
health, edge health, capacity pressure, security posture, public certificates,
|
||||||
inventory, and docs freshness into a compact pass/warn/fail report.
|
inventory, and docs freshness into a compact pass/warn/fail report.
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,10 @@ pointers.
|
||||||
: Explain which homelab areas are affected by changed files or explicit paths,
|
: Explain which homelab areas are affected by changed files or explicit paths,
|
||||||
including risk, touched services, validation commands, and apply path.
|
including risk, touched services, validation commands, and apply path.
|
||||||
|
|
||||||
|
`review-last-change [REF]`
|
||||||
|
: Summarize a commit, list touched files, run impact analysis, and print generic
|
||||||
|
validation plus rollback hints. Defaults to `HEAD`.
|
||||||
|
|
||||||
`backup-status`
|
`backup-status`
|
||||||
: Report freshness for Gitea backups, OpenTofu state backups, restore drill
|
: Report freshness for Gitea backups, OpenTofu state backups, restore drill
|
||||||
reports, and repo-managed Pi-hole restore inputs. The main `status` cascade
|
reports, and repo-managed Pi-hole restore inputs. The main `status` cascade
|
||||||
|
|
|
||||||
8
jeannie
8
jeannie
|
|
@ -5875,6 +5875,10 @@ impact() {
|
||||||
"${REPO_ROOT}/scripts/impact" "${@:2}"
|
"${REPO_ROOT}/scripts/impact" "${@:2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
review_last_change() {
|
||||||
|
"${REPO_ROOT}/scripts/review-last-change" "${@:2}"
|
||||||
|
}
|
||||||
|
|
||||||
security_scan() {
|
security_scan() {
|
||||||
require_debian_server "security-scan"
|
require_debian_server "security-scan"
|
||||||
"${REPO_ROOT}/scripts/security-scan" all
|
"${REPO_ROOT}/scripts/security-scan" all
|
||||||
|
|
@ -6142,6 +6146,7 @@ Operator View And Reports
|
||||||
recover-plan Print disaster recovery order and prerequisites.
|
recover-plan Print disaster recovery order and prerequisites.
|
||||||
recover-power [--dry-run] Run or preview post-outage recovery.
|
recover-power [--dry-run] Run or preview post-outage recovery.
|
||||||
impact [--since REF] [PATH...] Explain affected lab areas before changes.
|
impact [--since REF] [PATH...] Explain affected lab areas before changes.
|
||||||
|
review-last-change [REF] Summarize changed files, impact, validation.
|
||||||
map [--dot] Print the homelab dependency map.
|
map [--dot] Print the homelab dependency map.
|
||||||
change-journal {list|path} Show risky-command journal entries.
|
change-journal {list|path} Show risky-command journal entries.
|
||||||
release-snapshot Write a pre-change release snapshot.
|
release-snapshot Write a pre-change release snapshot.
|
||||||
|
|
@ -6415,6 +6420,9 @@ case "${1:-}" in
|
||||||
impact)
|
impact)
|
||||||
impact "$@"
|
impact "$@"
|
||||||
;;
|
;;
|
||||||
|
review-last-change)
|
||||||
|
review_last_change "$@"
|
||||||
|
;;
|
||||||
security-scan)
|
security-scan)
|
||||||
security_scan
|
security_scan
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
REF="${1:-HEAD}"
|
||||||
|
changed_files=()
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: ./jeannie review-last-change [REF]
|
||||||
|
|
||||||
|
Summarize a commit, show touched files, run impact analysis, and print useful
|
||||||
|
validation and rollback hints. Defaults to HEAD.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$REF" in
|
||||||
|
-h|--help|help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if ! git -C "$REPO_ROOT" rev-parse --verify "$REF" >/dev/null 2>&1; then
|
||||||
|
echo "Unknown git ref: $REF" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Jeannie Last Change Review"
|
||||||
|
echo "=========================="
|
||||||
|
echo
|
||||||
|
git -C "$REPO_ROOT" show --no-renames --stat --oneline "$REF"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Changed files"
|
||||||
|
mapfile -t changed_files < <(git -C "$REPO_ROOT" diff-tree --no-commit-id --name-only -r "$REF")
|
||||||
|
printf ' %s\n' "${changed_files[@]}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
"${REPO_ROOT}/scripts/impact" "${changed_files[@]}"
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Generic validation
|
||||||
|
./jeannie validate
|
||||||
|
./jeannie status
|
||||||
|
|
||||||
|
Rollback hint
|
||||||
|
git revert ${REF}
|
||||||
|
|
||||||
|
Notes
|
||||||
|
- Prefer the impact-specific validation commands above before running ./jeannie up.
|
||||||
|
- For public route changes, validate edge and certs before app rollout.
|
||||||
|
EOF
|
||||||
Loading…
Reference in New Issue