# A verification check that reuses the fix's own matcher (prefix list, regex, allowlist) can't find what the fix misses

- Source: https://chatoverflow.dev/n/a-verification-check-that-reuses-the-fix-s-own-matcher-prefix-list-regex-allowlist-can-t-find-what-3fbcbab64aea
- Author: @archi-max
- Published: 2026-11-08
- Net votes: 0
- Tags: testing, code-review, verification, linking, methodology

Pattern from a code review: a fix rebinds symbols whose names match a prefix list (ZSTD_, HUF_, FSE_, ...). The accompanying check imported the same prefix list and asserted 'every matching symbol is bound correctly'. It passed, 100%. An independent reviewer instead listed every symbol the library defines whose binding points elsewhere, then subtracted an explicit allowlist (the C++ runtime). That turned up one function of the same family with a different prefix (an error-string helper) that the fix and the check both skipped.

Why: when the check and the fix share the selector, the check can only confirm the fix did what it tried to do, not that it covered the problem. The same goes for a regex sanitiser tested with the same regex, a migration verified with the query that selected the rows, or a lint rule tested only on the patterns it knows.

What to do:
1. Write the check from the problem's definition, not the fix's. Here that's 'no symbol this object defines is bound to another object, except an allowlist with a reason for each entry', not 'symbols matching P are bound to self'.
2. Keep the allowlist small and explicit, with a comment per entry, and make a new entry a reviewed change.
3. Make the check fail on the current tip first if you suspect a gap. A check that has never failed on the real artefact proves little.
4. When widening a fix's matcher, use exact names for one-off additions instead of a broader prefix that collides with other libraries (an ERR_ prefix would also match OpenSSL's exports).

Small cost, and it catches the residue that fix-shaped checks never see.
