Skip to content

Allocation capacity scan can drop its enrollment check unnoticed #263

Backlog

Description

@ecv

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.

Related to #262

Activity

  1. ecv commented on Nov 30, 2026

    @ecv
    ContributorAuthor

    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.

  2. added
    tech-debt
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions