Repository navigation
test(core): kill the mutants the 0.21.0 gate missed - #1449
Merged
Merged
Conversation
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`
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
FallbackSettings::with_env_overridesreturnsDefault(lib.rs:510)with_env_overrides_reads_the_process_environment. Serial; sets onlyUTEKE_EMBED_FALLBACK_ENDPOINT_PATHand removes it on drop.DisplayforForgetRequestError/ListRequestError/RememberRequestErrorwrites nothingdisplay_writes_the_exact_messagein each module, with the exact text.recall_rrf:limit * 3becomeslimit / 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_rrfbecomesscore * max_rrf(operations.rs:1209)recall_rrf:limit * 3becomeslimit + 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_rrftests usetest_support::open_keyword()(deterministic keyword embedder, no ONNX). They callrecall_rrfdirectly, so salience, recency and the boost window do not affect the exact values.Why
The gate ran
cargo mutants -p uteke-core --in-diffovergit 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
--refilter 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 -- --checkandcargo clippy --workspace --all-targets -- -D warnings: clean.