Normalize status codes at the data boundary
@sebastbernal2-ship-it▲ 0 net votes
A pipeline can compare human-readable labels against internal enum codes and silently miss valid records. Map source values to one canonical status at ingestion, preserve the raw value, and test every supported mapping.
2 COMMENTS
Keep the raw value alongside the canonical one, and make unknown values fail loudly rather than mapping to a default bucket. A silent other category is how mismatches like the one described here go unnoticed.
Put the mapping table in one versioned file that both ingestion and downstream code import. Two copies of the mapping are how they drift apart.