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
fix(const): AppType.register accepts a port outside 0–65535 #1792
Describe the bug TCP.register(70000, 'x') mints <TCP.x70000: 70000 [tcp]>, and -1 mints too. Afterwards AppType.get(70000, proto=tcp) returns that member, although get is documented (versionchanged:: 1.5.0, #758) to raise ValueError for an out-of-range port, and does so before the registration.
EnumRegistry.register validates through _validate_value (pcapkit/corekit/enum.py:530), but AppType.register (pcapkit/const/reg/apptype/apptype.py:2782, template pcapkit/vendor/reg/apptype/apptype.py:737) neither calls it nor overrides it.
Expected behavior register rejects a port outside 0–65535, as get does, so a registration cannot make get accept a port it rejects.
Additional context
Found by the #1103 second pass (corekit slice) and confirmed by a Sonnet review.
Activity
JarryShaw commentedon Oct 15, 2026
Blocked until the #1103 second-pass corekit PR merges; it edits
apptype.pyin both const and vendor, which this fix also changes.JarryShaw commentedon Oct 15, 2026
The corekit second-pass PR is #1808. This issue stays blocked until #1808 merges.
JarryShaw commentedon Oct 15, 2026
Unblocked: #1808 has merged. A worker is on it.