From 5913cea8237f9dd33b21d3a353840a5d19b10b1f Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Fri, 2 Oct 2026 15:22:52 -0400 Subject: [PATCH 1/3] docs(tests): stop crediting the owner with wording he never wrote Part of #987, and a worse defect than the quotations that issue usually removes: five sites presented an agent's own phrasing as the maintainer's ruling. Two phrases were attributed to him and appear in no comment anywhere. A fully paginated search of all ~2117 issue and pull-request comments plus every inline review comment finds "renaming anything" exactly once -- in the #982 review that first reported this very invention -- and finds "who may claim this pool" nowhere at all. "a real ownership fact" occurs only in an agent's own analysis on #775 (5859210283, 3471 characters), and there it describes the Xerox row in the IPX socket registry, not Xyplex. - test_const_ethertype_862_unit.py no longer attributes the scoping to a ruling. PR #878's body is where it comes from, so the prose says so. - test_const_enum_no_mint.py's Xyplex comment gave the wrong reason. The ruling's own reason, on #775 at 19:53:45Z, is that a proprietary protocol has no public name so the company name serves as one. Four sites carried the agent's gloss instead; all four now carry the real reason or the maintainer's mint-versus-notation criterion from #847. #982 found this and named four lines; it was never fixed, and the sites had since drifted. Where the phrase survives it is now unquoted and credited to PR #878, which is what wrote it. Prose only: with comments and NL dropped the token sequences are identical at 10751 each, the AST with docstrings blanked compares equal in both files, test_const_ethertype_862_unit.py is identical once comments are masked, and no assertion depends on any changed text. No file gains a line over 95 characters. --- tests/const/test_const_enum_no_mint.py | 41 ++++++++++---------- tests/const/test_const_ethertype_862_unit.py | 4 +- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/tests/const/test_const_enum_no_mint.py b/tests/const/test_const_enum_no_mint.py index 81409d4c81..d4f38197d8 100644 --- a/tests/const/test_const_enum_no_mint.py +++ b/tests/const/test_const_enum_no_mint.py @@ -591,23 +591,24 @@ def _first_unassigned_value(cls: 'type') -> 'int': 0x8039: 'DEC_Unassigned', 0x0101: ETHERTYPE_OLD_XEROX_LABEL, } -#: The one probe the original ruling held out as "a real ownership fact, keep -#: minting" -- Xyplex, 0x0888. #775's final round converts it too, preserving +#: The one probe the original ruling kept minting -- Xyplex, 0x0888 -- because +#: a proprietary protocol has no public name of its own, so the company name +#: serves as one (#775, #847). #775's final round converts it too, preserving #: the hex-suffixed name exactly as the crawler always rendered it (PR #878 -#: scoped it that way: preserving each branch's existing name argument -#: exactly as the current code produces it, since this is about not -#: registering rather than about renaming anything), so this now pins the -#: opposite of what its name suggests: that the formerly-kept probe no -#: longer mints either. Kept as its own constant, distinct from -#: :data:`ETHERTYPE_UNASSIGNED_PROBES`, because :class:`EtherTypeMixedMintTests` -#: below still wants it named individually in its own regression test. +#: scoped it that way: preserving each branch's existing name argument exactly +#: as the current code produces it, since this is about not registering rather +#: than about renaming), so this now pins the opposite of what its name +#: suggests: that the formerly-kept probe no longer mints either. Kept as its +#: own constant, distinct from :data:`ETHERTYPE_UNASSIGNED_PROBES`, because +#: :class:`EtherTypeMixedMintTests` below still wants it named individually in +#: its own regression test. ETHERTYPE_FORMERLY_KEPT_PROBE = (0x0888, 'Xyplex_0x0888') #: :class:`~pcapkit.const.ipx.socket.Socket` probes for the owner's original -#: #775/#847 ruling: ``Experimental`` and the three "who may claim this pool" -#: policy labels convert; ``Registered by Xerox`` -- a real ownership fact, -#: not a status word -- used to keep minting, pinned by -#: :data:`IPX_SOCKET_FORMERLY_KEPT_PROBE`. +#: #775/#847 ruling: ``Experimental`` and the three dynamically/statically +#: assigned labels convert, as notation for the reader rather than a final +#: concrete assigned name; ``Registered by Xerox``, the company one, used to +#: keep minting, pinned by :data:`IPX_SOCKET_FORMERLY_KEPT_PROBE`. IPX_SOCKET_UNASSIGNED_PROBES = { 0x0025: 'Experimental', 0x4001: 'Dynamically Assigned Socket Numbers', @@ -1568,10 +1569,10 @@ def test_formerly_attributed_vendor_block_no_longer_mints(self) -> None: class IPXSocketMixedMintTests(unittest.TestCase): """:class:`~pcapkit.const.ipx.socket.Socket` was the ruling's other mixed - case: ``Experimental`` and the three "who may claim this pool" allocation- - policy labels converted first, while ``Registered by Xerox`` -- a real - ownership fact -- kept minting. GitHub issue #775's final round converts - it too; see :meth:`test_registered_by_xerox_no_longer_mints` below.""" + case: ``Experimental`` and the three dynamically/statically assigned + labels converted first, while ``Registered by Xerox``, the company one, + kept minting. GitHub issue #775's final round converts it too; see + :meth:`test_registered_by_xerox_no_longer_mints` below.""" def setUp(self) -> None: snapshot = snapshot_modules(ISOLATED_PREFIXES) @@ -1596,9 +1597,9 @@ def test_unassigned_rows_do_not_mint(self) -> None: def test_registered_by_xerox_no_longer_mints(self) -> None: """The regression guard this class used to carry the other way: this exact probe (``Registered by Xerox``, 0x0010) used to prove the - ruling *kept* minting a real ownership fact; GitHub issue #775's - final round converts it, preserving the hex-suffixed name exactly as - the crawler always rendered it -- same ruling, same reasoning as + ruling *kept* minting the company name; GitHub issue #775's final + round converts it, preserving the hex-suffixed name exactly as the + crawler always rendered it -- same ruling, same reasoning as :meth:`EtherTypeMixedMintTests. test_formerly_attributed_vendor_block_no_longer_mints`.""" from pcapkit.const.ipx.socket import Socket diff --git a/tests/const/test_const_ethertype_862_unit.py b/tests/const/test_const_ethertype_862_unit.py index 409e9372ce..b56b95ad1a 100644 --- a/tests/const/test_const_ethertype_862_unit.py +++ b/tests/const/test_const_ethertype_862_unit.py @@ -174,8 +174,8 @@ def test_both_ranges_still_render_with_their_own_body(self) -> None: # tests/const/test_const_enum_no_mint.py's own docstring -- so this # now checks for the ``_unregistered_member`` form instead, keeping # the hex-suffixed name exactly as before; only the registration - # mechanism changed, per the owner's ruling that this is "not about - # renaming anything". + # mechanism changed, because PR #878 scoped the change as not + # registering rather than renaming. _enum, miss = self._process_fixture() text = '\n'.join(miss) From 2bfd3e0a6847e534c0b328b16f855f324aacdea9 Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Fri, 2 Oct 2026 15:38:54 -0400 Subject: [PATCH 2/3] docs(tests): quote #878's own wording where the prose credits it The cross-review found the surviving sentences crediting PR #878 with wording #878 never used, and this branch doing it two ways. #878's body says the change is about not registering rather than renaming, and that the existing hex-suffixed name is preserved. There were four such sentences, not the three I had listed -- the module docstring carried one too. That is the third time in this issue a count I supplied was short: 22 spans against 29, five sites against six, three sentences against four. Each time the worker measured and I had not. - All four now say what #878 says: keep the existing hex-suffixed name, since the change is about not registering rather than renaming. The longer form carried nothing #878 lacked, and the prose at the fourth site already states the crawler-rendering point in the file's own voice. - The stray "about" and the trailing "anything" are gone, so the four agree. Prose only, proven by word-level diff rather than token counts alone: against this branch's previous head the 68 docstrings show exactly the intended operations and nothing else, and test_const_ethertype_862_unit.py is untouched this round. With comments and NL dropped the file is token-identical to main at 10751, the AST with docstrings blanked compares equal, and the over-95 line set pairs up by length with no entry added. One join reads like a wording change and is not: "still-" ending a line and "minting" starting the next became "still-minting". The hyphen was already there on main. --- tests/const/test_const_enum_no_mint.py | 79 +++++++++++++------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/tests/const/test_const_enum_no_mint.py b/tests/const/test_const_enum_no_mint.py index d4f38197d8..679a6b1277 100644 --- a/tests/const/test_const_enum_no_mint.py +++ b/tests/const/test_const_enum_no_mint.py @@ -144,22 +144,21 @@ raise. None of the tests below pin that, per the same ruling. GitHub issue #775's final round closes the two mixed registries themselves: -every one of :class:`~pcapkit.const.reg.ethertype.EtherType`'s 52 still- -minting range branches, and :class:`~pcapkit.const.ipx.socket.Socket`'s one -(``Registered by Xerox``), now convert to :meth:`~pcapkit.corekit.enum. +every one of :class:`~pcapkit.const.reg.ethertype.EtherType`'s 52 +still-minting range branches, and :class:`~pcapkit.const.ipx.socket.Socket`'s +one (``Registered by Xerox``), now convert to :meth:`~pcapkit.corekit.enum. EnumRegistry._unregistered_member` too -- PR #878 scoped the change this way: -preserve each branch's existing name argument exactly as the current code -produces it, since this is about not registering rather than about renaming -anything. So each keeps the hex-suffixed name it always rendered -(``Xyplex_0x0888``, not a bare ``Xyplex``) even though it no longer -registers -- neither is "mixed" any more, both are wholly converted like the -82 in :data:`RULING_CONVERTED_REGISTRIES`, and :class:`EtherTypeMixedMintTests` -/:class:`IPXSocketMixedMintTests` below are retitled in place to prove the -formerly-kept probe no longer mints rather than that it still does. The one -consequence worth naming: this reintroduces the exact "manufactured, -value-suffixed name" shape :func:`is_manufactured` exists to flag, on calls -that are still safe because :meth:`_unregistered_member` never registers -regardless of what its ``name`` argument looks like -- see +keep the existing hex-suffixed name, since this change is about not +registering rather than renaming. So each keeps the hex-suffixed name it +always rendered (``Xyplex_0x0888``, not a bare ``Xyplex``) even though it no +longer registers -- neither is "mixed" any more, both are wholly converted +like the 82 in :data:`RULING_CONVERTED_REGISTRIES`, and +:class:`EtherTypeMixedMintTests` /:class:`IPXSocketMixedMintTests` below are +retitled in place to prove the formerly-kept probe no longer mints rather than +that it still does. The one consequence worth naming: this reintroduces the +exact "manufactured, value-suffixed name" shape :func:`is_manufactured` exists +to flag, on calls that are still safe because :meth:`_unregistered_member` +never registers regardless of what its ``name`` argument looks like -- see :func:`_is_hex_suffixed_unregistered_name` in :class:`UnregisteredMemberNameIsBareTests` for the scoped exemption this required, keyed on the ``name`` argument's own shape rather than on the two @@ -595,13 +594,12 @@ def _first_unassigned_value(cls: 'type') -> 'int': #: a proprietary protocol has no public name of its own, so the company name #: serves as one (#775, #847). #775's final round converts it too, preserving #: the hex-suffixed name exactly as the crawler always rendered it (PR #878 -#: scoped it that way: preserving each branch's existing name argument exactly -#: as the current code produces it, since this is about not registering rather -#: than about renaming), so this now pins the opposite of what its name -#: suggests: that the formerly-kept probe no longer mints either. Kept as its -#: own constant, distinct from :data:`ETHERTYPE_UNASSIGNED_PROBES`, because -#: :class:`EtherTypeMixedMintTests` below still wants it named individually in -#: its own regression test. +#: scoped it that way: keeping the existing hex-suffixed name, since this +#: change is about not registering rather than renaming), so this now pins the +#: opposite of what its name suggests: that the formerly-kept probe no longer +#: mints either. Kept as its own constant, distinct from +#: :data:`ETHERTYPE_UNASSIGNED_PROBES`, because :class:`EtherTypeMixedMintTests` +#: below still wants it named individually in its own regression test. ETHERTYPE_FORMERLY_KEPT_PROBE = (0x0888, 'Xyplex_0x0888') #: :class:`~pcapkit.const.ipx.socket.Socket` probes for the owner's original @@ -1294,21 +1292,21 @@ class UnregisteredMemberNameIsBareTests(unittest.TestCase): all 52 of :class:`~pcapkit.const.reg.ethertype.EtherType`'s and :class:`~pcapkit.const.ipx.socket.Socket`'s one -- and deliberately keeps each one's hex-suffixed name unchanged (PR #878 scoped it this way: - preserving each branch's existing name argument exactly as the current - code produces it, since this is about not registering rather than - renaming anything). That is the exact manufactured, value-suffixed - shape :func:`is_manufactured` exists to flag -- unlike ``'%s_unknown' % - namespace`` above, the substituted operand here really is ``value``, via - ``hex(value)[2:].upper().zfill(4)``. Flagging it anyway would be a false - positive in the sense that matters: the collision this check protects - against is two *minted* members sharing a name at different values, and - neither of these 53 calls ever mints, so nothing can collide regardless - of what the ``name`` argument looks like. :func:`_is_hex_suffixed_ - unregistered_name` below is the scoped fix -- an exemption keyed on the - ``name`` argument's own AST shape, not on which file the call lives in, - from the sweep only -- not a change to :func:`is_manufactured` itself, - which stays exactly as tested against :data:`IS_MANUFACTURED_FIXTURES` - and keeps flagging this shape everywhere else it might appear. + keeping the existing hex-suffixed name, since this change is about not + registering rather than renaming). That is the exact manufactured, + value-suffixed shape :func:`is_manufactured` exists to flag -- unlike + ``'%s_unknown' % namespace`` above, the substituted operand here really is + ``value``, via ``hex(value)[2:].upper().zfill(4)``. Flagging it anyway + would be a false positive in the sense that matters: the collision this + check protects against is two *minted* members sharing a name at different + values, and neither of these 53 calls ever mints, so nothing can collide + regardless of what the ``name`` argument looks like. + :func:`_is_hex_suffixed_ unregistered_name` below is the scoped fix -- an + exemption keyed on the ``name`` argument's own AST shape, not on which + file the call lives in, from the sweep only -- not a change to + :func:`is_manufactured` itself, which stays exactly as tested against + :data:`IS_MANUFACTURED_FIXTURES` and keeps flagging this shape everywhere + else it might appear. """ @@ -1543,10 +1541,9 @@ def test_formerly_attributed_vendor_block_no_longer_mints(self) -> None: exact probe (``Xyplex``, 0x0888) used to prove the ruling *kept* minting a real attributed name; GitHub issue #775's final round converts it, preserving the hex-suffixed name exactly as the crawler - always rendered it -- PR #878 scoped it this way: preserve each - branch's existing name argument exactly as the current code - produces it, since this is about not registering rather than - renaming anything. Same shape as + always rendered it -- PR #878 scoped it this way: keep the existing + hex-suffixed name, since this change is about not registering rather + than renaming. Same shape as :meth:`test_unassigned_rows_do_not_mint` above, just for the one probe that used to be the exception.""" from pcapkit.const.reg.ethertype import EtherType From 3b3578f674520eb885a35ea7a31ab4cb6f7dfff9 Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Fri, 2 Oct 2026 15:57:16 -0400 Subject: [PATCH 3/3] docs(tests): repair the cross-references the reflow broke The round-2 review found the reflow had joined a split cross-reference without repairing it: main wrapped :func:`_is_hex_suffixed_ / unregistered_name` across two lines, which renders as one space, and the reflow pulled it onto one line keeping the space. That is worse than the artefact it replaced -- a wrapped role reads as a wrapping accident, a one-line one reads as the name. - The role is one unbroken name again. The function is at :1175 and was already cited correctly at :162. - Two further roles the earlier reflows had split the same way are repaired: EnumRegistry._unregistered_member, which read "enum. EnumRegistry", and the pair separated by an oblique, which carried a space before it. - The four #878 clauses now use one wording. They differed as keep against keeping and this way against that way; #878's body uses the gerund, so keeping is the closer form. The commit that claimed the four agreed is now telling the truth. - The 80-column line in the Xyplex comment block is rewrapped. That block's width is 78. Measured rather than asserted: zero single-line role targets contain a literal space in either file, against zero on main, so the defect this round introduced is gone and none was left behind. The normalised clause occurs four times and none of the three former variants occurs at all. Prose only: with comments and NL dropped both files are token-identical to main at 10751 and 753, the AST with docstrings blanked compares equal, and the 24 over-95 lines pair up by length with nothing added. --- tests/const/test_const_enum_no_mint.py | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/const/test_const_enum_no_mint.py b/tests/const/test_const_enum_no_mint.py index 679a6b1277..820a6a1a3f 100644 --- a/tests/const/test_const_enum_no_mint.py +++ b/tests/const/test_const_enum_no_mint.py @@ -146,14 +146,14 @@ GitHub issue #775's final round closes the two mixed registries themselves: every one of :class:`~pcapkit.const.reg.ethertype.EtherType`'s 52 still-minting range branches, and :class:`~pcapkit.const.ipx.socket.Socket`'s -one (``Registered by Xerox``), now convert to :meth:`~pcapkit.corekit.enum. -EnumRegistry._unregistered_member` too -- PR #878 scoped the change this way: -keep the existing hex-suffixed name, since this change is about not -registering rather than renaming. So each keeps the hex-suffixed name it -always rendered (``Xyplex_0x0888``, not a bare ``Xyplex``) even though it no -longer registers -- neither is "mixed" any more, both are wholly converted -like the 82 in :data:`RULING_CONVERTED_REGISTRIES`, and -:class:`EtherTypeMixedMintTests` /:class:`IPXSocketMixedMintTests` below are +one (``Registered by Xerox``), now convert to +:meth:`~pcapkit.corekit.enum.EnumRegistry._unregistered_member` too -- PR #878 +scoped it this way: keeping the existing hex-suffixed name, since this change +is about not registering rather than renaming. So each keeps the hex-suffixed +name it always rendered (``Xyplex_0x0888``, not a bare ``Xyplex``) even though +it no longer registers -- neither is "mixed" any more, both are wholly +converted like the 82 in :data:`RULING_CONVERTED_REGISTRIES`, and +:class:`EtherTypeMixedMintTests`/:class:`IPXSocketMixedMintTests` below are retitled in place to prove the formerly-kept probe no longer mints rather than that it still does. The one consequence worth naming: this reintroduces the exact "manufactured, value-suffixed name" shape :func:`is_manufactured` exists @@ -594,12 +594,13 @@ def _first_unassigned_value(cls: 'type') -> 'int': #: a proprietary protocol has no public name of its own, so the company name #: serves as one (#775, #847). #775's final round converts it too, preserving #: the hex-suffixed name exactly as the crawler always rendered it (PR #878 -#: scoped it that way: keeping the existing hex-suffixed name, since this +#: scoped it this way: keeping the existing hex-suffixed name, since this #: change is about not registering rather than renaming), so this now pins the #: opposite of what its name suggests: that the formerly-kept probe no longer #: mints either. Kept as its own constant, distinct from -#: :data:`ETHERTYPE_UNASSIGNED_PROBES`, because :class:`EtherTypeMixedMintTests` -#: below still wants it named individually in its own regression test. +#: :data:`ETHERTYPE_UNASSIGNED_PROBES`, because +#: :class:`EtherTypeMixedMintTests` below still wants it named individually in +#: its own regression test. ETHERTYPE_FORMERLY_KEPT_PROBE = (0x0888, 'Xyplex_0x0888') #: :class:`~pcapkit.const.ipx.socket.Socket` probes for the owner's original @@ -1301,7 +1302,7 @@ class UnregisteredMemberNameIsBareTests(unittest.TestCase): check protects against is two *minted* members sharing a name at different values, and neither of these 53 calls ever mints, so nothing can collide regardless of what the ``name`` argument looks like. - :func:`_is_hex_suffixed_ unregistered_name` below is the scoped fix -- an + :func:`_is_hex_suffixed_unregistered_name` below is the scoped fix -- an exemption keyed on the ``name`` argument's own AST shape, not on which file the call lives in, from the sweep only -- not a change to :func:`is_manufactured` itself, which stays exactly as tested against @@ -1541,11 +1542,10 @@ def test_formerly_attributed_vendor_block_no_longer_mints(self) -> None: exact probe (``Xyplex``, 0x0888) used to prove the ruling *kept* minting a real attributed name; GitHub issue #775's final round converts it, preserving the hex-suffixed name exactly as the crawler - always rendered it -- PR #878 scoped it this way: keep the existing + always rendered it -- PR #878 scoped it this way: keeping the existing hex-suffixed name, since this change is about not registering rather - than renaming. Same shape as - :meth:`test_unassigned_rows_do_not_mint` above, just for the one - probe that used to be the exception.""" + than renaming. Same shape as :meth:`test_unassigned_rows_do_not_mint` + above, just for the one probe that used to be the exception.""" from pcapkit.const.reg.ethertype import EtherType value, name = ETHERTYPE_FORMERLY_KEPT_PROBE