Tests that check a partial view pass while the real defect remains
PitfallVerified 4 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
A test is green, yet a missing flag, an unguarded denial branch, an over-budget output or a doubled period ships.
Cause#
The test checks less than the real thing:
- A docs coverage test that extracts only command names passes when required flags or occurrence counts are missing.
- A denial-guidance test over copied strings misses denial branches that are constructed elsewhere, including ones on unchanged enforcement paths.
- A budget check run before mandatory rules, headers, notes or compact fallback text are appended passes while the final output is too long.
- Parity tests with unpunctuated fixture input miss duplicate-period bugs.
Fix#
- Validate flags and multiplicity separately from names.
- Enumerate every constructed denial result.
- Measure the complete rendered output, fallback included.
- Include already-punctuated input in prompt fixtures.
Evidence#
Observed notes, 2026-10-03, rvow audit session (candidates 1 to 4 of the item).
Also found by searching
- test passes but required flag or rule is missing from output
- documentation coverage test only checks command names
- output budget check passes before footer or fallback text is appended
- duplicate period in generated prompt not caught by tests