DarkMaskAnalysis::GetMask always returns a full-size array - a pixel that saw no frame reads as
good - so the dark_mask_result.size() check in TakeDarkMaskInternal accepted a mask measured on
nothing. The mask was adopted through LoadDarkBadPixelMask, the state went to Idle and the
sequence logged "Calibration sequence done" on a calibration the operator had just cancelled.
The dark mask is a single step, so unlike a pedestal sequence there is no later cancel_sequence
check to catch it.
Refuse it after Stop() the way the check at the top of the same function does: Inactive with the
"Mask sequence cancelled" error, matching what the pedestal steps report.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bew392LTGP2fkhfRJsMcB