Skip to content

Mutation testing: push queue DLQ accounting and logging survivors #594

Description

@leynos

Context

From the first complete full mutation-testing run (ADR-007 shared workflow, run 29074771985, 2026-07-10, main @ 94a5d44). The dead-letter-queue drop accounting and rate-limited warning logic in PushHandle are effectively unasserted.

Surviving mutants

  • src/push/queues/handle.rs:199replace + with * in PushHandle::route_to_dlq
  • src/push/queues/handle.rs:235replace && with || in PushHandle::log_dlq_drop
  • src/push/queues/handle.rs:236replace > with < / == / >= in PushHandle::log_dlq_drop
  • src/push/queues/handle.rs:70replace PushHandleProbe::dlq_drop_count -> usize with 0 / 1
  • src/push/queues/handle.rs:83replace PushHandle::probe -> PushHandleProbe (four constructor variants)

Analysis

PushHandleProbe, probe(), and dlq_drop_count() are #[cfg(loom)], and every loom test asserts dlq_drop_count() == 0 only; no test produces a non-zero drop count or drives the interval-based logging path. All existing tests use dlq_log_every_n(1), whose is_multiple_of(1) short-circuits should_log to true, so the &&/|| and elapsed-interval comparisons never diverge. fetch_add returns the previous count, so the +* mutant logs dropped=0 and resets identically under the current tests.

Suggested tests

  1. A loom (or single-threaded) test with dlq_log_every_n(3), a large log interval, and exactly one drop, asserting probe.dlq_drop_count() == 1. This one test kills the route_to_dlq arithmetic mutant, the &&|| mutant, the >< mutant, the dlq_drop_count -> 0 mutant, and any viable probe constructor variant.
  2. An interval-driven test with dlq_log_every_n(0) and dlq_log_interval(Duration::from_millis(1)): sleep past the interval, drop one frame, and assert the warning is logged and the counter reset (kills >==).

Accepted

  • handle.rs:236 >>= requires elapsed to equal the interval to nanosecond precision; not reproducible. Accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumCould be disruptive, but might not happentesting

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions