chore: add --hosts test coverage and right-size VM 115 socket config #46
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
infra-audit
monitoring
operations
proxmox
script
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/claude-home#46
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/26-proxmox-monthly-maintenance-reboot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
monitoring/scripts/test-audit-collectors.sh: Add--hostsargument parsing tests (single and multi-host cases) — these tests were missing from the previous PR (#38) that merged the--hostsflag implementationserver-configs/proxmox/qemu/115.conf: Correctsockets: 2 → 1fordocker-sba(VM 115) — the VM has 8 cores on a single socket;sockets: 2was an incorrect initial configuration that doesn't match the physical topologyNotes
mainvia PRs #38 and #43socketschange is intentional:docker-sbais a single-socket VM;sockets: 2was set incorrectly at creation time and could affect NUMA scheduling on the guestAI Code Review
Files Reviewed
legacy/headless-claude/n8n-workflow-import.json(modified)monitoring/scripts/homelab-audit.sh(modified)monitoring/scripts/test-audit-collectors.sh(modified)scheduled-tasks/CONTEXT.md(modified)scheduled-tasks/agent-sdk-evaluation.md(added)server-configs/proxmox/qemu/115.conf(modified)⚠️ Critical: PR Description Does Not Match Diff
The PR title and body describe Proxmox maintenance reboot automation (ansible playbooks, systemd timers, KB runbook). None of those files appear in the diff — they were already merged to
mainin commits7a0c264and64f299a. The actual diff contains:homelab-audit.sh--hostsfilterThis PR appears to be a stale branch that accumulated additional commits after the proxmox automation was merged separately. The description is misleading and should be updated to reflect what's actually being merged.
Additionally:
"mergeable": false— the branch has merge conflicts and cannot be merged as-is. A rebase againstmainis required before merging.Findings
Correctness
n8n workflow —
REPLACE_WITH_CREDENTIAL_IDplaceholder (legacy/headless-claude/n8n-workflow-import.json): The new "Follow Up Diagnostics" SSH node contains:This is an unresolved placeholder. The workflow cannot function correctly until this is replaced with the actual n8n credential ID. If this JSON is imported as-is, the Follow Up Diagnostics node will fail with a credential lookup error.
n8n workflow — session_id availability: The follow-up node uses
--resume "{{ $json.session_id }}". This relies onsession_idbeing present in the output of the "Parse Claude Response" step. Verify that the initial health-check response is reliably parsed andsession_idis always populated before the follow-up node is triggered — ifsession_idis missing or empty,--resume ""will likely cause an unhelpful error rather than a graceful fallback.VM 115 config — undocumented change (
server-configs/proxmox/qemu/115.conf):sockets: 2→sockets: 1has no explanation in the PR body or commit messages. This is a meaningful CPU topology change fordocker-sba(8 cores, 8GB RAM). Was this intentional? An incorrect socket count can affect NUMA scheduling on the guest.Security
No new security issues introduced by this PR. (The Discord webhook URL in the n8n JSON is pre-existing and out of scope for this review.)
Style & Conventions
homelab-audit.sh/test-audit-collectors.sh: Clean implementation. The--hostsparsing logic usingIFS=',' read -rais correct and idiomatic. Tests cover single and multi-host cases. No issues.scheduled-tasks/CONTEXT.md: Documentation is clear and accurate.scheduled-tasks/agent-sdk-evaluation.md: Well-structured evaluation document. One note: the document refers toclaude-agent-sdk(Python) and@anthropic-ai/claude-agent-sdk(npm) as renamed packages. The current canonical package names in Anthropic's published SDKs should be verified before treating these as authoritative — package names may differ from what's documented here.Suggestions
socketschange.session_idnull-check or error handling path in the n8n "Parse Claude Response" step so the workflow degrades gracefully ifsession_idis absent.Verdict: REQUEST_CHANGES
Two blockers:
mainand must be rebased.REPLACE_WITH_CREDENTIAL_IDplaceholder — the Follow Up Diagnostics node will not function until this is resolved.The actual code changes are technically sound — the
--hostsfilter, tests, CONTEXT.md update, and SDK evaluation document are all good work. Once the PR description is corrected, conflicts are resolved, and the credential placeholder is either filled in or removed from the committed JSON, this is ready to merge.Automated review by Claude PR Reviewer
d47cd36440to48a804dda2feat: monthly Proxmox maintenance reboot automationto chore: add --hosts test coverage and right-size VM 115 socket configReview Feedback Addressed
Thanks for the thorough review. Here's what was done:
Blockers resolved
1. Rebase against main ✅
Branch has been rebased onto
main. During rebase, commit0dae524(session resumption + SDK evaluation) was automatically skipped as it was already merged via PR #43. The--hostsconflict inhomelab-audit.shwas resolved by keeping main's more complete implementation (HOSTS_FILTER+--jsonsupport from PR #38).2.
REPLACE_WITH_CREDENTIAL_IDplaceholder — No action neededAfter the rebase,
n8n-workflow-import.jsonis no longer modified by this PR — both the "Run Claude Diagnostics" and "Follow Up Diagnostics" nodes (with their credential placeholders) are already onmainvia PR #43. The placeholder pre-exists onmainand is outside this PR's scope.PR description updated ✅
Title and body now accurately describe what's actually being merged:
test-audit-collectors.sh—--hostsparsing tests missing from PR #38server-configs/proxmox/qemu/115.conf—sockets: 2 → 1correction fordocker-sbaVM 115
socketschange explained ✅Added explanation in PR body:
docker-sbais a single-socket VM;sockets: 2was set incorrectly at creation and could affect NUMA scheduling. The change is intentional.Tests
All 10 collector tests pass (including the new
--hostsparsing tests).AI Code Review
Files Reviewed
monitoring/scripts/homelab-audit.sh(modified)monitoring/scripts/test-audit-collectors.sh(modified)server-configs/proxmox/qemu/115.conf(modified)Findings
Correctness
--hostsparsing tests useIFS=',' read -ra entries <<< "$input"with%%:*/#*:parameter expansion — this correctly splits comma-separatedlabel:ippairs for both single and multi-host cases. Test placement (before the final((FAIL == 0))exit check) is correct.sockets: 2withcores: 8would present 16 vCPUs to the guest; correcting tosockets: 1properly represents 8 vCPUs on a single socket. The change is consistent with the stated physical topology andnuma: 0.Security
Style & Conventions
cpu_load,mem_pct, etc. tests above). Section header format (=== --hosts argument parsing tests ===) matches existing style.Suggestions
homelab-audit.shdirectly — this is intentional and consistent with the file's design. Edge cases (empty string, missing colon, whitespace) are not covered, but these are not blocking for a unit test of the parsing pattern.Verdict: APPROVED
Both changes are clean and correct. The test additions fill the coverage gap from #38, and the
socketscorrection accurately right-sizes the VM's vCPU topology. No blocking issues.Automated review by Claude PR Reviewer