Record the rule five vacuous tests earned
Fork-local ways-of-working rule, per #155. Docs only — one section in CLAUDE.md, no code.
Why
A test that asserts a thing EXISTS passes when something else put it there.
Five tests in a single delivery cycle (#197–#203) asserted presence and passed while the behaviour they named was deleted. Four were caught by the Gatekeeper or the daily sweep rather than by me writing them, which is the part that makes it worth a rule rather than a note to self:
| Test | Why it passed anyway |
|---|---|
| "an untagged holding falls into the unclassified bucket" | the fixture account's cash balance produces an unclassified segment on its own — deleting the untagged branch left all eleven tests in the file passing |
| "a cash constituent lands in liquidity" | same cash balance; and once rewritten to assert the delta it still passed, because the defaults slice fills a fresh cash security with liquidity/cash and the bucket resolves correctly either way |
| "a blank sector is stored as nil" | asserted nil on a column already nil, after an unrelated validation had rejected the request |
| "a proposal that only answers the region" | asserted nil on columns the security never had |
| two importer tests | passed against an importer that returned early on return unless Security.provider, unset in test — the exact defect being fixed |
That last pair is the sharpest case: the tests were green against code doing nothing, which is what they existed to prevent.
The rule
Assert the change the code causes, measured against the state without it:
- Measure against the alternative —
before/afterbeatspresent?. - Ask what else could produce this — fixtures, defaults, callbacks, cash balances. If anything else can, presence proves nothing.
- Set the precondition rather than assuming it — force the state with
update_columnsor an explicit value if the code would otherwise create it. - A test that passes before the fix is not evidence — this is how fail-first gets skipped by accident, since presence assertions fail on a missing method and then pass for the wrong reason once it exists.
Placement
Beside the blast-radius corollaries, next to "prove the test before trusting it". They are the same family read from two ends: that one says break the fix and watch the test fail; this one says make sure the test could fail at all.
Scope
CLAUDE.md only, which is explicitly fork-local — the file's own header says to leave its workflow sections behind when preparing an upstream contribution. Nothing here goes to we-promise/sure.