Skip to content

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

Merged
JarryShaw merged 2 commits into
mainfrom
docs/1103c-corekit
Oct 16, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
docs/1103c-corekit

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Counted numbers:

  • Drop tallies of methods, tiers, registries, sentinels, decorators,
    attributes, call sites, crawlers and table rows from corekit and vendor
    prose, rewording each sentence count-free.
  • Edit the apptype, FTP and HTTP vendor templates and apply the same text
    to the const modules they generate, including the shipped-member tally
    in AppType.str.

Accuracy:

  • seekset and beholder decorate instance methods; TP is bound to
    ProtocolBase; Info's page documents dict
    rather than *args.
  • AppType.get_all answers a miss with an unregistered member, not a mint;
    register_alias and aliases no longer contradict themselves.
  • Drop "as before", "this fix" and "above" where timed or wrong.

Rendering:

  • Document FinalisedState, nested_packet_context and DecodedString so
    their cross-references resolve; link the PeekableStream issues.
  • Drop the duplicated ProtoChain parameters, the intersphinx prefix on
    strings._T and the inherited LINK on the NGAP page; fix typos.

Non-prose check: ast.dump is unchanged on every .py file with docstrings blanked. The four vendor templates are unchanged with every string blanked, and each edit to a generated pcapkit/const/ module traces to its template. The const/*/__init__.py modules are hand-written. Narrow test runs are green (tests/vendor, tests/const, tests/corekit, tests/project).

Refs #1103

…1103)

Counted numbers:
- Drop tallies of methods, tiers, registries, sentinels, decorators,
  attributes, call sites, crawlers and table rows from corekit and vendor
  prose, rewording each sentence count-free.
- Edit the apptype, FTP and HTTP vendor templates and apply the same text
  to the const modules they generate, including the shipped-member tally
  in AppType.__str__.

Accuracy:
- seekset and beholder decorate instance methods; _TP is bound to
  ProtocolBase; Info's page documents dict_ rather than *args.
- AppType.get_all answers a miss with an unregistered member, not a mint;
  register_alias and aliases no longer contradict themselves.
- Drop "as before", "this fix" and "above" where timed or wrong.

Rendering:
- Document FinalisedState, nested_packet_context and DecodedString so
  their cross-references resolve; link the PeekableStream issues.
- Drop the duplicated ProtoChain parameters, the intersphinx prefix on
  strings._T and the inherited LINK on the NGAP page; fix typos.

Refs #1103
@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 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: NEEDS CHANGES at aad07bb44. A Sonnet cross-review (author: Opus) confirmed:

  • every generated pcapkit/const/ file equals its template's render outside the data regions;
  • the data regions are byte-identical with base, so no member, value or IANA row changed;
  • the lower-case FEAT set (base, hist, secu, feat, nat6);
  • seekset/beholder on instance methods, _TP's bound, and AppType.get_all returning an unregistered member, checked at runtime;
  • the new FinalisedState, nested_packet_context and DecodedString entries;
  • that str(TCP.http) is unchanged;
  • AST identity.

One blocking defect, re-checked with docutils. In infoclass.rst:17, :param dict_: reads as a hyperlink reference and raises Unknown target name: "dict", which would be a new build error. The escaped dict\_ parses cleanly, matching the docstring's own spelling. A worker is adding the fix to this branch.

@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 16, 2026
- infoclass.rst: escape `dict\_` so docutils stops reading it as a link
  target, and say that `__init__` does not rebuild annotated nested values
- vendor/ngap/procedure_code.py: point the `LINK` reference at `Vendor.LINK`,
  which is documented
- vendor/__main__.py: smooth the sentence contrasting the two decline paths
- const/ngap/__init__.py: drop a stray comma and name the module cited

Refs #1103
@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 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at ba55e9677. A Sonnet re-review of the fix commit confirmed:

  • docutils reproduces the old Unknown target name: "dict" at aad07bb44 and reports nothing at the new head, where the field renders as dict_;
  • the from_dict wording, by running both forms: from_dict rebuilds a nested annotated Info and __init__ leaves it a dict;
  • Vendor.LINK is documented in vendor/default.rst, and ProcedureCode.LINK is None at runtime;
  • no vendor template generates const/ngap/__init__.py;
  • AST identity with docstrings blanked.

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

Copy link
Copy Markdown
Contributor

Coverage: 90.05% (unit tier, Python 3.15, ba55e9677, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 2 20 2 96.77%
pcapkit/const 19595 881 2618 867 92.11%
pcapkit/corekit 2462 69 780 35 96.55%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2915 164 1016 34 93.59%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17408 224 4580 189 98.10%
pcapkit/toolkit 872 177 298 8 77.18%
pcapkit/utilities 512 2 158 4 99.10%
pcapkit/vendor 4407 2342 1010 157 43.27%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 7a4ddd4 into main Oct 16, 2026
56 checks passed
@JarryShaw
JarryShaw deleted the docs/1103c-corekit branch October 16, 2026 23:11
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 16, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 16, 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