Skip to content

[SPIKE] Investigate adding mutation testing to catch undertested code paths the coverage percentage alone doesn't reveal #797

Open

Description

@meshackyaro

Description

Line/branch coverage percentage can look healthy while still missing meaningful assertions (tests that execute code without actually checking its behavior); mutation testing would surface this gap, but it's unclear how expensive it'd be to run given the SDK's RPC-dependent code paths.

Component

testing

Research Questions

  • Would a mutation-testing tool (e.g. Stryker) work well against this codebase's heavy use of async/RPC-mocked code, or would it produce mostly noise?
  • What would a reasonable CI time budget for mutation testing look like, given it's typically far slower than normal test runs?
  • Should this run on every PR, nightly, or only on-demand given the likely runtime cost?

Context

Several of the bugs filed in this very batch (e.g. silent cache-invalidation misses, swallowed errors) are exactly the kind of thing that passes existing tests while being genuinely broken — mutation testing is designed to catch that class of gap.

Proposed Approach

Run a mutation-testing tool against a representative subset of the codebase (e.g. the escrow module) and evaluate signal quality and runtime cost.

Deliverables

A short report on mutation score for the sampled module, signal-to-noise assessment, and a recommendation on whether/how to adopt it.

Difficulty

🟡 Medium

Estimated Time

1-2 days

Related Issues

Motivated by the pattern seen across several bugs filed in this batch: passing tests that didn't actually catch a real defect.

Activity

  1. added
    priority: low
    difficulty: spike
    on Oct 29, 2026
  2. xtep103 commented on Oct 30, 2026

    @xtep103

    Hey Maintainer, I have gone through the details of the issue and i am capable of resolving it, I would love to be assigned to work on it ASAP. Thanks in advance

  3. maxx-GENIUS commented on Nov 2, 2026

    @maxx-GENIUS
    Contributor

    Hi team,

    I reviewed the issue for Investigate adding mutation testing to catch undertested code paths the coverage percentage alone doesn't reveal. We need to resolve 'investigate adding mutation testing to catch undertested code paths the coverage percentage alone doesn't reveal' cleanly across the target modules.

    Proposed Implementation:

    1. Trace the current code execution path to isolate the behavior boundary.
    2. Implement a focused, modular fix for 'Investigate adding mutation testing to catch undertested code paths the coverage percentage alone doesn't reveal' adhering strictly to repository architecture.
    3. Ensure defensive guards and backward compatibility are maintained.

    Testing & Verification:
    I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.

    Would be glad to take this on if you can assign it over. Ready to submit a verified patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: spikepriority: lowsdktesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions