You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allocation capacity scan can drop its enrollment check unnoticed #263
The allocator can be limited to an enrolled set of Devices (AllowsDevice). The check on the resume path (Get) has a test that fails when the check is removed. The check in the capacity scan (candidate()) has none: deleting it leaves every test in internal/allocation passing. A regression there could let a new allocation land on a Device that is not enrolled for the allocator.
Done when a test offers only a non-enrolled capacity and expects no allocation, and that test fails with the check removed.
Evidence at cf6d3e1: removing the if a.AllowsDevice != nil && !a.AllowsDevice(capacity.Spec.DeviceRef.Name) { continue } block in candidate() and running go test ./internal/allocation gives ok. Removing the same check in Get fails TestCandidateExcludesDevicesOutsideAllocatorEnrollment.
Activity
ecv commentedon Nov 30, 2026
Evidence at cf6d3e1: removing the
if a.AllowsDevice != nil && !a.AllowsDevice(capacity.Spec.DeviceRef.Name) { continue }block incandidate()and runninggo test ./internal/allocationgivesok. Removing the same check inGetfailsTestCandidateExcludesDevicesOutsideAllocatorEnrollment.