Repository navigation
docs(protocols): cite the extension-header registry in ESP/AH, not protocol-numbers-1.csv - #938
Conversation
|
NEEDS CHANGES at Both docstrings now read (ESP shown; AH is identical in shape):
The sentence asserts IPv6 extension-header membership. The parenthetical offers an IPv4 placement as evidence. That is a non-sequitur — an IPv4 fact cannot support an IPv6 claim — and it is the same failure mode as quoting RFC 8200 §4.5 unscoped, which was corrected on #895. The section is the right one; it contains the sentence you actually want. Fetched verbatim from RFC 4303 §3.1.1 — "In the IPv6 context, ESP is viewed as an end-to-end payload, and thus should appear after hop-by-hop, routing, and fragmentation extension headers." RFC 4302 §3.1.1 — "In the IPv6 context, AH is viewed as an end-to-end payload, and thus should appear after hop-by-hop, routing, and fragmentation extension headers." That is direct primary-source support for treating each as an IPv6 extension header: it places them among the extension headers, ordered after hop-by-hop, routing and fragmentation. Cite that, not the IPv4 diagram. Verified and good otherwise: the registry figures are right — Separately, and not for this PR: |
5af1576 to
097c3cb
Compare
|
NEEDS CHANGES at 1. The new parenthetical is now an overstatement, and it contradicts the docstring it sits in. Worse, and decisive —
2. I measured the narrower form and it costs nothing — So round 1's diagnosis was right but my prescription was half a fix: the IPv4 citation was attached to the wrong claim, and I let it be replaced by an overstatement of the right one. The accurate framing is registry membership for the extension-header half, RFC §3.1.1's IPv4 sentence for the standalone half — two claims, two sources. Confirmed otherwise: registry figures right; nothing lost against |
097c3cb to
e783892
Compare
|
NEEDS CHANGES at First, my framing was wrong. I briefed the reviewer that the new standalone-protocol inference might be round 2's error in a new costume. It is not. A. "Second base" is also a docs term of art, not a code idiom: 0 hits in B. C. A guard gap, and it protects the worse defect. Cleared on the rest, with the assertion matrix measured across all four revisions (base fails 6/7, r1 4/7, r2 2/7, r3 passes 7/7, both classes): the paraphrase is faithful and matches how UNVERIFIED: no Sphinx build, so the new paragraph's rendering is inferred from the pre-existing line-initial-role pattern rather than confirmed. |
…otocol-numbers-1.csv (#931) `ESP` and `AH` justified their double inheritance by citing `protocol-numbers-1.csv`'s *IPv6 Extension Header* column -- the derived signal #926 repointed the const generator away from, precisely because it disagreed with the authoritative registry (it flagged BIT-EMU/147 as an extension header; the real registry omits it). - esp.py:978-993 / ah.py:54-67 -- extension-header *membership* now rests on IANA's *IPv6 Extension Header Types* registry and this package's own `ExtensionHeader`, per conventions.rst's "being in that registry is what makes something an extension header" ruling. RFC 4303/4302 section 3.1.1 is quoted too, but only for its actual IPv6-context placement sentence, not as membership evidence -- an earlier revision rephrased that sentence as "places it among the IPv6 extension headers", overstating the RFC and contradicting this docstring's own `Note:` on RFC 8200 declining ESP's extension-header status; caught in review and reworded to a plain placement description. - Added the standalone-protocol half #931 asks for: the section's separate IPv4-context sentence is the primary-source evidence that ESP/AH also travel directly as an IPv4 payload, which *qualifies* an already-standalone header for a second base -- it does not *make* the header standalone (conventions.rst's MH case settles that), and the RFC has no say in which base is named. An earlier revision said the RFC "makes it a standalone protocol" and "names IPsec as the second base"; the latter was positionally false (`ESP.__bases__` puts IPsec first, not second) and unsupported by the cited section. Caught in review and reworded to match hip.py's own phrasing. - Checked hip.py for the same stale citation; already correct. Regression tests assert the registry citation and the corrected prose, ban the specific wrong phrasings from all three earlier fix attempts, and pin the registry-membership clause structurally (via a regex on the parenthetical immediately following "registry lists ... at <n>") so that a future rewording of the IPv4 evidence, not just this exact phrase, would still be caught if attached to the wrong claim. All fail against 3823758 and against the fix's three prior revisions, before passing here. Build: mypy 321/38 (unchanged), pylint 8.67/10 exit 30 (unchanged), isort clean, targeted docstring tests pass (full esp/ah suite not re-run: test_esp_unit.py's module import alone is ~11 minutes).
e783892 to
ec1b902
Compare
|
GOOD TO GO at All three points fixed, verified by me against the tree:
And point D was answered better than I asked for. I said to pin the claim rather than the phrase if possible. It did: membership_clause = re.search(r'registry lists ``ESP`` at 50 \((.*?)\)', doc)
self.assertIsNotNone(membership_clause, 'could not locate the membership clause')
self.assertNotIn('IPv4', membership_clause.group(1))That extracts exactly the parenthetical attached to the membership sentence and forbids IPv4 evidence inside it, while leaving IPv4 prose free everywhere else — where #931 actually wants it, for the standalone-protocol half. Verified on the tree: the clause is located for both classes and contains no The round-4 assertions were proven to fail on all four prior revisions — I did not spend a fifth review pass on this. The delta is prose plus test assertions, and I verified both of round 4's blocking claims personally before they were fixed and the fix itself after. Flag it if you would rather every round got a fresh reviewer regardless. Unpublished and awaiting you. |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
docs— documentation onlyDescription of your pull request and other information
Fixes #931.
ESPandAHjustified their double inheritance by citingprotocol-numbers-1.csv's IPv6 Extension Header column — the derived signal #926 repointed the const generator away from because it disagreed with the authoritative registry (it flaggedBIT-EMU/147, which the real registry omits).Both docstrings now cite IANA's IPv6 Extension Header Types registry plus the per-header RFC section (RFC 4303 §3.1.1 for ESP, RFC 4302 §3.1.1 for AH) that places each header after an IPv4 header — the same test
conventions.rst's extension-header-subclassing section uses. The "package's ownExtensionHeaderregistry agrees" clause is kept, now as a check against the authoritative source rather than corroboration of the wrong one.hip.pyalready cites the correct registry and RFC 7401, so it needed no change.Added one regression test per protocol asserting the docstring names the new registry/RFC section, not
protocol-numbers-1.csv; both fail against382375811and pass with this change.