[Review] Audit the test suite for tests that cannot fail #441
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the v4.6.0 release-readiness gate.
Why this is its own issue
This project's most expensive recurring defect is not a bug — it is a green test that proves nothing. It has now happened at least six times:
json_schemashape copied from a vendor README that shipped and did nothing, green unit test throughout._ENCRYPTED_KEYSwas actually stored encrypted, so a plaintext credential sat at rest for months.Every one was found by accident, late, by someone reading the code for another reason. A suite that cannot fail is worse than no suite: it converts absence of coverage into a false claim of coverage.
What to look for
speaker_labelandtrack_owner_idare both stamped from the sameTrack, so asserting they match tests nothing.Method
Mutation is the only proof. For each test claiming to guard a behaviour, break that behaviour and confirm the test goes red. A test that stays green is either testing something else or nothing. This is slow and it is the entire point — every instance above would have been caught by one mutation.
Prioritise by blast radius: tests guarding data destruction, attribution, authentication and money-shaped invariants first.
Acceptance criteria
CLAUDE.mdor a testing guide, so the seventh instance is prevented rather than foundRelated
#433 — the synthetic-audio harness exists partly because the transcription path had no way to be tested for real. Its design already assumes this discipline: every guard it adds is reverted and confirmed to fail first.