You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(corekit): EnumField.post_process Notes misstate which registries bound themselves to a width #2178
What: the Notes in EnumField.post_process say the registries that bound themselves to a width "are the bit-flag ones", and that none of them is the namespace of a plain EnumField. Both claims are wrong. 115 of the 118 generated _missing_ methods under pcapkit/const range-check 0 <= value <= N and raise a bare ValueError. The three that don't are http/method, ipv4/protection_authority and pcapng/filter_type.
Behaviour is fine: the bare ValueError is exactly the fallback this method catches.
Fix: say that the generated guards bound their own width, and that this is harmless because the method falls back on the bare ValueError.
Found by #1103 round 5. Confirmed on main4c3d30163.
Correction to the issue text. The exception list above is wrong. #2192's prose names no list, so the PR is unaffected.
pcapng/filter_type does range-check. FilterType._missing_ raises outside 0x00 <= value <= 0xFF; the bound is written in hex, so a decimal-only scan missed it.
Activity
JarryShaw commentedon Oct 25, 2026
Correction to the issue text. The exception list above is wrong. #2192's prose names no list, so the PR is unaffected.
pcapng/filter_typedoes range-check.FilterType._missing_raises outside0x00 <= value <= 0xFF; the bound is written in hex, so a decimal-only scan missed it._missing_(re-derived in the docs(corekit): say which generated registries bound their width (#2178) #2192 cross-review) finds these without a two-sided raising guard:ftp/command:Command,FEATCode(str-keyed);http/method:Method(str-keyed);ipv4/protection_authority: lower bound only;ftp/return_code:ResponseKind,GroupingInformation, which have no raising guard at all.docs(corekit): say which generated registries bound their width (#2178)…