docs(corekit): state the enum.py rulings as statements, not quotations - #990
Conversation
|
NEEDS CHANGES at It asserts that
Only three Second, the passage resolves the open conditional raised on #842 about Going in with the fix: three lines now exceed 100 characters ( Confirmed otherwise: 14 of the 15 sites are faithful, and the change is prose-only — 703 code tokens identical with every string masked. The red CI is not this pull request. scapy published 2.8.0, which dissects the SCTP DATA payload by PPID and returns |
3193ed4 to
d2b579e
Compare
The cross-review on #990 found the alias passage asserting that AppType and the concrete enumerations are an exception which must call register_alias for members that do not exist yet. No registry does that, and AppType is stricter than the base rather than exempt: - base, enum.py:615-618, raises when the value is in no member map; - AppType.register_alias, const/reg/apptype/apptype.py:2860-2871, raises when __registry__ is None, when getlist(port) is empty, and when the name is already on that port. Its own docstring requires port to carry a member. Only three register_alias definitions exist, the third being the vendor template emitter. The passage also resolved an open conditional on #842 into a settled fact plus a "must"; it now states what the code does. - Re-wrap six passages: maximum line length 115 -> 96, restoring main's. - "the rule set on" read as a compound noun at two sites; reworded. - register's prose said "names" against its single name parameter. Prose only: tokenising with every string masked gives identical sequences before and after. tests/corekit: 400 passed, 16 skipped, 658 subtests.
|
Fix pushed as The blocker is resolved, and a second reviewer on a different model reached the same conclusion independently: the asserted exception exists nowhere. The passage now states that the existing-member requirement holds on every registry, Also in: maximum line length back to 96 from 115, restoring One correction to my own verdict, which was wrong. I listed Prose-only re-verified by me at the new head: tokenising with every string masked gives identical sequences, 574 tokens. A fresh cross-review is running against |
|
NEEDS CHANGES at Two sites say all four methods exist on every const enumeration — All three are declared #842's own close does not support the unqualified reading either: its last comments are the maintainer opting to take option (1) and track the remaining work, after which it closed as done with work still outstanding. The fix is to restore the modal and narrow the noun from "enumeration" to "registry", which is both true and what #842 meant. Non-blocking, going in with it: Confirmed otherwise, and two measurement disputes resolved. Prose-only holds: the ASTs are identical once docstrings are normalised, all seven changed string tokens are docstrings, zero non-docstring strings moved, and the unmasked-comment comparison matches too. The three token counts that looked inconsistent — 574, 703, 575 — differ only by the One gap stated honestly: the reviewer could not reproduce the full |
|
Correction to my own comment above: the last paragraph is wrong. The It had looked stalled because The blocking finding is unchanged and never depended on this: |
The cross-review on #990 found the de-quoted #842 clause asserting a universal that this tree falsifies. Measured by import: of 130 const enum classes, 127 carry all four methods and 3 carry neither register nor register_alias -- CommandType and ConformanceRequirement in const/ftp/command.py, and TransportProtocol in const/reg/apptype/apptype.py. All three subclass EnumLookup, the bare tier #877 split off precisely so a closed set is not handed register, which this same module docstring explains thirty lines above the sentence that contradicted it. The source clause was prescriptive, and #842 closed with the remaining classes tracked rather than with the spec met everywhere, so the prose now reads as a contract the registry tier is held to: - Both sites say the four methods are to exist on every const *registry*, not every const enumeration, and the module docstring now states that #877's closed sets sit outside that contract. - register's prose said "names" against its single name parameter. - The claim that an alias adds a name rather than a member is scoped to this base, because AppType's override mints a real one through extend_enum: measured, TCP.register_alias takes len(TCP) from 6147 to 6148 with __members__ and _member_names_ growing alike. - One clause distinguishes #842's AppType exception, which is about where an alias is routed, from whether the member being aliased must already exist. Prose only: token sequences identical with strings masked, all three differing string tokens are docstrings, the AST with docstrings blanked compares equal, and maximum line length stays 96. The four enum test files: 130 passed, 112 subtests.
|
Fixed and pushed as The universal is gone from both sites, and the fix agent reproduced my measurement independently before writing: 130 const enum classes, 127 carrying all four methods, 3 carrying neither Also in: The scoping item turned up something worth stating, because it means the base docstring was wrong about Verified by me rather than relayed: token sequences identical with every string masked, all three differing string tokens are docstrings, the AST with docstrings blanked compares equal, and maximum line length stays at 96 — Label back to |
|
NEEDS CHANGES at The parenthetical at
That Note the progression, because it is the useful part: round 1 invented an exception that no registry implements, round 2 flattened a modal into a universal, round 3 denied a hedge exists. Three different ways to lose the same qualifier. The worker is choosing between deleting the clause and rendering the hedge properly, with instructions to overrule me if my reading of #842 is wrong again. Second, non-blocking and also introduced here: Confirmed otherwise, and more strongly than before. "Every const registry" is exactly right in both directions — the set carrying all four methods and the set of |
a901e9e to
37d4aef
Compare
The cross-review on #990 found the alias passage asserting that AppType and the concrete enumerations are an exception which must call register_alias for members that do not exist yet. No registry does that, and AppType is stricter than the base rather than exempt: - base, enum.py:615-618, raises when the value is in no member map; - AppType.register_alias, const/reg/apptype/apptype.py:2860-2871, raises when __registry__ is None, when getlist(port) is empty, and when the name is already on that port. Its own docstring requires port to carry a member. Only three register_alias definitions exist, the third being the vendor template emitter. The passage also resolved an open conditional on #842 into a settled fact plus a "must"; it now states what the code does. - Re-wrap six passages: maximum line length 115 -> 96, restoring main's. - "the rule set on" read as a compound noun at two sites; reworded. - register's prose said "names" against its single name parameter. Prose only: tokenising with every string masked gives identical sequences before and after. tests/corekit: 400 passed, 16 skipped, 658 subtests.
The cross-review on #990 found the de-quoted #842 clause asserting a universal that this tree falsifies. Measured by import: of 130 const enum classes, 127 carry all four methods and 3 carry neither register nor register_alias -- CommandType and ConformanceRequirement in const/ftp/command.py, and TransportProtocol in const/reg/apptype/apptype.py. All three subclass EnumLookup, the bare tier #877 split off precisely so a closed set is not handed register, which this same module docstring explains thirty lines above the sentence that contradicted it. The source clause was prescriptive, and #842 closed with the remaining classes tracked rather than with the spec met everywhere, so the prose now reads as a contract the registry tier is held to: - Both sites say the four methods are to exist on every const *registry*, not every const enumeration, and the module docstring now states that #877's closed sets sit outside that contract. - register's prose said "names" against its single name parameter. - The claim that an alias adds a name rather than a member is scoped to this base, because AppType's override mints a real one through extend_enum: measured, TCP.register_alias takes len(TCP) from 6147 to 6148 with __members__ and _member_names_ growing alike. - One clause distinguishes #842's AppType exception, which is about where an alias is routed, from whether the member being aliased must already exist. Prose only: token sequences identical with strings masked, all three differing string tokens are docstrings, the AST with docstrings blanked compares equal, and maximum line length stays 96. The four enum test files: 130 passed, 112 subtests.
|
Fixed and pushed as The worker took the harder of the two options I offered and was right to: rather than deleting the clause, the passage now states what #842 settled and what it left open, then answers the open part from behaviour — Both contradicting lines now read "generated registry". The three closed sets are themselves generated, so "generated" was never an escape hatch for the claim that every generated I also sent it back once more before committing, for something small that matters for consistency: the fix had left a 52-column line whose successor fit in the remaining space. That is the same defect #992 was sent back for an hour earlier, and the check that catches it is not the maximum line length — which was unchanged and therefore silent — but whether a short line's successor actually fails to fit. The paragraph is now 75-82 columns with only its final line short. Verified by me at the strictest setting available: 753 tokens identical with no exclusions at all — Label stays |
|
GOOD TO GO at I am holding the label at
"leaving open only whether…" is accurate against the pre-existence ruling, whose sole residual is that clause, and false against #842 as a whole — its body carries five open design questions, which I counted. Dropping "only" costs nothing. "#842 settled on…" may or may not be too firm, and I have asked for it to be checked rather than changed: the tentative phrasing came first, but a later comment restates the rule flatly and the issue closed on a ruling. If it genuinely settled, "settled on" is right and a hedge added there would be the same error pointing the other way. Three new positive claims were each independently derived and all hold, including one I had not thought to ask for: "of that very registry" is earned — Two findings I am deliberately not fixing here, with reasons. Verified mechanically: 753 tokens identical with no exclusions at all, all seven differing string tokens are docstrings on both sides, raw |
Part of #987 (group A), following the direction set out in #719. - Replace the 15 quoted maintainer passages in pcapkit/corekit/enum.py with statements of the rule, the reason, and the issue where it was settled (#877, #842, #775, #923). - Two sites that cited nothing now inherit their sibling's issue (#877 for the range-validation hook, #842 for "all four methods exist on every const enum"); the two register_alias passages are sourced to #842. - Docstrings only: the token stream with string literals masked is identical to origin/main. tests/corekit under plain unittest: 400 tests, 5 failures (the documented purge_modules limitation), 16 skipped.
The cross-review on #990 found the alias passage asserting that AppType and the concrete enumerations are an exception which must call register_alias for members that do not exist yet. No registry does that, and AppType is stricter than the base rather than exempt: - base, enum.py:615-618, raises when the value is in no member map; - AppType.register_alias, const/reg/apptype/apptype.py:2860-2871, raises when __registry__ is None, when getlist(port) is empty, and when the name is already on that port. Its own docstring requires port to carry a member. Only three register_alias definitions exist, the third being the vendor template emitter. The passage also resolved an open conditional on #842 into a settled fact plus a "must"; it now states what the code does. - Re-wrap six passages: maximum line length 115 -> 96, restoring main's. - "the rule set on" read as a compound noun at two sites; reworded. - register's prose said "names" against its single name parameter. Prose only: tokenising with every string masked gives identical sequences before and after. tests/corekit: 400 passed, 16 skipped, 658 subtests.
The cross-review on #990 found the de-quoted #842 clause asserting a universal that this tree falsifies. Measured by import: of 130 const enum classes, 127 carry all four methods and 3 carry neither register nor register_alias -- CommandType and ConformanceRequirement in const/ftp/command.py, and TransportProtocol in const/reg/apptype/apptype.py. All three subclass EnumLookup, the bare tier #877 split off precisely so a closed set is not handed register, which this same module docstring explains thirty lines above the sentence that contradicted it. The source clause was prescriptive, and #842 closed with the remaining classes tracked rather than with the spec met everywhere, so the prose now reads as a contract the registry tier is held to: - Both sites say the four methods are to exist on every const *registry*, not every const enumeration, and the module docstring now states that #877's closed sets sit outside that contract. - register's prose said "names" against its single name parameter. - The claim that an alias adds a name rather than a member is scoped to this base, because AppType's override mints a real one through extend_enum: measured, TCP.register_alias takes len(TCP) from 6147 to 6148 with __members__ and _member_names_ growing alike. - One clause distinguishes #842's AppType exception, which is about where an alias is routed, from whether the member being aliased must already exist. Prose only: token sequences identical with strings masked, all three differing string tokens are docstrings, the AST with docstrings blanked compares equal, and maximum line length stays 96. The four enum test files: 130 passed, 112 subtests.
Round 3's review found the parenthetical this pull request added asserting the opposite of what #842 says, and that instruction was mine. #842 carries two AppType exceptions, not one: the issue body has the routing exception, and comment 5852772329 answers whether the generic register_alias requires an existing member with "always, unless AppType and the concrete enumerations need to call it on non-existing members". That unless is a carve-out on exactly the question the parenthetical said the issue was not about. main's text was lossy by omission -- it carried the first half of that sentence and dropped the unless. The parenthetical turned the omission into a positive false claim, which is worse, and is the third way this pull request has lost the same qualifier: round 1 invented an exception no registry implements, round 2 flattened a modal into a universal, round 3 denied the hedge existed. - The passage now states what #842 settled and what it left open, then answers the open part from behaviour: AppType's override requires the port to carry a member of that registry already. It names the concrete enumerations too, which the comment does and my instruction had dropped. - "stricter still" is gone rather than qualified. The base tests membership in _value2member_map_ and AppType tests __registry__.getlist(port), so it was never a strengthening of one predicate. - Two untouched lines said every generated enumeration under pcapkit.const inherits from EnumRegistry, which the sentence added last round contradicts. Both now say registry: the three closed sets are generated and inherit EnumLookup, so "generated" was no escape hatch. - The paragraph is re-flowed to 75-82 columns. The edit had left a 52-column line whose successor fit, the same defect #992 was sent back for. Prose only, at the strictest setting: 753 tokens identical with no exclusions at all and only strings masked, both differing string tokens are docstrings, the AST with docstrings blanked compares equal, maximum line length stays 96. The four enum test files: 130 passed, 112 subtests.
… residual Round 4 passed with no blocker, but two of its notes were the same qualifier-firming this pull request had already done three times, so they are fixed rather than carried. The tier-1 bullet said every generated registry under pcapkit.const inherits the four methods from EnumRegistry. Measured across all 127: 118 take every method from the base tiers, 5 are the AppType family overriding all four, and 4 carry a hand-written get -- Command and FEATCode in const/ftp/command.py, Method in const/http/method.py, OptionType in const/pcapng/option_type.py. So the exception set is nine, not five; carving out only AppType would have left the sentence false for the other four. - The bullet now excepts the overrides listed below it and the hand-written get overrides, rather than asserting a universal with nine counter-examples. - "leaving open only whether" loses the "only". Against the pre-existence ruling that word is accurate, since the unless clause is its sole residual, but against #842 as a whole it is false: the body carries five open design questions. - "settled on" stays, checked rather than softened. The first statement of the rule is tentative, but 5852780815 records the contract outright, 5855971633 and 5856019103 restate it flatly, and the issue closed as completed. Adding a hedge where the record is firm would be the same error pointing the other way. Left for a change of its own, both pre-existing: get and get_all are defined on EnumLookup rather than EnumRegistry, so "inherits them from here" is true only transitively; and the tier-2 bullet says the sub-base routes all four through _dispatch where only get and get_all do. Prose only: 753 tokens identical with no exclusions at all and only strings masked, both differing string tokens are docstrings, the AST with docstrings blanked compares equal while the raw dump differs, maximum line length stays 96. Both edited paragraphs re-wrapped so no line has an absorbable successor. The four enum test files: 130 passed, 112 subtests.
37d4aef to
e5836e8
Compare
|
Fixed and pushed as My measurement in the last brief was incomplete, and the worker caught it. I said five registries do not inherit the four methods from The bullet now excepts the overrides listed below it and the hand-written "settled on" stays, checked rather than softened. The first statement of the rule is tentative, but Two things deliberately left for a change of their own, both pre-existing and both verified: Verified by me: 753 tokens identical with no exclusions at all, both differing string tokens are docstrings, the AST with docstrings blanked compares equal while the raw dump differs, maximum line length stays 96, and both edited paragraphs were re-wrapped so no line has an absorbable successor — the worker reported its first pass leaving one and fixing it before reporting. Label stays |
|
GOOD TO GO at My corroboration for keeping "settled on" was partly wrong, and I published it. I cited The conclusion survives on better grounds, which the review supplied: the record holds one maintainer statement of the rule, shaped "X unless Y". The docstring renders it as settled on X with Y left open — mapping the hedge onto the residual rather than losing it. The uncertainty is specifically about Y, so softening "settled on" would hedge twice over one uncertainty. Corroborated by "Line length verified" has been passing on a metric that cannot see prose. The file maximum is 96 on both sides — but that is an unchanged Verified otherwise: the 118 / 5 / 4 census reproduced independently, with a static cross-check that 123 Word-level diff across every docstring gives exactly four changes — the three fixes and nothing else. Prose-only at 754 tokens including Labelling |
|
Addendum to the verdict above — two non-blocking notes from the review's final pass that my comment did not carry. The verdict is unchanged. The bullet rewrite also dropped the word "generated" — "Every generated registry" became "The registries". I described the change as three fixes and reported four word-level operations, which is accurate but did not itemise this one. It is harmless, and checked: all 127 const registries are crawler-generated anyway, the exception clause covers all nine non-conformers, and the preceding paragraph already separates registries from #877's closed sets. If anything it is more accurate, since it no longer implies a distinction that does not exist in that population. "the overrides below" does not formally cover all five |
tests/corekitpasses under plainunittest; prose-only, so no new test caseWhat is the purpose of your pull request?
docs— documentation onlyDescription
Group A of #987 (see also #719):
pcapkit/corekit/enum.pyonly. The 15 reST-emphasised maintainer quotations become statements of the rule, the reason, and the issue where it was settled (#877, #842, #775, #923). No "verbatim" added; the one remaining use (copied verbatimat theLINEtemplate) is about code, not a quotation.Sources: the two uncited
register_aliaspassages trace to a #842 comment; the range-validation site inherits #877; "always exist on the const enums" inherits #842. The #775 ruling was first made in review of #771 and the #923 ruling in review of #921; both are cited by the issue that carries them.Verification:
ast.parseOK; token streams (strings masked) identical toorigin/main; no*"left;tests/corekit400 tests, 5 failures (documentedpurge_moduleslimitation), 16 skipped;test_conventions_doc_claims38 tests, 1 skip.