Skip to content

A mutation check shipped able to pass whatever the mutation did (#696's own failure mode) #709

Description

@realmarcin

Filed as the record, per the review-every-finding rule. Already fixed in PR #702, commit fefa833.

tests/test_ncbitaxon_adapter_is_shared.py::test_the_check_can_actually_fail copied test_prokaryotic_lineage.py into tmp_path, removed one requires_ncbi_adapter argument, ran it with NCBITaxon unreachable, and asserted a non-zero exit.

It got one. Not from the mutation, though: pytest loads a conftest from the test file's own directory, tmp_path had none, so every test requesting requires_ncbi_adapter errored with "fixture not found". Verified by running an unmutated copy through the identical harness — 31 passed, 6 errors. The assertion held whatever the mutation did.

This is exactly the false green CLAUDE.md's "Proving a gate can fail" section is about, committed one commit after that section was written, in the file whose subject is the same discipline. Worth keeping visible for that reason.

What it says about the protocol. The four existing rules are all about the mutated run — that the mutation applied, that the restore took, that the filesystem can see it. None of them catches this, because here the mutation applied fine and the red was real; what was wrong is that the red had another sufficient cause. The missing rule is a control arm: an unmutated run through the identical harness must be GREEN before a red is attributed to the mutation.

The fix adds that arm, plus a conftest copy so the fixture resolves. Both mutation-checked: replacing the mutation with a no-op reds it; deleting the conftest copy makes it skip while naming a fixture error as the likely cause, rather than pass.

  • Consider adding the control-arm rule as point 5 of "Proving a gate can fail" in CLAUDE.md

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions