Skip to content

docs(tcp): name what the MPTCP and option makers raise; give Quick-Start rate its unit (#2235) - #2247

Merged
JarryShaw merged 1 commit into
mainfrom
docs/2235-tcp-raises-rate-unit
Oct 26, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/2235-tcp-raises-rate-unit

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Closes #2235.

  • Raises: sections:
    • TCP._make_mptcp_join raises ProtocolError for a flag combination other than SYN, SYN/ACK or ACK.
    • TCP._make_tcp_options names the ProtocolErrors its option makers raise, plus ProtocolNotImplemented from _make_index for an unknown MPTCP subtype or checksum algorithm name.
  • Quick-Start rate fields: the TCP QuickStartResponse.req_rate and the IPv4, HOPOPT and IPv6-Opts rate fields state the unit, kbps (40 * 2 ** N, or 0 when N is 0), per RFC 4782 Section 3.1. Each gets a versionchanged:: 1.5.0 noting that the field is an int, not a float (fix(tcp): Quick-Start rate parses as float and a Fast Open cookie request as None, against their annotations #2167), matching FastOpenCookie.
  • Scope: docstrings and #: comments only, with the AST guard OK on all 5 files.
  • Tests run: docs, conventions and docstring contract give 111 passed. The TCP, IPv4 and IPv6-option tests give 230 passed, and the IPv6 extension tests 116 passed.

…art rate its unit (#2235)

TCP._make_mptcp_join raises ProtocolError on a flags combination that is
none of SYN, SYN/ACK and ACK, and TCP._make_tcp_options passes on what its
option makers raise, yet neither had a Raises section. Add one to each:
ProtocolError for both, plus ProtocolNotImplemented for a named MPTCP
subtype or alternate checksum algorithm not in its namespace.

The TCP Quick-Start Response req_rate and the IPv4, HOPOPT and IPv6-Opts
Quick-Start rate fields hold an int since #2167 but gave no unit. State
that they are in kbps, 40 * 2 ** N or 0 for N = 0 (RFC 4782 Section 3.1),
and add a versionchanged 1.5.0 for the float to int change, matching the
FastOpenCookie note from the same fix.

Docstring and #: comments only; the AST guard passes, so there is no
fail-without-fix test.
@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 26, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 957f2be1b (Sonnet).

  • Raises, triggered on the head: MPTCP join with neither SYN nor ACK raises ProtocolError. An unknown MPTCP subtype or checksum algorithm name raises ProtocolNotImplemented, and an oversized user timeout raises ProtocolError.
  • Unit: RFC 4782 Section 3.1 gives K*2^N bps with K = 40,000, and 0 for N = 0, which matches the code and the kbps docs.
  • versionchanged: v1.5.0b14 has / 1000 (float) at all seven sites, and the head has // 1000, so the notes are accurate.
  • Tests: 205 passed.
  • Not blocking: the TCP option is defined in RFC 4782 Section 4.2, and Section 3.1 is its rate format.

@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 26, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 26, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 957f2be1b. Closes #2235.

  • Review: Sonnet GOOD TO GO, first round. The kbps unit was checked against the RFC 4782 text.
  • 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, 957f2be1b, 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 merged commit e252db9 into main Oct 26, 2026
68 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 26, 2026
@JarryShaw
JarryShaw deleted the docs/2235-tcp-raises-rate-unit branch October 26, 2026 14:53
@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.

docs(tcp): MPTCP join and option makers lack Raises, Quick-Start rate lacks unit and versionchanged

1 participant