Skip to content

docs(protocols): fifth whole-repo pass over link and transport protocols (#1103) - #2152

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1103-r5-linktrans
Oct 25, 2026
Merged

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

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, round 5: the link and transport slice, on main 4c3d30163. This PR changes prose only; the AST with docstrings stripped is identical on all 7 changed .py files.

  • Registry comments on TCP.__option__, __mp_option__, and SCTP.__chunk__/__parameter__/__cause__ claimed a missing method name makes the value parse by itself. In fact a missing name falls back to *_donone/*_unknown, and a non-string value is a (parser, constructor) tuple. The register_* meth arguments now say so too.
  • TCP.__proto__: the comment said HTTP dispatch avoids a trial parse, but HTTP._guess_version trial-parses as a last resort. It also said UDP binds a proxy; UDP binds the same HTTP class.
  • ARP._make_proto_resolve: FieldValueError is raised for invalid and wrong-version addresses, not only for bools (checked at runtime).
  • L2TP module and l2tp.rst: dropped the wrong HTTP/3–QUIC analogy for L2F/L2TPv1. Link._read_protos returns an EtherType.
  • Tests: tests/project/test_docs_* plus test_conventions_doc_claims: 94 passed. tests/protocols/{link,transport} passes once the fixture captures are generated.

…ols (#1103)

- TCP/SCTP option, chunk, parameter and cause registries: document that a
  non-string value is a (parser, constructor) pair and name the fallback
  methods, in the registry comments and the register_* meth arguments.
- TCP __proto__ comment: HTTP dispatch trial-parses as a last resort; UDP
  binds the same class, not a proxy.
- ARP._make_proto_resolve: FieldValueError also covers an invalid or
  wrong-version IP address.
- L2TP: drop the inaccurate HTTP/3-QUIC analogy for L2F/L2TPv1.
- Link._read_protos returns an EtherType, not an internet-layer enum.
- TODO grammar in the link and transport package inits.
@JarryShaw JarryShaw added the docs Pull requests that change documentation only (docs: subject prefix) label Oct 25, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 25, 2026
@JarryShaw JarryShaw added the review: running A cross-review is in flight against the current head - no verdict yet label Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 3932865e1 (Sonnet review).

  • TCP and SCTP dispatch: read from the code. A string value falls back to *_donone/*_unknown, which exist for every kind, and a non-string value is indexed [0]/[1].
  • HTTP._guess_version: it trial-parses only as a fall-through, and UDP binds the same HTTP class.
  • ARP: FieldValueError reproduced for invalid, wrong-version and bool addresses.
  • L2TP: the HTTP/3–QUIC analogy was wrong, and its replacement is accurate.
  • Link._read_protos: returns Enum_EtherType.get(...).
  • Checks: no new counts, timed context or file:line anchors; nothing in tests/ pins the changed text. The AST guard passes on all 7 files, and tests/project/test_docs_* plus the conventions test pass (94).
  • UNVERIFIED: the new :attr:/:meth: cross-references were not built.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, 3932865e1, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 880 2618 866 92.12%
pcapkit/corekit 2589 75 816 37 96.48%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2971 23 1036 25 98.80%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17418 219 4574 185 98.14%
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

Copy link
Copy Markdown
Owner Author

Ready to merge at 3932865e1.

  • Review: Sonnet GOOD TO GO.
  • CI: all 61 CheckRuns passed; none failed or are still running. Required checks passed is SUCCESS, and the KTLO legs raised no warnings.
  • Ordering: I merged this PR into main and ran tests/project plus the root modules under the plain unittest ordering leg: 2288 tests, 0 failures, 0 errors.
  • Merge conflicts: none with the other round-5 PRs.

@JarryShaw
JarryShaw merged commit 7094ba9 into main Oct 25, 2026
65 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 25, 2026
@JarryShaw
JarryShaw deleted the docs/1103-r5-linktrans branch October 25, 2026 13:53
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 25, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone 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