Skip to content

test(core): kill the mutants the 0.21.0 gate missed - #1449

Merged
ajianaz merged 2 commits into
developfrom
test/kill-mutants-0.21.0
Oct 13, 2026
Merged

ajianaz merged 2 commits into
developfrom
test/kill-mutants-0.21.0

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

What

Test-only. Adds killing tests for the 7 mutants that the pre-release mutation gate missed, so the gate passes before the 0.21.0 release (AGENTS.md "Release procedure" step 1).

Mutant Test
FallbackSettings::with_env_overrides returns Default (lib.rs:510) with_env_overrides_reads_the_process_environment. Serial; sets only UTEKE_EMBED_FALLBACK_ENDPOINT_PATH and removes it on drop.
Display for ForgetRequestError / ListRequestError / RememberRequestError writes nothing display_writes_the_exact_message in each module, with the exact text.
recall_rrf: limit * 3 becomes limit / 3 (operations.rs:1114) rank_zero_in_both_channels_scores_exactly_one. With limit 1 the mutant empties the vector window, so the score drops from 1.0 to 0.5.
recall_rrf: score / max_rrf becomes score * max_rrf (operations.rs:1209) Same test. Exact normalized score 1.0.
recall_rrf: limit * 3 becomes limit + 3 (operations.rs:1114) vector_window_is_three_times_the_limit. With limit 2, the only FTS hit sits at vector rank 5: inside a window of 6, outside a window of 5. The test asserts its exact score and that it ranks first.

The recall_rrf tests use test_support::open_keyword() (deterministic keyword embedder, no ONNX). They call recall_rrf directly, so salience, recency and the boost window do not affect the exact values.

Why

The gate ran cargo mutants -p uteke-core --in-diff over git diff v0.20.1..develop -- crates/uteke-core. Result: 159 mutants, 124 caught, 28 unviable, 0 timeouts, 7 missed. Every miss was in changed code and reachable without the ONNX runtime, so each gets a killing test with exact-value assertions.

Testing

  • Re-run of exactly these 7 mutants (--re filter over the same files): 7 mutants tested in 4m: 7 caught.
  • cargo test -p uteke-core: 735 passed, 33 ignored (ONNX-only).
  • cargo fmt --all -- --check and cargo clippy --workspace --all-targets -- -D warnings: clean.
  • Fixture stability: the rank fixture was stable across 5 repeated runs.

Exact-value tests for the mutants the pre-release gate
(v0.20.1..develop, uteke-core) left alive:

- lib.rs: FallbackSettings::with_env_overrides -> Default::default()
- forget_request.rs: Display for ForgetRequestError -> Ok(Default::default())
- list_request.rs: Display for ListRequestError -> Ok(Default::default())
- remember_request.rs: Display for RememberRequestError -> Ok(Default::default())
- operations.rs recall_rrf: vector window `limit * 3` -> `limit + 3`
- operations.rs recall_rrf: vector window `limit * 3` -> `limit / 3`
- operations.rs recall_rrf: `score / max_rrf` -> `score * max_rrf`
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit de1c78a into develop Oct 13, 2026
15 checks passed
@ajianaz
ajianaz deleted the test/kill-mutants-0.21.0 branch October 13, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant