Skip to content

docs(protocols): sixth whole-repo pass over application, misc and the protocol base (#1103) - #2210

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

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

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/{application,misc}/, protocol.py, and the schema, data and API pages outside internet, link and transport.

  • section_context (refactor(pcapng)!: rename PCAPNG.context to section_context (#2172) #2205): the Raises text names when the block holds no section context: ctx=None, or a Section Header Block read outside the PCAP-NG engine. The engine assigns every SHB it reads the section it opens. The _ctx comments say "section context", not "context manager".
  • Stale claims:
    • PCAPNG.register and Frame.register check against ProtocolBase, not Protocol.
    • Raw.error is a message string, as every caller passes.
    • HTTP.make is named as the one make that reads **kwargs.
  • Change-relative: the secrets_area defect is in the conditional. "As before" is gone from the __value__ and __truncated_raw__ notes. The HTTP._guess_version history is stated as behaviour. "Not yet known" becomes "not known".
  • 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). tests/protocols/{misc,application} plus the tier guard and docstring contract (667 passed).

@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: NEEDS CHANGES at 079262506 (Sonnet).

  • Required: the rewritten HTTP._guess_version docstring line is 149 characters. No other line in http.py is over 110, so it needs reflowing. The wording itself is fine: it describes the rejected heuristic.
  • Also fix in the same pass: the Arguments: blocks and #: comments of Frame.register and PCAPNG.register still say "a Protocol subclass", while their Raises: blocks say ProtocolBase.
  • Verified:
    • Every SHB the PCAP-NG engine read across the examples/captures/*.pcapng fixtures has a section context: 7 SHBs in 6 files.
    • register checks ProtocolBase.
    • Every Raw.error caller passes a str.
    • HTTP.make is the only make that reads **kwargs.
    • The __value__ rewrite keeps its meaning.
    • AST guard OK, and no test pins the changed text.

@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
Fix stale or false prose in the application, misc and protocol-base
slice: the PCAP-NG section context wording after the section_context
rename, the Raw error type, the register RegistryError class, and the
make() kwargs claim; restate change-relative and timed comments as
timeless behaviour. Prose only; AST guard clean.
@JarryShaw
JarryShaw force-pushed the docs/1103-r6-appmisc branch from 0792625 to e392649 Compare October 25, 2026 22:01
@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 e39264934 (Sonnet delta review of 079262506→e39264934).

  • Scope: the delta is only the HTTP._guess_version reflow and Protocol → ProtocolBase in the Arguments: blocks and __proto__ comments of Frame and PCAPNG.
  • Reflow: the word diff is empty, so the wording is unchanged. Lines are 93 to 100 characters, and the 149-character line is gone.
  • AST guard: OK on all 9 files. No test pins the changed text.

@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.56% (unit tier, Python 3.15, e39264934, 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

Copy link
Copy Markdown
Owner Author

Ready to merge at e39264934. Part of #1103 (round 6).

  • 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: merged into main and run. protocols leg: 1924 tests, 0 failures.
  • Conflicts: none against the current main.

@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@JarryShaw
JarryShaw merged commit 149e216 into main Oct 26, 2026
64 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-r6-appmisc branch October 26, 2026 03:06
@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