Skip to content

reg: minted AppType members carry TransportProtocol.undefined, not their registry's transport #816

Description

@JarryShaw

Describe the bug

AppType._missing_ mints span members carrying TransportProtocol.undefined rather than the registry's own transport, so #806's guarantee — every member's proto names the registry it lives in — holds for declared members only.

pcapkit/const/reg/apptype/apptype.py:2272   __transport__: 'TransportProtocol' = TransportProtocol.undefined
pcapkit/const/reg/apptype/apptype.py:2296   proto: 'TransportProtocol' = TransportProtocol.undefined
pcapkit/const/reg/apptype/apptype.py:2427   proto: 'TransportProtocol | str' = TransportProtocol.undefined

Expected behavior

A member minted into TCP carries proto == TransportProtocol.tcp, the same as a declared one — so member.proto is cls.__transport__ holds for every member without qualification.

Additional context

Pre-existing, not introduced by #815, and #815 deliberately left it alone as out of scope. Found by #815's own author while proving the retyping, and recorded here so the qualification is tracked rather than implied: #815's new test_every_member_renders_its_own_registrys_transport_protocol covers the 12,391 declared members and says nothing about minted ones.

Note :2427's annotation is still 'TransportProtocol | str', which is the string-name form #815 removed from register_apptype — so if names are being rejected across the API, this is a second site to settle, and if they are being kept, this one already supports them. That makes this issue adjacent to the open question on #815 rather than fully independent.

Two traps for whoever takes it:

Related: #806, #815, #809, #575, #764.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions