Skip to content

Courier can drop its Device-incarnation checks unnoticed #264

Backlog

Description

@ecv

For an enrolled Device pinned by UID, Courier.Deliver refuses delivery when the Device UID, or the custody state's Device-UID label, does not match the pinned UID. No test covers that refusal. Courier.Collect has the same gap for a Device whose UID changed after delivery. A regression in either could deliver to, or accept results from, a recreated Device.

Done when tests cover each case below, and each fails with its check removed:

  • custody labelled with another UID
  • a recreated Device
  • a result collected after the UID changed

Related to #262

Activity

  1. ecv commented on Nov 30, 2026

    @ecv
    ContributorAuthor

    Evidence at cf6d3e1: replacing the device.UID != uid || state.Labels[ops.LabelDeviceUID] != string(uid) condition in Courier.Deliver with a no-op and running go test ./internal/delivery ./cmd/fleet-manager gives ok for both. Sites.Serving checks the Device UID too, which hides the first half; nothing exercises the label half. Collect has no UID-change test.

  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