fix(deriving): fail an out-of-range enum int instead of decoding it to minBound

WrappedEnumInt's FromField already returned a ConversionFailed for an int with no
corresponding constructor, but its Hasql DecodeValue did

    fromMaybe minBound . safeToEnum

so the same bad column silently produced the first constructor, depending only on
which driver read it. That turns a corrupt DB value into a valid-looking domain
value with no signal anywhere. Now refines through D.refine, the idiom already
used by the other DecodeValue instances in this module.
This commit is contained in:
Anthony Alaribe 2026-09-01 23:41:04 +02:00
commit 5a6315f37f