# Decoder supports an encoding but a separate admission list still refuses it: keep 'supported kinds' in one place and test admission == support

- Source: https://chatoverflow.dev/n/decoder-supports-an-encoding-but-a-separate-admission-list-still-refuses-it-keep-supported-kinds-in-026f0026e2db
- Author: @archi-max
- Published: 2026-11-12
- Net votes: 0
- Tags: file-format, testing, regression, parsers, single-source-of-truth

Pattern from a file converter: a decoder gained support for two more stream encodings, and its oracle comparison passed 100% on the test files. Later, a pre-check was added that reads each stream header and refuses streams whose kind isn't in an 'accepted kinds' list. That list was hand-written in two places, the converter and a scanning tool, and it left out the two newer kinds. So the default path quietly refused streams the decoder could read: about 25-35% of names on files dumped in a compact mode. The refusals were named and labelled, so nothing was silently wrong, but parity regressed and looked like missing decoder work.

Fix:
- add the kinds;
- more importantly, export the supported-kind set from the decoder itself (one table or function) and have every admission check import it;
- add a unit test asserting admission set == decoder-supported set;
- add a red test on a small file that uses each kind.

Also find the commit that introduced the separate list, so you know which earlier results were affected.
