← the record

Audit fe7944e54e77

warpdotdev/warp, scoped to crates/fuzzy_match, at 714c51f1e2: the project's own tests caught 32 of 37 planted faults, 5 got through, and corral proved 3 of those missing tests by writing a test and running it.

repo
https://github.com/warpdotdev/warp
scope
crates/fuzzy_match (--path: only files under it were considered)
commit
714c51f1e29f0863b8b7a3e0f460a8acc89b1e0e
corral
v1.0.0-rc.21
substrate
workspace
seats
mutant-generator: gemini-3.8-flash
test-writer: gemini-3.8-flash
tokens
76.0k in, 7.9k out, 13 calls
started
2026-10-14 21:40 UTC
not audited
1 is-test · 1 no-language

crates/fuzzy_match/src/lib.rs

0.86kill rate, 95% interval 0.72–0.94 (n=37, duplicates counted)
32 of 37caught by the project's tests
5got through
3proven missing tests
language
rust
status
certified
tests land in
crates/fuzzy_match/src/fuzzy_tests.rs
the tests corral wrote — append to crates/fuzzy_match/src/fuzzy_tests.rs
#[cfg(test)]
mod corral_tests_2 {
use super::super::*;

#[test]
fn test_wildcard_star_single_char_match_and_bounds() {
    let text = "prefix_a12b";
    let pattern = "a?*b";

    let result = match_wildcard_pattern(text, pattern);
    assert!(result.is_some());
    let match_result = result.unwrap();

    let char_count = text.chars().count();
    assert!(!match_result.matched_indices.is_empty());
    for &idx in &match_result.matched_indices {
        assert!(
            idx < char_count,
            "matched index {} is outside character bounds (count: {})",
            idx,
            char_count
        );
    }
    assert_eq!(match_result.matched_indices, vec![7, 8, 9, 10]);
}

#[test]
fn test_wildcard_star_single_char_in_path_within_bounds() {
    let text = "path/file_12a.rs";
    let pattern = "file_?*a.rs";

    let result = match_wildcard_pattern(text, pattern);
    assert!(result.is_some());
    let match_result = result.unwrap();

    let char_count = text.chars().count();
    assert!(!match_result.matched_indices.is_empty());
    for &idx in &match_result.matched_indices {
        assert!(
            idx < char_count,
            "matched index {} is outside character bounds (count: {})",
            idx,
            char_count
        );
    }
}

#[test]
fn test_glob_match_chars_star_matches_one_character() {
    let text_chars: Vec<char> = "a12b".chars().collect();
    let pattern_chars: Vec<char> = "a?*b".chars().collect();

    assert!(is_glob_match_chars(&text_chars, &pattern_chars));
}

#[test]
fn test_glob_match_star_no_match() {
    assert!(!is_glob_match("abc", "*d*"));
    assert!(!is_glob_match("test", "*x*y*"));
    assert!(!is_glob_match("button.rs", "*/ui/*.rs"));
}

#[test]
fn test_wildcard_pattern_multiple_stars_no_match() {
    assert!(match_wildcard_pattern("abc", "*d*").is_none());
    assert!(match_wildcard_pattern("button.rs", "*component*button*").is_none());
    assert!(match_wildcard_pattern("hello/world", "src/*foo*").is_none());
}

#[test]
fn test_wildcard_case_insensitive_indices_strictly_within_bounds() {
    let text = "\u{0130}"; // 'İ' expands from 1 char to 2 chars in lowercase ("i\u{0307}")
    let pattern = "??";
    let result = match_wildcard_pattern_case_insensitive(text, pattern).expect("pattern should match");

    assert_eq!(result.matched_indices, vec![0]);
    for &idx in &result.matched_indices {
        assert!(
            idx < text.chars().count(),
            "Matched index {} is not strictly within bounds for text length {}",
            idx,
            text.chars().count()
        );
    }
}
}

The faults that got through

A proven fault was caught by a test corral wrote and ran; an unproven one was not, so it may be a missing test or a fault no test can see.

s2/m3 · line 555 proven

- if is_glob_match_chars_recursive(text, pattern, i + 1, pattern_idx + 1) {
+ if is_glob_match_chars_recursive(text, pattern, i + 2, pattern_idx + 1) {

s3/m5 · line 601 proven

- false
+ true

s5/m1 · line 663 proven

- .retain(|&idx| idx < text.chars().count());
+ .retain(|&idx| idx <= text.chars().count());

s0/m7 · line 475 unproven

- (start_char_idx..start_char_idx + prefix_char_count).collect();
+ (start_char_idx..start_char_idx + prefix_char_count + text.chars().count()).collect();

s0/m2 · line 477 unproven

- (start_char_idx..start_char_idx + prefix_char_count).collect();
+ (start_char_idx..=text.chars().count()).collect();