Skip to content

docs(tests): state application, transport and vendor tests' behaviour without change-relative narrative (#1103) - #2204

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1103-cleanup-application
Oct 25, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1103-cleanup-application

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, ruling 1: test narratives in tests/protocols/application/, tests/protocols/transport/ and tests/vendor/ now state the behaviour, not how a change produced it. This is the last of the seven slices.

  • Rewrites:
    • "now" and "used to" become timeless.
    • Old-tree proofs ("Pre-fix this packed 11 …") become the defect each test guards against.
    • PR-history module docstrings now describe current behaviour. This covers MPTCP join/capable/subtype/length, the vendor snapshot-restore and destination-path tests, and the HTTP tests.
    • Counts and file:line anchors in rewritten prose are dropped.
  • Stale claims corrected against the code:
    • The HTTP/2 preface is skipped under read(version=2) (fix(http): the HTTP/2 connection preface is lost on rebuild #1242), not refused.
    • MP_CAPABLE uses > 12, not == 20.
    • A note claiming a failing subTest reports its parent as passed now matches what pytest 9 does: the failing subtest is a counted SUBFAILED entry, and the parent counts as passed.
  • Kept:
    • CPython, IANA and Wikipedia history.
    • Version-pinned measurements.
    • "used to" in the sense of "used for".
    • Change-relative string literals and identifiers, which are code.
  • Scope: comments and docstrings only. With docstrings stripped, every changed file has main's AST.
  • Tests run: application (244), transport (243), vendor (169), and the tier guard with the docstring contract (140) pass.
  • Overlap: fix(tcp): keep Quick-Start rate an int and a Fast Open cookie request bytes (#2167) #2185 shares test_tcp_udp_unit.py and merges cleanly.

@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) test Pull requests that add or correct tests (test: 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: NEEDS CHANGES at 530d068ea (Sonnet).

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 25, 2026
… without change-relative narrative (#1103)

Rewrites comments and docstrings that described a fix relative to the
tree before it ("now", "used to", "pre-fix", "before the fix", "the
old X", PR-round history) as statements of the behaviour and of the
defect each test guards against. Prose only: the AST with docstrings
stripped is unchanged in every file.
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review fixes pushed: 530d068ea → 23d10991c, rebased onto main.

AST is clean and all three directories pass (244 / 245 / 169). A delta review is running.

@JarryShaw
JarryShaw force-pushed the docs/1103-cleanup-application branch from 530d068 to 23d1099 Compare October 25, 2026 14:57
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 23d10991c (Sonnet delta). Both required items and both optional items are fixed, each checked against the code, and only the intended hunks moved. The remaining grep hits are all string literals, identifiers or CPython behaviour. The AST check is clean on all 54 files, and application, transport and vendor tests pass.

@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

Copy link
Copy Markdown
Owner Author

Ready to merge at 23d10991c. Part of #1103 (ruling 1).

  • Review: Sonnet GOOD TO GO, after one NEEDS CHANGES round.
  • CI: all checks complete, Required checks passed SUCCESS, 0 failed.
  • KTLO: 12 legs, no warnings.
  • Ordering: each leg was merged into main and run. protocols: 1923 tests, 0 failures. vendor: 401 tests, 0 failures.
  • Conflicts: none against the current main.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, 23d10991c, 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 2971 23 1036 25 98.80%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17433 219 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 8a37cdb into main Oct 25, 2026
64 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-cleanup-application branch October 25, 2026 21:32
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 25, 2026
@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) test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant