AprilNEA/OpenLogi · error

no sanitized channel candidate reproduced the captured…

Error message

no sanitized channel candidate reproduced the captured semantic observation and completed strict replay; no fixture was written

What it means

`require_single_passing_candidate` demands exactly one sanitized channel candidate that both reproduces the captured semantic observation and completes a strict replay. With zero such candidates the capture cannot be turned into a deterministic fixture, so nothing is written.

Solutions

  1. Re-run the record command ensuring the device stays in a stable state throughout capture and replay
  2. Verify the device actually supports the recorded feature and channel; try a different --channel value
  3. Use a wired/direct connection to eliminate radio-induced replay mismatches
  4. Check that the semantic observation (LEDs, wheel mode, backlight) matches what the device actually reports

Example fix

// before
openlogi fixture record-case --channel long-hidpp   # no candidate passes
// after: pick a supported channel and stable state
openlogi fixture record-case --channel short-hidpp   # device supports short HID++
Defensive patterns

Strategy: retry

Validate before calling

// verify the device supports the feature and is in a stable state before recording
let supported = probe_feature(device, feature_id)?;
if !supported { return Err("device does not support the recorded feature"); }

Try / catch

match err.to_string() {
    s if s.contains("no sanitized channel candidate") => {
        eprintln!("no channel replayed cleanly; stabilize device state or use another channel");
    }
    _ => propagate(err),
}

Prevention

When it happens

Trigger: Running `openlogi fixture record-case` when no channel candidate passes replay validation — every candidate failed semantic-observation matching or strict replay (device state differed, timing, unsupported channel).

Common situations: Device state changed between capture and replay attempts (DPI moved, profile switched); the target device doesn't support the recorded feature on any channel; a flaky wireless link causing replay mismatches.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13). Data as JSON: /api/errors/a897acdd605c4d3a. Report an issue: GitHub.

Appendix: source

Thrown at crates/openlogi-cli/src/cmd/fixture/record_case/replay.rs:58

    let Ok(route) = derive_replay_route(&target.route, &candidate.audit) else {
        return false;
    };
    let topology = replay_topology(target, &route, &candidate.cassette);
    let Ok(backend) = ReplayBackend::new(topology, vec![candidate.cassette.clone()]) else {
        return false;
    };
    let replayed = operation.observe(&backend, &route).await;
    replayed.ensure_replayable().is_ok()
        && replayed == *captured
        && backend.require_complete().is_ok()
}

fn require_single_passing_candidate(
    mut candidates: Vec<SanitizedCandidate>,
) -> Result<SanitizedCandidate> {
    match candidates.len() {
        1 => Ok(candidates.remove(0)),
        0 => bail!(
            "no sanitized channel candidate reproduced the captured semantic observation and \
             completed strict replay; no fixture was written"
        ),
        count => bail!(
            "{count} sanitized channel candidates reproduced the capture; target channel \
             resolution is ambiguous, so no fixture was written"
        ),
    }
}

fn replay_topology(
    target: &TargetCandidate,
    route: &DeviceRoute,
    cassette: &HidCassette,
) -> ReplayTopology {
    let receiver_slots = match route {
        DeviceRoute::Bolt { slot, .. } | DeviceRoute::Unifying { slot, .. } => {
            vec![ReceiverSlot {

View on GitHub (pinned to e846e6f4b4)