Skip to content

json_native.py: 14 surviving mutants under the repository's own committed mutmut scope #250

Description

@cdeust

What

[tool.mutmut] in pyproject.toml names mcp_server/shared/json_native.py as
the committed, "wired + demonstrated" mutation scope. Running exactly that
committed scope today leaves 14 surviving mutants, all in
to_json_native:

43/43  killed 29  no-tests 0  survived 14
mcp_server.shared.json_native.x_to_json_native__mutmut_11: survived
mcp_server.shared.json_native.x_to_json_native__mutmut_17: survived
mcp_server.shared.json_native.x_to_json_native__mutmut_21: survived
mcp_server.shared.json_native.x_to_json_native__mutmut_22: survived
mcp_server.shared.json_native.x_to_json_native__mutmut_23: survived
mcp_server.shared.json_native.x_to_json_native__mutmut_34..42: survived

Reproduce

uv run mutmut run          # committed [tool.mutmut] scope, no arguments
uv run mutmut results | grep -i survived

Measured 2026-07-29 on test-check-doc-claims-mutation-235
(mutmut 3.6.0, CPython 3.13.11, macOS). The branch's own diff does not touch
mcp_server/shared/; this was surfaced by an accidental unscoped invocation
while working #235 and is filed under §14.3 rather than fixed there, because
it is unreachable from that change by any test, build or lint step it
triggers.

Why it matters

to_json_native is the module that exists BECAUSE a numpy.float32/datetime
leak broke structuredContent on PostgreSQL while the SQLite-backed tests
stayed green (2026-06-23, quoted in [tool.mutmut]'s own comment). It is also
the module the standards file cites as the demonstrated mutation-testing
example. A third of its mutants surviving means its test suite does not pin
the conversions it was written to guarantee.

Acceptance criteria

  • 0 surviving non-equivalent mutants under the committed [tool.mutmut]
    scope (uv run mutmut run with no arguments).
  • Each survivor is triaged: killed by a named test, or documented as
    equivalent with a written rationale at the use site (§12.1).
  • The kills assert the backend-agnostic contract (§12.3) — the numpy and
    datetime shapes PostgreSQL returns, not only the float/str SQLite
    gives — since that asymmetry is the incident this module exists for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions