Skip to content

loc-justify: apply cut-list - #53

Merged
CMGS merged 1 commit into
mainfrom
review/loc-cut-list
Jul 26, 2026
Merged

loc-justify: apply cut-list#53
CMGS merged 1 commit into
mainfrom
review/loc-cut-list

Conversation

@CMGS

@CMGS CMGS commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Applies the cut-list from the whole-repo LOC-justify audit (follow-up to #52). Behavior-preserving; each cut was adversarially verified against complete call-site enumeration:

  • ErrNetResizeUnsupported + detection marker + isNetResizeUnsupported: no production branch checks the sentinel (errors.Is only appeared in a test), and the NIC-drop path is already gated to cloud-hypervisor; cocoon's CLI output still surfaces in the wrapped error. The now-duplicate unsupported-flavor hibernate test folds into the generic-error test.
  • Runtime.Image becomes an error-only presence probe; the Image struct's single field was write-only (both callers discard the value).
  • evictPod's reason != "" branch: all five call sites pass non-empty literals.
  • dropVMLocked / clearRuntimeAnnotations delete-guards: delete() is a spec-guaranteed no-op on missing keys and nil maps.
  • indexOrphanByName nil check: the only call chain passes &vms[i].

Gates: golangci-lint 0 issues (linux+darwin), asl clean (linux+darwin), go test -race ./... green. Net −51 lines.

…field, no-op guards

- ErrNetResizeUnsupported + marker + isNetResizeUnsupported: no production
  branch checks the sentinel and the NIC-drop path is gated to CH already;
  cocoon's CLI output still surfaces in the wrapped error
- Runtime.Image is a presence probe: return error only, drop the
  write-only Image struct
- evictPod: every call site passes a non-empty reason literal
- dropVMLocked/clearRuntimeAnnotations: delete() is a spec-guaranteed
  no-op on missing keys and nil maps
- indexOrphanByName: sole call chain passes &vms[i], never nil
@CMGS
CMGS merged commit d402665 into main Jul 26, 2026
2 checks passed
@CMGS
CMGS deleted the review/loc-cut-list branch July 26, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant