pub async fn drain_queue_expected<R, Fut>(
repo_root: &Path,
once: bool,
expected: Option<&str>,
run_mission: R,
) -> Result<DrainReport>Expand description
Drain with an optional atomic front-entry expectation. When expected is
set and a sibling dispatcher changed the front before the claim landed,
the claimed entry is released and returned in
DrainReport::expected_mismatch without running it. This is the
supervised-adapter guard for producers that must translate one specific
queued mission’s outcome back to an external system.