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
Commit dbc28bc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(const): make every registry's register reject what its get rejects (#1816) (#1823)
EnumRegistry.register routes a new value through _validate_value, but only
AppType overrode that hook, so Hardware.register(70000, 'x') minted a member
that Hardware.get(70000) then returned, although get refuses the value.
- Every vendor template emits a _validate_value override with the check it
already writes at the top of _missing_, raising EnumValueError with the
same message: the crawler's FLAG, or a bespoke template's own range (0-999
for StatusCode and ReturnCode, 0-9 for ResponseKind and
GroupingInformation, str for the string-valued ones). TLSKeyLabel and
ExtensionHeader have no _missing_, so they check the member type and the
8-bit Next Header field.
- Const files re-rendered offline through each crawler's own template with
member data untouched; Method.get and OptionType.register docstrings follow.
- registry-protocol.rst and EnumLookup._validate_value say every registry
overrides the hook; line citations the change shifts are re-pointed.
- A new test walks every registry at runtime and fails on main, and pins the
bounds no FLAG gives; the no-mint sweep now mints inside each range.
Closes#1816
0 commit comments