Skip to content

docs(reassembly): a fragment after its datagram completes starts a new buffer (#1507) - #1510

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1507-ip-reassembly-late-fragment
Oct 9, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1507-ip-reassembly-late-fragment

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description of your pull request and other information

Documents the ruling on #1507 item 1: a fragment that arrives after its datagram completed opens a new buffer, which surfaces as a separate incomplete datagram (RFC 791 §3.2, RFC 8200 §4.5, Linux, Zeek, Wireshark).

  • IP.reassembly docstring gains a Note:; docs/source/pcapkit/foundation/reassembly/ip/index.rst gains one matching sentence. No code change.
  • Checked: fragment 0 (8 octets, MF), last fragment, last fragment again gives [('PARTIAL', (3,), (b'BBBB',)), ('COMPLETE', (1, 2), b'AAAAAAAABBBB')].
  • Ran instead of make test: tests/test_docstring_contract.py 7 passed; tests/foundation/reassembly 101 passed; tests/project 419 passed, 1 skipped.

Refs #1507

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 9, 2026
@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 9, 2026
@JarryShaw
JarryShaw force-pushed the docs/1507-ip-reassembly-late-fragment branch from 1878504 to 6cf5547 Compare October 9, 2026 21:00
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 6cf554766. Cross-reviewed on Sonnet at 1878504cb; the author ran Opus.

  • The reviewer re-ran the late-fragment example from the worktree and got PARTIAL (3,) then COMPLETE (1, 2). Feeding an unrelated packet 98 s later turned the stray buffer into TIMEOUT (3,), through ip.py:300-313.
  • It flagged two verbs as too strong. RFC 791 §3.2 gives example procedures, not requirements, and RFC 8200 §4.5 permits this behaviour without requiring it.
  • I applied both suggestions in 6cf554766, and that is the only change from 1878504cb. The docstring now reads "as in the RFC 791 §3.2 reassembly procedure" and "is permitted by RFC 8200 §4.5". tests/test_docstring_contract.py passes: 7 passed, 12 subtests.
  • The .rst sentence did not need changing.

@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 9, 2026
@JarryShaw
JarryShaw force-pushed the docs/1507-ip-reassembly-late-fragment branch from 6cf5547 to 3d2b060 Compare October 9, 2026 21:24
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict carried to 3d2b0603f: GOOD TO GO. This is a pure rebase onto main 6af87f608, after #1509 merged. The range-diff is =, and the patch-id is unchanged at c37aa3bd10f0. tests/test_docstring_contract.py and tests/foundation/reassembly gave 107 passed. The one failure, test_tcp_runtime, comes from a missing generated fixture (test.pcap), and main fails it the same way.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Coverage: 89.65% (unit tier, Python 3.14, 3d2b0603f, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 4 93.55%
pcapkit/const 18795 958 2356 871 90.99%
pcapkit/corekit 2125 66 686 33 96.19%
pcapkit/dumpkit 242 2 88 2 98.79%
pcapkit/foundation 2665 99 934 49 94.78%
pcapkit/interface 112 7 40 5 92.11%
pcapkit/protocols 17086 238 4628 190 97.98%
pcapkit/toolkit 539 74 168 3 84.58%
pcapkit/utilities 431 4 124 4 98.56%
pcapkit/vendor 4409 2342 1006 157 43.25%

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

@JarryShaw
JarryShaw merged commit c974ada into main Oct 9, 2026
36 checks passed
@JarryShaw
JarryShaw deleted the docs/1507-ip-reassembly-late-fragment branch October 9, 2026 21:50
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 9, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 9, 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