Skip to content

docs(foundation): fifth whole-repo pass over foundation, toolkit, dumpkit, interface and utilities (#1103) - #2157

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

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

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, round 5. This is the foundation, toolkit, dumpkit, interface and utilities slice, on main at 4c3d30163. It changes prose only: with docstrings stripped, the AST is identical on all 25 changed .py files.

@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
…pkit, interface and utilities (#1103)

- engines: the name= class-keyword collision holds below 3.11, not on 3.10
  alone; _pcap_backend does import pcapkit.corekit.infoclass; PyShark 3.13
  is inferred, not measured; upstream file:line anchors become names;
  unsupported_reason() is consulted by engine selection, not run() alone.
- reassembly: TCP pseudo-code matches FIN cutting the hole list and the
  sentinel hole; IP departures name the fixed timeout; IPv6 and DF frames
  are not submitted for every frame; examples import from the submodules.
- traceflow/toolkit: labels come from the opening packet; the link type of
  a PCAP-NG packet is its interface's, not a global header's.
- registry: meth is a method name or a (parser, constructor) pair, not a
  callable; register_dumper accepts any dictdumper Dumper subclass.
- compat, config, dumpkit, utilities: stale version range, unresolvable
  DictDumper reference, "dumper class itself", missing config/datetime.

Prose only; AST guard clean; docs, conventions and slice tests pass.
@JarryShaw
JarryShaw force-pushed the docs/1103-r5-foundation branch from 3cd45ca to b6e3ab3 Compare October 25, 2026 05:04
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at b6e3ab336 (Sonnet review of 3cd45ca98, plus one precision amend that I verified).

  • Engines:
  • TCP reassembly was checked against reassembly() and the hole helpers:
    • a FIN cuts holes back;
    • a sentinel hole marks a missed handshake;
    • the update continues across holes;
    • step 6 has no FIN or RST condition.
  • IP reassembly:
    • DF-set and unfragmented IPv6 packets return None in every toolkit;
    • the __timeout__ = 60.0 window runs on the capture clock;
    • PARTIAL is set only when the gap is non-empty.
  • Registry: all 15 wrappers were parsed with ast. Each one's guard prefix matches its doc, and the str | tuple branch indexes [1].
  • Traceflow and dumpkit:
    • the opening packet labels the flow;
    • PCAP-NG link types come from the interface;
    • register_dumper checks dictdumper.dumper.Dumper;
    • the pinned Dumper text stays.
  • Checks: the AST guard is OK on all 25 files. Tests: docs and conventions 94, reassembly 136, engines plus registry 221.
  • b6e3ab336: the Extractor.__del__ example now names the condition under which a negative reasm_timeout fails. I confirmed it against the constructor: reassemblers are built only inside if reassembly:, per protocol flag.

@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
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, b6e3ab336, 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 b6e3ab336.

  • Review: Sonnet GOOD TO GO on 3cd45ca98. The amend rewords Extractor.__del__ precisely; I checked it against the constructor.
  • CI: 58 CheckRuns passed, 0 failed, 0 pending. Required checks passed is SUCCESS. The KTLO legs raise 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 order: this PR conflicts with docs(docs): fifth whole-repo pass over the non-API docs, with issue/PR roles (#1103) #2161 in pcapkit/foundation/engines/pcapng.py, a test merge showed. Whichever merges second needs a rebase, which I'll do as soon as one lands.

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