Repository navigation
fix(const,vendor): stop EtherType and Socket minting on an unrecognised value - #878
Conversation
…ed value Converts the last 53 minting `extend_enum` sites in the const registries, closing out issue #775: EtherType's 52 range branches and Socket's one ("Registered by Xerox"), the two registries the original #775/#847 ruling held out because their names were real attributed protocols rather than placeholder status words. - `pcapkit/vendor/reg/ethertype.py` and `pcapkit/vendor/ipx/socket.py`: the `process()` else-branch that used to render `extend_enum(cls, name, value)` now renders `cls._unregistered_member(value, name)` instead, keeping every branch's existing hex-suffixed name argument unchanged -- this is about not registering, not about renaming anything. - `pcapkit/const/reg/ethertype.py` and `pcapkit/const/ipx/socket.py` regenerated to match: Socket regenerated byte-for-byte offline (its `LINK` is `None`, so no network call is involved); EtherType hand-applied with the identical mechanical substitution, verified against the crawler's own `process()` fed the real IANA CSV fixture already committed for issue #862. - `pcapkit/corekit/enum.py`: `EnumRegistry.get()`'s docstring no longer claims three registries still mint directly; only `CGAType` does now. - `tests/const/test_const_enum_no_mint.py`: the two "mixed registry" test classes are retitled in place to prove the formerly-kept probe (`Xyplex`, `Registered by Xerox`) no longer mints, and a new, scoped `HEX_SUFFIXED_NAME_EXEMPT_PATHS` exemption lets the manufactured-name sweep tolerate the deliberately-preserved hex suffix on just these two files, without weakening `is_manufactured()` itself. - `tests/const/test_const_ethertype_862_unit.py`, `tests/const/test_const_registry_protocol.py` and `tests/vendor/test_ipx_socket_unit.py`: three call sites that asserted the old minting behaviour flipped to assert non-minting instead. Built and verified offline (no live crawl): AST sweep over pcapkit/const/ now finds exactly 1 remaining minting site (CGAType, deliberately untouched); tests/const/test_const_enum_lookup.py (13/13) and tests/vendor/test_vendor_missing_body_unit.py (6/6) pass with 0 failures/errors. Refs #775
|
GOOD TO GO on The headline re-derived by a different route than the author's (per-class rather than per-file): 54 → 1 The conversion was checked exhaustively, not sampled. Every range branch of both The narrowed guard is justified but shape-blind, and I reproduced that myself. Non-blocking, because the widened area is harmless for the same structural reason the intended 53 are. Worth a follow-up to key the exemption on the suffix expression rather than the path. One claim in the PR description is wrong and I am correcting it as the author of that text. I wrote that the four extra test files were changed because pre-existing assertions became false. That holds for three of them, but Also confirmed: Unverified and stated as such: whether a live IANA crawl today would still yield these same 52 rows. No crawl was run, and that proposition was equally unverified at |
…ision (#719) Accuracy fixes, each re-derived against the code: - mint-criterion.rst presented `EtherType`'s company names and `Socket`'s `Registered by Xerox` as the worked *mint* examples. #878 converted both to `_unregistered_member`; `CGAType` is now the only `_missing_` that mints, so the criterion decides the unregistered member's *name*, not whether it registers. - Its `ast` snippet matched only `ast.Name` callees, so it reported 1 MINT and 0 UNMINT; `_unregistered_member` is called on `cls`. Matches attributes now. - "Every registry defines `_missing_`" -> 121 of 127, naming the six without one. - registry-protocol.rst: `__new__` exemption said "a handful ... tracked in #860"; it is six named classes and #860 closed with all 127 on the base. - The 6 mh/ngap helpers are not all numeric: `PDUKind` is `str`, and it was listed in two rows at once. - `TCP`/`UDP`/`SCTP`/`DCCP` member *names* come from the service-name column; the values are composites. - process.rst: 9 sections, 8 of them module-level; `pcapkit.interface` has none. - sentinel-convention.rst: `NO_VALUE` also lacks `__copy__`/`__deepcopy__`/ `__reduce__`; the quoted `AbsentType` excerpt did not support the privacy claim it was cited for. - Two `/issues/` links pointed at pull requests (#847, #913). Concision: dropped timed context (the page's former title, the two-pass #877 history, the pre-#937 casing narrative, the pre-restructure changelog shape) and fixed a duplicated clause. Added two Mermaid flows for `_missing_` and for `get`'s dispatch, modelled on workflows.rst:102. Build: docutils parse unchanged from base; tests/project/test_conventions_doc_claims.py and the seven other suites reading these pages 111 passed, 1 skipped, 241 subtests.
#719 Swept tests/ for owner-ruling quotes attributed to the wrong GitHub thread, the same defect class #719 fixed under pcapkit/. Confirmed each by grepping the quote's distinctive text against the cited thread's body/comments; a hit elsewhere is a re-quote or a different thread's own words, not the source. - test_sentinel_exports_unit.py: the already-reported #937->#719 fix for AbsentType's privacy ruling. - test_enum_lookup_reparent_930_unit.py (4 sites) and test_mh_unit.py: "I prefer (2) directly" and the question that drew it are in pull request #940's thread, not issue #935 -- #935 only carries the first ruling ("I lean on 1"). - test_vendor_snapshot_restore_unit.py: the contextlib/atomic-write ruling is in pull request #873's thread; issue #872 has zero comments. - test_vendor_reg_apptype_generator_unit.py (2 sites): the "undefined direct uses 0" ruling is in pull request #874's thread, not issue #860 or #770. - test_const_enum_no_mint.py (2 sites): the mint/unmint criterion was settled on pull request #847 and confirmed on #775 -- the reverse of what the text said, per #861's own description of the same ruling; and "Q1 - bare it is." is pull request #838's thread, not #775's. One occurrence left unresolved rather than guessed at: the "Preserve each branch's existing name argument..." quote (4 sites in test_const_enum_no_mint.py, attributed to "#775's final round") does not appear verbatim in #775, #847, or #878 (the implementing PR) by body, comments, review comments, or commit message -- only a paraphrase in #878's own PR description/commit message, which is the author's prose rather than a quoted ruling. Flagged for the owner rather than fixed. tests/corekit/, tests/vendor/, tests/const/ pass (400/16, 118, 299 respectively, pcapkit.__file__ confirmed inside this worktree); tests/protocols/internet/test_mh_unit.py passes standalone (52/0) -- the full directory has 5 unrelated pre-existing failures from ungenerated examples/captures/ fixtures, untouched by this change. Refs #719
…719) Per #719's citation ruling (de-quote, never reproduce a verbatim quote that may have come from outside GitHub): - test_const_enum_no_mint.py (4 sites): a quotation attributed to "the owner's ruling, verbatim" never appears in #775, #847, #861 or #878 (or anywhere in the repo's comment corpus). Replaced with a paraphrase attributed to PR #878's own body, which carries the real design note in different words. - test_sentinel_exports_unit.py / test_const_registry_protocol.py: a quote attributed to #911 silently dropped half of what the owner wrote on #719 and swapped `__all__` for "users". Replaced with a paraphrase naming #719 as where it was settled and #911 as the issue that carried it out. - test_const_enum_no_mint.py / test_const_enum_builtin_parity.py (4 sites): a "verbatim" quote of #860 silently corrected the owner's typo ("entires" -> "entries"). Paraphrased, which drops the question of reproducing or flagging the typo. - test_enum_lookup_reparent_930_unit.py: "the owner's final ruling there" had #935 as its nearest antecedent instead of #940; named #940 explicitly and paraphrased the adjacent quote. Verified: ast.parse and reST markup pairing clean on every touched file; tests/const (299 tests) and the targeted pytest sweep of all touched files (261 passed, 2013 subtests) are green. tests/corekit's full discover run shows 5 pre-existing failures in test_sentinel_exports_unit.py, confirmed identical on the unedited originals -- a cross-file test-order dependency unrelated to this change.
…itation (#719) - tests/vendor/test_ipx_socket_unit.py: the "owner's ruling" attribution for keeping the hex-suffixed Xerox name survived in this file after the prior commit removed the same false attribution from four sites in test_const_enum_no_mint.py. Reworded to credit PR #878's own design note, matching the wording already used at the repaired sites. - tests/corekit/test_sentinel_exports_unit.py: the docstring cited the #719 export ruling ("only export objects, not types") as grounds for keeping ABSENT out of __all__, but ABSENT is an object, so that ruling argues for including it, not excluding it. Re-grounded the sentence on the privacy ruling already quoted ~15 lines below instead, without re-quoting it. Both changes are prose-only: tokenizing each file before and after with comments and docstrings stripped produces identical token sequences. tests/vendor passes 118/118 except one pre-existing, test-order-dependent flake in test_vendor_snapshot_restore_unit.py (reproduces identically on the pre-edit tree); tests/project/test_conventions_doc_claims.py passes 38/38.
…ons that cite correctly (#719) The last two commits paraphrased every disputed owner quotation away. That was right for one case and wrong for two: a quotation that exists nowhere has to be paraphrased, but a quotation that is real and was only cited to the wrong thread lost its audit trail for nothing, since the defect was the pointer, not the words. Per the owner's ruling, narrow the fix to match. Restored as quotations, correctly cited: - tests/corekit/test_sentinel_exports_unit.py (~L4-7) and tests/const/test_const_registry_protocol.py (~L1363): the sentinel export rule, split back into its two real sources instead of one spliced sentence -- #719's "we should ONLY export the objects ... and leave the types ... out", and #911's own "we only expose the final objects to users", with #911 noted as both executor and source. - tests/const/test_const_enum_no_mint.py (~L88, ~L1876, ~L2363) and tests/const/test_const_enum_builtin_parity.py (~L655): the #860 minting ruling, including its load-bearing first sentence ("I think we should not mint on get still actually") and the owner's own "entires" typo, marked [sic] rather than silently corrected. Left alone: the four #878 fabricated-quote sites in test_const_enum_no_mint.py, which cite no real thread and stay paraphrased, and the ABSENT privacy sentence, which is a correct paraphrase of a different ruling. Verified: ast.parse and reST markup clean on all four files; code token sequences (docstrings/comments stripped) identical before and after; each restored quotation substring-matches its source comment after whitespace/markup normalisation. tests/const: 299 OK. tests/ project/test_conventions_doc_claims: 38 OK, 1 skipped.
…ontext, per #719 The previous commit restored eight verbatim quotations to fix a narrowing that had dropped their context. The owner has since ruled that neither form is right: a narrowed paraphrase without context does not help a reader who was not in the thread, but a verbatim quotation makes the docstring read as a discussion rather than documentation. - Sentinel export rule (corekit/test_sentinel_exports_unit.py, const/test_const_registry_protocol.py): state that a module's `__all__` lists a sentinel's object but deliberately leaves its type out, and why (the type is not part of the public surface), citing #719 as where it was settled and #911 as where the implementing work belongs. - #860 minting rule, four sites (const/test_const_enum_no_mint.py x3, const/test_const_enum_builtin_parity.py): state that `get()` must not mint and only `register()` creates a new entry, and why (only IANA-registered values are legitimate and `get()` lacks the information to construct one), citing #860. Each site is fitted to its own surrounding prose rather than one paragraph pasted four times. Drops the `[sic]` each quotation carried, since there is nothing left to reproduce. - Fixed two sentences left orphaned by the quotations' removal: an antecedent ("the three") that depended on the deleted quote's wording, and a sentence whose "get() as well as _missing_" had the emphasis backwards relative to the rule's own subject. The four PR #878 paraphrase sites in test_const_enum_no_mint.py were already in this third form and are unchanged. Verified: ast.parse on all four files; tokenize with comments and docstrings stripped shows an identical token sequence before/after (prose-only); tests/const (299) and tests/project/test_conventions_doc_claims.py (38, 1 skip) pass; tests/corekit (400, 5 failures, 16 skipped) matches the documented pre-existing sentinel-identity failures.
…quest (#719) (#982) * docs(pcapkit,ci): cite the issue a defect belongs to, not the pull request (#719) Per the owner's ruling on #719, replace every reference to a pull-request number in pcapkit/** and .github/workflows/** comments and docstrings with the issue it closed, or a description where no issue covers it. - 92 real PR citations in pcapkit/ (93 was the estimate; the gap is RFC packet-diagram and hex-format-spec false positives, plus one cross-repo issue citation that only coincidentally matched a PyPCAPKit PR number). - 13 PR citations in .github/workflows/, matching the estimate exactly. - Several citations named two or three numbers for one claim where a PR closed several issues, or several PRs closed the same issue; deduplicated rather than left reading "#425 and #425". Four review rounds caught the same category error recurring: several sites had relocated a verbatim quote or a specific finding into the issue number rather than describing where the ruling was actually given, so the quote no longer existed where the sentence pointed. Fixed each by naming the issue while locating the ruling honestly -- "a ruling given in review of the work for #N" -- the same shape already used on this repo's conventions docs. Two sites needed the inverse correction instead: the #923 quote in enum.py/exceptions.py genuinely is recorded on #923's own thread, just attributed there to the pull request that implemented it, so those read "a ruling recorded on GitHub issue #923" rather than pointing elsewhere. Also fixed a lost conjunction and an ordinal/number mismatch in corekit/enum.py, a self-contradicting below/above pointer repeated across three internet/ files, and a number collision in http.py where one issue ended up naming both a defect and the change that closed it. Final sweep: grepped the whole tree for the word "verbatim" -- the marker that makes a quote-attribution claim falsifiable -- across all 30 files under pcapkit/ that carry it, and checked every quote this way names against the actual issue thread. Caught two more of the same defect: vendor/__main__.py's #872 citation (the quote is in the implementing pull request's review, not #872 itself) and four sites across mh.py attributing to #935 a ruling that only exists in the review of the pull request that implemented it -- #935's own thread holds just the superseded widen-not-delete proposal. Both fixed the same way. Every other quote-bearing claim the sweep found -- #911, #937, three distinct #877 quotes, both #842 quotes, and the #860/#808/#806/#886/#917 rewrites from earlier in this pass -- resolves to the thread it names. Verified: targeted pytest across every touched module passes, including the test that pins the vendor/const apptype.py get() region as byte-identical, reconfirmed after each amendment. Both edited workflow YAML files parse before and after with unchanged key counts. * docs(corekit): cite #719, not #937, for the AbsentType ruling AbsentType's docstring attributed the owner's "document it as private type/class... not for public use is enough" quote to #937. #937 itself quotes that ruling verbatim under "The owner's ruling, verbatim (from #719)" -- it re-attributes rather than originates it. Per the house rule to cite the issue a ruling was settled on (docs/source/contributing/conventions/documentation.rst:196-200), point the attribution at #719 and re-wrap the paragraph to the file's existing ~78-column width. The neighbouring, unrelated #937 citation describing what #937 did to sentinel naming is untouched. tests/corekit/ passes (400 passed, 16 skipped) against this worktree's own pcapkit (confirmed via pcapkit.__file__); pylint on the file is 9.77/10, unchanged by this edit -- the one finding is a pre-existing, unrelated too-few-public-methods warning on NoValueType. * docs(tests): re-point six ruling citations at their actual threads, per #719 Swept tests/ for owner-ruling quotes attributed to the wrong GitHub thread, the same defect class #719 fixed under pcapkit/. Confirmed each by grepping the quote's distinctive text against the cited thread's body/comments; a hit elsewhere is a re-quote or a different thread's own words, not the source. - test_sentinel_exports_unit.py: the already-reported #937->#719 fix for AbsentType's privacy ruling. - test_enum_lookup_reparent_930_unit.py (4 sites) and test_mh_unit.py: "I prefer (2) directly" and the question that drew it are in pull request #940's thread, not issue #935 -- #935 only carries the first ruling ("I lean on 1"). - test_vendor_snapshot_restore_unit.py: the contextlib/atomic-write ruling is in pull request #873's thread; issue #872 has zero comments. - test_vendor_reg_apptype_generator_unit.py (2 sites): the "undefined direct uses 0" ruling is in pull request #874's thread, not issue #860 or #770. - test_const_enum_no_mint.py (2 sites): the mint/unmint criterion was settled on pull request #847 and confirmed on #775 -- the reverse of what the text said, per #861's own description of the same ruling; and "Q1 - bare it is." is pull request #838's thread, not #775's. One occurrence left unresolved rather than guessed at: the "Preserve each branch's existing name argument..." quote (4 sites in test_const_enum_no_mint.py, attributed to "#775's final round") does not appear verbatim in #775, #847, or #878 (the implementing PR) by body, comments, review comments, or commit message -- only a paraphrase in #878's own PR description/commit message, which is the author's prose rather than a quoted ruling. Flagged for the owner rather than fixed. tests/corekit/, tests/vendor/, tests/const/ pass (400/16, 118, 299 respectively, pcapkit.__file__ confirmed inside this worktree); tests/protocols/internet/test_mh_unit.py passes standalone (52/0) -- the full directory has 5 unrelated pre-existing failures from ungenerated examples/captures/ fixtures, untouched by this change. Refs #719 * docs(tests): paraphrase four fabricated or altered owner quotations (#719) Per #719's citation ruling (de-quote, never reproduce a verbatim quote that may have come from outside GitHub): - test_const_enum_no_mint.py (4 sites): a quotation attributed to "the owner's ruling, verbatim" never appears in #775, #847, #861 or #878 (or anywhere in the repo's comment corpus). Replaced with a paraphrase attributed to PR #878's own body, which carries the real design note in different words. - test_sentinel_exports_unit.py / test_const_registry_protocol.py: a quote attributed to #911 silently dropped half of what the owner wrote on #719 and swapped `__all__` for "users". Replaced with a paraphrase naming #719 as where it was settled and #911 as the issue that carried it out. - test_const_enum_no_mint.py / test_const_enum_builtin_parity.py (4 sites): a "verbatim" quote of #860 silently corrected the owner's typo ("entires" -> "entries"). Paraphrased, which drops the question of reproducing or flagging the typo. - test_enum_lookup_reparent_930_unit.py: "the owner's final ruling there" had #935 as its nearest antecedent instead of #940; named #940 explicitly and paraphrased the adjacent quote. Verified: ast.parse and reST markup pairing clean on every touched file; tests/const (299 tests) and the targeted pytest sweep of all touched files (261 passed, 2013 subtests) are green. tests/corekit's full discover run shows 5 pre-existing failures in test_sentinel_exports_unit.py, confirmed identical on the unedited originals -- a cross-file test-order dependency unrelated to this change. * test(vendor,corekit): fix a surviving fabricated ruling and a wrong citation (#719) - tests/vendor/test_ipx_socket_unit.py: the "owner's ruling" attribution for keeping the hex-suffixed Xerox name survived in this file after the prior commit removed the same false attribution from four sites in test_const_enum_no_mint.py. Reworded to credit PR #878's own design note, matching the wording already used at the repaired sites. - tests/corekit/test_sentinel_exports_unit.py: the docstring cited the #719 export ruling ("only export objects, not types") as grounds for keeping ABSENT out of __all__, but ABSENT is an object, so that ruling argues for including it, not excluding it. Re-grounded the sentence on the privacy ruling already quoted ~15 lines below instead, without re-quoting it. Both changes are prose-only: tokenizing each file before and after with comments and docstrings stripped produces identical token sequences. tests/vendor passes 118/118 except one pre-existing, test-order-dependent flake in test_vendor_snapshot_restore_unit.py (reproduces identically on the pre-edit tree); tests/project/test_conventions_doc_claims.py passes 38/38. * test(corekit,const): narrow the blanket paraphrase, restoring quotations that cite correctly (#719) The last two commits paraphrased every disputed owner quotation away. That was right for one case and wrong for two: a quotation that exists nowhere has to be paraphrased, but a quotation that is real and was only cited to the wrong thread lost its audit trail for nothing, since the defect was the pointer, not the words. Per the owner's ruling, narrow the fix to match. Restored as quotations, correctly cited: - tests/corekit/test_sentinel_exports_unit.py (~L4-7) and tests/const/test_const_registry_protocol.py (~L1363): the sentinel export rule, split back into its two real sources instead of one spliced sentence -- #719's "we should ONLY export the objects ... and leave the types ... out", and #911's own "we only expose the final objects to users", with #911 noted as both executor and source. - tests/const/test_const_enum_no_mint.py (~L88, ~L1876, ~L2363) and tests/const/test_const_enum_builtin_parity.py (~L655): the #860 minting ruling, including its load-bearing first sentence ("I think we should not mint on get still actually") and the owner's own "entires" typo, marked [sic] rather than silently corrected. Left alone: the four #878 fabricated-quote sites in test_const_enum_no_mint.py, which cite no real thread and stay paraphrased, and the ABSENT privacy sentence, which is a correct paraphrase of a different ruling. Verified: ast.parse and reST markup clean on all four files; code token sequences (docstrings/comments stripped) identical before and after; each restored quotation substring-matches its source comment after whitespace/markup normalisation. tests/const: 299 OK. tests/ project/test_conventions_doc_claims: 38 OK, 1 skipped. * test(corekit,const): convert restored quotations to statements with context, per #719 The previous commit restored eight verbatim quotations to fix a narrowing that had dropped their context. The owner has since ruled that neither form is right: a narrowed paraphrase without context does not help a reader who was not in the thread, but a verbatim quotation makes the docstring read as a discussion rather than documentation. - Sentinel export rule (corekit/test_sentinel_exports_unit.py, const/test_const_registry_protocol.py): state that a module's `__all__` lists a sentinel's object but deliberately leaves its type out, and why (the type is not part of the public surface), citing #719 as where it was settled and #911 as where the implementing work belongs. - #860 minting rule, four sites (const/test_const_enum_no_mint.py x3, const/test_const_enum_builtin_parity.py): state that `get()` must not mint and only `register()` creates a new entry, and why (only IANA-registered values are legitimate and `get()` lacks the information to construct one), citing #860. Each site is fitted to its own surrounding prose rather than one paragraph pasted four times. Drops the `[sic]` each quotation carried, since there is nothing left to reproduce. - Fixed two sentences left orphaned by the quotations' removal: an antecedent ("the three") that depended on the deleted quote's wording, and a sentence whose "get() as well as _missing_" had the emphasis backwards relative to the rule's own subject. The four PR #878 paraphrase sites in test_const_enum_no_mint.py were already in this third form and are unchanged. Verified: ast.parse on all four files; tokenize with comments and docstrings stripped shows an identical token sequence before/after (prose-only); tests/const (299) and tests/project/test_conventions_doc_claims.py (38, 1 skip) pass; tests/corekit (400, 5 failures, 16 skipped) matches the documented pre-existing sentinel-identity failures. * test(corekit,const): state the remaining owner rulings in our own words, per #719 The four files still carried owner-attributed quotations beside the eight converted earlier, so each read half as documentation and half as a thread. - Replace each quoted ruling with a statement of the rule, the reason a reader needs, and the issue where it was given (#842, #864, #775, #860, #911, #719, #647, #808, #759, #857). - Rename the dangling "privacy ruling quoted below" reference to point at the statement that replaced the quotation. - Leave RFC text, code literals and ordinary prose untouched. Prose only: tokens with comments and docstrings stripped are identical before and after; tests/const 299 OK, tests/corekit unchanged (5 known). * test(const): restore ruling citations to the pull requests that carry them, per #719 tests/ is exempt from the issue-citation rule (documentation.rst, ruled on #719): the fact cited lives in the pull request, not the issue. - PR #836 restored for the TransportProtocol-extension refusal, the |-composite decoding retirement, and the stale-comment deletion; the rulings are not on #808 at all. - PR #783 for the f-string convention; PR #847 for the mint criterion. - The de-quotation stands: wording stays as statements, no quotation marks.
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.
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.
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.
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.
…ing pull requests issues The last residual of #987 in tests/vendor/test_ipx_socket_unit.py. - The retention of ``Registered by Xerox`` was credited to "a real ownership fact", which is in no maintainer comment -- it is the changelog's own phrase. The ruling is #775's: a proprietary protocol may expose no name of its own, so the company name serves as its name. - Four lines called a pull request a "GitHub issue". Every number in the file was checked against the API: #492, #507, #775 and #841 are issues; #503, #847 and #878 are pull requests. The tests/ carve-out exempts this file from preferring the issue over the pull request, not from being accurate about which a number is. - #847 is dropped rather than relabelled. The sentence claimed #775/#847 converted three Socket ranges, and #847 converted none -- its own description puts the range branches out of scope, leaving them minting via extend_enum. Relabelling would have kept the false attribution. #841 stays where it belongs, as the temporal anchor for the branch-order work. One ruling, one citation, in each of the three places that cite one. tests/vendor/test_ipx_socket_unit.py passes: 10 passed, 19 subtests, exit code 0 read from the process rather than a summary line.
Please follow the guide below
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible -- N/A, changelog centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes the remaining scope of #775.
EtherType(52 branches) andSocket(1) were the last two registries whose_missing_still minted a permanent member for an unrecognised value; both now return a non-registeringcls._unregistered_member(value, name). Measured on this head with the same AST walk the issue tracked, countingextend_enuminside_missing_/getacross every class inpcapkit/const/:That single remaining site is the standing
CGATypecarve-out — its mint is not an IANA-style range — so this takes the issue from its original 1,169 sites to the one deliberate exception.Behaviour, measured both directions with the tree under test asserted and printed each run. Before,
EtherType(0x0888)grew__members__160 → 161 and a repeat lookup returned the identical object; after, it returns<EtherType.Xyplex_0x0888: 2184>with__members__unchanged, absent from_value2member_map_, and equal-but-not-identical across lookups. Same shape forSocket(0x0010).Two things reviewers should look at rather than skim.
pcapkit/vendor/ipx/socket.py's output was byte-regenerated offline and diffed identical, becauseSocket.LINK is Noneso its crawler never touches the network.pcapkit/vendor/reg/ethertype.py's was not — that crawler fetches the live IANA CSV, which is off-limits here. Its correctness rests on a mechanical substitution verified to match exactly 52 lines, plus running the generator against the already-committedETHERTYPE_862_FIXTURE_CSVand checking the emitted lines. That is weaker than byte-identity and is stated as such.Preserving each branch's existing hex-suffixed name — required, since this change is about not registering rather than renaming — reintroduces the value-derived name shape that
test_const_enum_no_mint.py'sis_manufactured()sweep forbids. Rather than weakening that predicate, the PR adds a narrow, documentedHEX_SUFFIXED_NAME_EXEMPT_PATHScovering exactly these two files, on the grounds that the collision the check guards against cannot occur once_unregistered_membernever registers. That is a guard being narrowed, so it deserves the sharpest look in this diff.pcapkit/corekit/enum.pyis touched for one docstring claim only — it said the mint was "kept minting, on three registries (EtherType,Socket,CGAType)", which this change makes false; it now namesCGATypealone. No logic change. Three of the four test files beyond the two required ones carry pre-existing assertions that this change genuinely falsifies. Correction:tests/vendor/test_ipx_socket_unit.pyis not one of them — its code tokens are identical toedc1b32e0(1129 vs 1129) and the edit is comment-only; itsEXPECTED_MISSING_NAMESstill carries0x0010: 'Registered by Xerox_0x0010'and still passes, because the name was preserved.One commit on
edc1b32e0.tests/const/test_const_enum_lookup.py13/0/0 andtests/vendor/test_vendor_missing_body_unit.py6/0/0, withtest_const_enum_no_mint.py69/0/0,test_const_ethertype_862_unit.py9/0/0,test_const_registry_protocol.py74/0/0 andtests/vendor/test_ipx_socket_unit.py10/0/0 green after the edits.EXPECTED_CRAWLERS_WITH_CONSTANT_MISS_LINESstays at 35 — both crawlers still buildmissbyappend, so they remain invisible to that static sweep, and the pins added here are behavioural instead.