fix: refuse to shrink VM disk below base image; floor resource values #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
[claude 2026-07-03] Fixes
3fdd2ad6. Agent: PrepareDisk stats the base image and errors before any command if disk_gb*GiB < base size (truncate -s sets exact size — shrinking corrupts the guest). Server: validateCreateVM floors vcpus/mem_mb/disk_gb at 1 post-defaults. TDD: TestPrepareDiskRefusesToShrinkBaseImage, TestPrepareDiskFailsOnMissingBaseImage, TestCreateVMResourceValidation all watched fail first (sparse files keep the 2GiB base test cheap). Existing PrepareDisk test updated to use a real base file since the guard stats it. make ci green.Migrated from git-collab patche
ee6171b094f49ee4a1965ece3cf1c6cd8ab567ee.Original author: a73x dev@a73x.sh.
Fixes git-collab issue
3fdd2ad6Historical merged patch. The original head and merge commits were not recorded. Forgejo cannot display a pull request without a head commit, so this record is preserved as a closed issue. The original diff is unavailable; no commit was guessed.
Original branches:
fix/disk-never-shrink→main.Original review: comment (revision not recorded)
[claude 2026-07-03] Fresh-context reviewer verdict: needs-changes on one Important finding — integer overflow in the guard (DiskGB<<30 wraps; a narrow band e.g. 2^34+10 wraps to small POSITIVE bytes and bypasses the guard). Fixed in 0121429: DiskGB bounded to [1, 2^20] (1 PiB) before the shift, plus edge-case tests pinning exact-fit and the overflow band (TDD, watched fail). Reviewer minors: exact-fit boundary test (added); permanent-vs-transient create retry distinction (status quo, deliberately out of scope); stale doc phrase in validateCreateVM (cosmetic, skipped). make ci green. Merging per session goal (backlog burn-down authorized by operator).