Skip to content

docs(corekit): sixth whole-repo pass over corekit, const and vendor (#1103) - #2212

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

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

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 over pcapkit/corekit/, pcapkit/const/ and pcapkit/vendor/.

  • False claims:
    • InfoMeta's __additional__ example order. Measured: B gives ['c','d','a','b'].
    • A backwards length test in a FieldBase.unpack comment.
    • ConditionalField's condition receives the packet dict, not an Info.
    • The ipx.socket _missing_ note: it builds unregistered members.
  • Change-relative: "used to", "before the fix", "the old X" and "final round" are stated as behaviour across corekit, the vendor crawlers and the AppType, FTP Command and HTTP Method templates.
  • Generated files: template edits are mirrored by hand into const/reg/apptype/apptype.py, const/ftp/command.py and const/http/method.py, as docs(vendor): fix AppType template prose and six crawler Args mismatches (#2175) #2180 did, with no regeneration.
  • Scope:
    • The plain docstring-AST guard passes on 17 files.
    • On the three vendor templates the edited text sits inside f-string templates. With the f-strings masked, the ASTs match, and each template rendered before and after gives the same docstring-stripped AST.
    • Every changed const line appears in its template diff.
  • Kept, because tests pin them: "reg: drop TransportProtocol's IntFlag base once nothing builds a composite #808 dropped TransportProtocol's IntFlag base" (test_docs_internal_refs_1947_unit), and "value were both the bytes object" (test_const_method_value_lookup_908_unit).
  • Tests run: docs and conventions give 104 passed. Const, corekit, vendor, docstring contract and tier guard give 565, 789 and 112 passed.

…1103)

- Rewrite change-relative narrative ("used to", "no longer", "before the
  fix", "this fix", "the old X", "final round") as timeless statements
  across corekit, the vendor crawlers and hand-written const prose.
- Mirror the AppType, FTP Command and HTTP Method template prose edits
  into the committed const modules; only comments and docstrings differ.
- Fix false prose: InfoMeta's __additional__ example order, a reversed
  zero-pad comparison in FieldBase.unpack, ConditionalField's condition
  argument, and FieldBase.__copy__'s "in this module".
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) const Regenerated IANA or vendor constant tables; members keep their numeric values 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: GOOD TO GO at 2c864c09d (Sonnet).

  • Templates: the f-string placeholders are identical to main, and each template rendered before and after gives the same docstring-stripped AST. Prose only.
  • Mirroring: every changed line in the three const modules appears in its vendor diff, and the reverse holds too. The vendor-only lines are crawler comments and docstrings.
  • Claims, run:
    • The InfoMeta example prints ['c','d','a','b'] and ['e','f','c','d','a','b'].
    • The unpack guard reads as the new comment says.
    • ConditionalField gets the packet dict.
    • Every ipx.socket _missing_ range builds an unregistered member.
    • The AppType comment keeps 1.4.x's IntFlag numbering, sctp 4 and dccp 8 (read from v1.4.1.post2), and the old-integer warning.
  • AST guard: OK on the 17 plain files.
  • Tests: vendor, const and corekit give 1270 passed. The docs, convention and pin selection gives 306 passed.

@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 2c864c09d. Part of #1103 (round 6).

  • Review: Sonnet GOOD TO GO, first round.
  • CI: all checks complete, Required checks passed SUCCESS, 0 failed.
  • KTLO: 12 legs, no warnings.
  • Ordering: merged into main and run. const and vendor legs: 597 and 401 tests, 0 failures.
  • Conflicts: none against the current main.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.56% (unit tier, Python 3.15, 2c864c09d, 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 added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@JarryShaw
JarryShaw merged commit dfc68f9 into main Oct 26, 2026
69 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-r6-corekit branch October 26, 2026 03:08
@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

const Regenerated IANA or vendor constant tables; members keep their numeric values 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