Skip to content

docs(protocols): sixth whole-repo pass over link and transport (#1103) - #2207

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1103-r6-linktrans
Oct 26, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1103-r6-linktrans

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, round 6: the sixth whole-repo prose pass, covering pcapkit/protocols/{link,transport}/ with their schema, data and API pages.

  • Stale claims: the bool NOTEs in ARP._make_addr_resolve and ARP._make_proto_resolve said a bool would fail later as a TypeError. Since fix(arp): a bool or int protocol address with a non-IP ptype raises TypeError, not FieldValueError #2166 the fallback branches raise ProtocolError. Measured on this head: ARP(sha=5) and ARP(ptype=0x1234, spa=5) raise ProtocolError, and the bool forms raise FieldValueError.
  • Change-relative: the L2TPv2._make_data NOTE (fix(l2tp): L2TPv2.from_data drops the L flag and the Length field #1172) is in the conditional, not the past tense.
  • Counts: "The two concrete tags" becomes "The concrete tags", in vlan.py and vlan.rst.
  • Grammar: "EtherTypes also means" becomes "mean".
  • Scope: comments and docstrings only. With docstrings stripped, every changed file has the same AST as main.
  • Tests run: tests/project/test_docs_* plus test_conventions_doc_claims (104 passed). tests/protocols/link plus test_docstring_contract (116 passed).

Correct the ARP bool-guard notes: without the guard a bool reaches the
generic ProtocolError, not a TypeError (#2166). State the L2TPv2
total_length note timelessly; drop the count of concrete VLAN tags and
fix a verb agreement.
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 73213d1de (Sonnet).

  • AST guard: OK on arp.py, l2tpv2.py and vlan.py.
  • ARP claims, re-run on the head: sha=5 and ptype=0x1234, spa=5 raise ProtocolError. Every bool form, on all four address fields, raises FieldValueError.
  • L2TPv2: the conditional NOTE still states the fix(l2tp): L2TPv2.from_data drops the L flag and the Length field #1172 defect correctly.
  • Text pins: none. The docs, link and docstring-contract selection gives 220 passed.
  • Not blocking: "the two tags" remains in vlan.py/vlan.rst, which reads as protocol fact (C-Tag and S-Tag, a fixed pair).

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 25, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 25, 2026
@JarryShaw

JarryShaw commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner Author

Ready to merge at 73213d1de. Part of #1103 (round 6).

  • Review: Sonnet GOOD TO GO, first round.
  • CI: all checks complete, Required checks passed SUCCESS, 0 failed.
  • KTLO: 12 legs, no warnings.
  • Ordering: merged into main and run. protocols leg: 1924 tests, 0 failures.
  • Conflicts: none against the current main.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.56% (unit tier, Python 3.15, 73213d1de, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 881 2618 867 92.11%
pcapkit/corekit 2589 74 816 37 96.51%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2994 23 1038 25 98.81%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17433 218 4584 185 98.15%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 504 7 146 5 98.15%
pcapkit/vendor 4432 1988 1018 167 51.87%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@JarryShaw
JarryShaw merged commit a4c6711 into main Oct 26, 2026
67 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-r6-linktrans branch October 26, 2026 03:05
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 26, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant