classify_run_outcome

Function classify_run_outcome 

Source
pub fn classify_run_outcome(
    success: bool,
    records_empty: bool,
    scheduler: Option<&str>,
    exit_code: Option<i32>,
) -> Result<(), String>
Expand description

Decide the cargo ktstr verifier run outcome from nextest’s exit success, whether any per-cell records were produced, and the optional --scheduler filter.

The dispatcher runs nextest with --no-tests=pass, so a run that selects zero verifier cells exits 0 (success) with empty records rather than nextest’s generic “no tests to run” (exit 4). That lets the dispatcher diagnose the empty case itself instead of surfacing a cryptic nextest exit:

  • --scheduler <NAME> set + no records: the name is not a declared scheduler, or no topology preset fits this host for it.
  • no --scheduler + no records: no declare_scheduler! is linked into a test binary the sweep sees, or every declared scheduler’s constraints rejected all topology presets on this host.

A genuine build/exec failure still fails nextest (exit non-zero, which --no-tests=pass does not mask), surfaced via the exit_code arm.