feat: right-size VM 115 (docker-sba) 16→8 vCPUs #44
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#44
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "enhancement/18-rightsize-vm115-vcpus"
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
sockets: 2→sockets: 1(16 → 8 vCPUs)--hosts label:ip,...flag tohomelab-audit.shfor targeted post-change audits--hostsflag (single + multi host)Operational steps
Operational next steps (Proxmox snapshot, shutdown, apply, verify) are documented in issue #18 comment. These require a maintenance window and should be performed after merge.
Closes #18
Test plan
test-audit-collectors.sh— all 10 tests pass (8 existing + 2 new--hostsparsing tests)🤖 Generated with Claude Code
AI Code Review
Files Reviewed
server-configs/proxmox/qemu/115.conf(modified)monitoring/scripts/homelab-audit.sh(modified)monitoring/scripts/test-audit-collectors.sh(modified)legacy/headless-claude/n8n-workflow-import.json(modified)scheduled-tasks/CONTEXT.md(modified)scheduled-tasks/agent-sdk-evaluation.md(added)Findings
Correctness
🔴 Blocking — Merge conflict with PR #38 (
--hostsalready exists in main)This PR branch was forked from
a8c85a8dbefore commit1a3785f("feat: dynamic summary, --hosts filter, and --json output (#24)") was merged. That commit already added--hostssupport tohomelab-audit.shusing the variableHOSTS_FILTERwith a complete implementation. This PR introduces a different implementation usingMANUAL_HOSTS— hencemergeable: false.The conflict affects
monitoring/scripts/homelab-audit.shspecifically. The main branch already has:HOSTS_FILTER(notMANUAL_HOSTS)parse_and_report "$host" "$host"proxmoxappears in the filterAUDITED_HOSTSarray for per-host summary tableThe PR's implementation supports
label:ippairs (splitting on:), which is more expressive — the label and address are separate. After rebase, there's an opportunity to upgrade the existingHOSTS_FILTERlogic to support thelabel:ipformat from this PR, rather than replacing it.Action required: Rebase on current
mainand resolve the conflict inhomelab-audit.sh. Thelabel:ipparsing logic and the new tests are good — they should be preserved and integrated with the existingHOSTS_FILTERvariable andAUDITED_HOSTSpopulation.VM config math is correct ✅
115.conf:sockets: 2→sockets: 1, withcores: 8unchanged → 2×8=16 → 1×8=8 vCPUs.numa: 0is appropriate for a single-socket config.n8n Follow Up Diagnostics node — credential placeholder
legacy/headless-claude/n8n-workflow-import.json, the newssh-followupnode has:This is a placeholder that must be replaced with the actual credential ID before importing the workflow. This won't cause a review blocker on its own (the file is a workflow template), but it should be noted — importing as-is will fail.
Security
n8n-workflow-import.jsonis pre-existing.Style & Conventions
IFS=',' read -rafor CSV parsing is idiomatic.--hoststests are clear and follow the pass/fail helper pattern from the existing test suite.agent-sdk-evaluation.mdis well-structured with a solid rationale for staying on CLI (auth cost is the right blocker to call out).Suggestions
--max-turns 15on each follow-up run, this will increase cost on every non-healthy check. Consider routing the follow-up branch only when$json.severity == 'critical' || $json.severity == 'high'in the IF node condition.Verdict: REQUEST_CHANGES
One blocker: the PR is not mergeable due to a conflict with the
--hostsimplementation merged to main in PR #38. The VM config change, n8n session resumption additions, test cases, and documentation are all solid — they just need a rebase to land cleanly. Rebase onmain, integrate thelabel:ipparsing into the existingHOSTS_FILTERpath, and this is ready.Automated review by Claude PR Reviewer
d47cd36440toffb1eaef7fAddressed review feedback — rebased on
mainand resolved the--hostsconflict.Changes made
Rebase on
main(commit64f299a): The PR was forked froma8c85a8d, before PR #38 merged--hostssupport usingHOSTS_FILTER. Rebased cleanly; the only conflict was inhomelab-audit.sh.Integrated
label:ipparsing intoHOSTS_FILTER(monitoring/scripts/homelab-audit.sh):MANUAL_HOSTSvariableHOSTS_FILTERloop to supportlabel:ipformat using${entry%%:*}/${entry#*:}splittinglabelandaddrboth resolve to the entry stringAUDITED_HOSTS+=("$label")population, proxmox backup recency check,JSON_OUTPUT, and dynamic summary table frommain--hostserror message to include(label:ip,label:ip,...)hintAll other PR changes (VM 115 config, n8n session resumption, test cases,
agent-sdk-evaluation.md) landed cleanly via rebase with no modifications needed.The
label:ipparsing tests intest-audit-collectors.share preserved and continue to validate the split logic correctly.AI Code Review
Files Reviewed
server-configs/proxmox/qemu/115.conf(modified)monitoring/scripts/homelab-audit.sh(modified)monitoring/scripts/test-audit-collectors.sh(modified)Findings
Correctness
sockets: 2 → 1withcores: 8unchanged correctly reduces total vCPUs from 16 to 8. Change matches PR title and issue intent.--hostsmode checked[[ "$host" == "proxmox" ]]against the fulllabel:ipentry — this would silently skip backup-recency checks when proxmox was passed inlabel:ipform. The new code extractslabel="${entry%%:*}"first and then checks[[ "$label" == "proxmox" ]], which correctly handles both plainproxmoxandproxmox:10.10.0.1.entry#*:returns the full string when no colon is present, solabel == addr == hostname, matching the prior behavior.--hostsbranch now mirrors the existing inventory (else) branch, both callingparse_and_report "$label" "$addr"andcheck_cert_expiry "$label" "$addr".Security
HOSTS_FILTERwas already user-controlled and passed to SSH before this PR.Style & Conventions
# Accepts comma-separated entries; each entry may be plain hostname or label:ip) correctly documents the accepted format.--hostswith format hint is helpful.Suggestions
addrfalls back to the label, but the existing tests are sufficient.Verdict: APPROVED
Clean, well-scoped PR. The VM right-sizing is correct, the
--hostsenhancement is backwards-compatible, a latent proxmox-detection bug is fixed along the way, and new tests cover the parsing logic. Ready to merge; operational steps (snapshot/shutdown/apply) are correctly deferred to a maintenance window per issue #18.Automated review by Claude PR Reviewer
Checkout
From your project repository, check out a new branch and test the changes.