Skip to content

test(dispatch): kill three surviving mutants on main - #417

Merged
Destynova2 merged 1 commit into
mainfrom
test/kill-dispatch-mutants
Jun 13, 2026
Merged

test(dispatch): kill three surviving mutants on main#417
Destynova2 merged 1 commit into
mainfrom
test/kill-dispatch-mutants

Conversation

@Destynova2

Copy link
Copy Markdown
Contributor

The push-to-main mutation matrix (shards 5a/5c) flagged three MISSED delete ! mutants in code merged via #410:

Site Negation Meaning
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 guard

These shards are continue-on-error: true (non-blocking), but they were showing red on main. Rather than excluding them in mutants.toml, this follows the module's established pattern — the same one already applied to dlp_input_scan_disabled, should_escalate_compliance, and rotation_unavailable: extract each ! into a small #[inline] helper and unit-test both directions.

  • dlp_reports_triggered, rotation_available (sibling of rotation_unavailable): pure boolean helpers, table-tested.
  • warn_stripped_tools: isolates the log side-effect; tested with tracing-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).

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.
@Destynova2
Destynova2 enabled auto-merge June 13, 2026 08:12
@Destynova2
Destynova2 merged commit d16143a into main Jun 13, 2026
43 checks passed
@Destynova2
Destynova2 deleted the test/kill-dispatch-mutants branch June 13, 2026 08:19
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing (PR diff sample)

Informational — never blocks merge. Full matrix runs on main.

Metric Value
Status timed-out
Duration 1501 s
Total 59
Caught 0
Missed 0
Timeout 0
Unviable 0

Legend: clean (no survivors), missed (inspect artifact), timed-out (25 min cap reached).

Artifact: mutants-pr-results-e0025d8215089e14333c98499c312f774491e83b.

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