test(dispatch): kill three surviving mutants on main - #417
Merged
Conversation
The mutation matrix flagged three MISSED `delete !` mutants in code merged via #410: - scan_dlp_input:693 `!reports.is_empty()` (DLP triggered flag) - dispatch:346 `!stripped.is_empty()` (tool-validation warn gate) - try_rotate_and_retry:239 `!rotation_unavailable(...)` (key-rotation loop) Following the module's established pattern (dlp_input_scan_disabled, should_escalate_compliance, rotation_unavailable), extract each `!` into a small #[inline] helper and unit-test both directions, rather than excluding them in mutants.toml. The log-gate test uses tracing-test's #[traced_test] to assert the warn fires only on a non-empty strip list. Each test was verified to fail when its `!` is deleted, proving it kills the mutant.
Contributor
Mutation testing (PR diff sample)Informational — never blocks merge. Full matrix runs on main.
Legend: clean (no survivors), missed (inspect artifact), timed-out (25 min cap reached). Artifact: mutants-pr-results-e0025d8215089e14333c98499c312f774491e83b. |
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.
The push-to-main mutation matrix (shards 5a/5c) flagged three MISSED
delete !mutants in code merged via #410:scan_dlp_input:693!reports.is_empty()dispatch:346!stripped.is_empty()try_rotate_and_retry:239!rotation_unavailable(...)These shards are
continue-on-error: true(non-blocking), but they were showing red on main. Rather than excluding them inmutants.toml, this follows the module's established pattern — the same one already applied todlp_input_scan_disabled,should_escalate_compliance, androtation_unavailable: extract each!into a small#[inline]helper and unit-test both directions.dlp_reports_triggered,rotation_available(sibling ofrotation_unavailable): pure boolean helpers, table-tested.warn_stripped_tools: isolates the log side-effect; tested withtracing-test's#[traced_test]asserting the warning fires only on a non-empty strip list.Each test was verified locally to fail when its
!is deleted, proving it kills the mutant. No production behavior changes (pure refactor-extract + tests).