banger/internal
Thales Maciel 6e00fa690d Reject invalid VM CPU and memory values
VM create and vm set accepted zero or negative CPU and memory values, which either got stored directly or silently fell back to defaults and only surfaced as failures later. This tightens validation so bad settings are rejected at the user boundary and again in the daemon before any VM record is persisted.

Change vm.create CPU and memory request fields to optional pointers so omitted values still mean defaults, while explicit non-positive values can be distinguished and rejected. Update Cobra create/set parsing, keep the TUI aligned with the new API shape, and add regression tests for CLI parsing, daemon-side validation, and the create-defaults path.

Validation: go test ./... and make build. Left my-rootfs.ext4 untracked.
2026-03-16 16:28:17 -03:00
..
api Reject invalid VM CPU and memory values 2026-03-16 16:28:17 -03:00
cli Reject invalid VM CPU and memory values 2026-03-16 16:28:17 -03:00
config Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
daemon Reject invalid VM CPU and memory values 2026-03-16 16:28:17 -03:00
firecracker Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
model Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
paths Make runtime defaults portable 2026-03-16 15:30:08 -03:00
rpc Add regression coverage for VM failure paths 2026-03-16 15:46:54 -03:00
runtimebundle Make runtime defaults portable 2026-03-16 15:30:08 -03:00
store Add regression coverage for VM failure paths 2026-03-16 15:46:54 -03:00
system Add regression coverage for VM failure paths 2026-03-16 15:46:54 -03:00