Skip to content

docs(protocols): sixth whole-repo pass over internet (#1103) - #2208

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

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

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/internet/ with its schema, data and API pages.

  • False arithmetic, in HOPOPT and IPv6_Opts.
    • A well-formed options area is 8k+6 octets: two short of a multiple of 8, not six.
    • With the (total_length - 6) // 8 floor, a short area declares 2 octets fewer than it carries, not 6 more.
    • Returning [], 0 emits the 2 fixed octets under a Hdr Ext Len of (0 - 6) // 8 == -1, not an 8-octet header.
  • Bug-report wording: the R1CounterParameter.counter comment says both codes take the eight octets, rather than that they "are affected".
  • 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). The HIP and IPv6-extension unit files, PadN/CALIPSO, the docstring contract and the tier guard all pass.

Correct the HOPOPT and IPv6-Opts padding arithmetic: a well-formed options
area is 2 octets short of a multiple of 8, not 6, and the counterfactuals in
make and _make_pad_options now match the floor division make uses. Drop the
bug-report 'are affected' from the R1_COUNTER width comment.
@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 a9ba640c8 (Sonnet).

  • Arithmetic, measured:
    • read sizes the area at len * 8 + 6, two short of a multiple of 8.
    • (total_length - 6) // 8 declares 2 octets fewer than an 8m area carries: area 8 declares 6, area 16 declares 14.
    • Schema_HOPOPT(next=6, len=-1, …).pack() gives 06ff, which is the 2 fixed octets alone.
    • IPv6_Opts uses the same formulas.
  • HIP: R1CounterParameter registers both codes with a UInt64Field counter, so "both codes take the eight" is accurate.
  • AST guard: OK on all three files. No test pins the changed text. The narrow selections give 115 and 204 passed.
  • Not blocking: Hdr Ext Len = -1 wraps to 0xff when packed, if that path were ever taken.

@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 a9ba640c8. 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/internet leg: 729 tests, 0 failures.
  • Conflicts: none against the current main.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.56% (unit tier, Python 3.15, a9ba640c8, 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 b2e92bd into main Oct 26, 2026
67 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-r6-internet 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