serving static method

bool? serving(
  1. PlayReleaseStatus? status
)

Whether a release in status is in front of any of the track's audience.

The definition of PlayReleaseEntry.serving, reachable. It was a private function in the encoder while its twin, ProcessingState.needsNewUpload, was a public static — an asymmetry with no argument behind it, and the consumer paid for it immediately: its test fixtures could call one rule and had to restate the other, which is a second copy of a rule this package owns, in a tree this package cannot see. That is the drift the derived field exists to prevent, reappearing one level up.

True for completed and inProgress. False for halted and draft. Null for statusUnspecified, for unknown, and for an absent status — three ways of not being told, and one answer.

Implementation

static bool? serving(PlayReleaseStatus? status) => switch (status) {
  completed || inProgress => true,
  halted || draft => false,
  statusUnspecified || unknown || null => null,
};