Skip to content

test(docs): the viewcode BufferID alias list misses the SCTP, DTLS and TLS reassembly data modules (#3202) - #3207

Open
JarryShaw wants to merge 1 commit into
developfrom
test/3202-viewcode-bufferid-aliases
Open

JarryShaw wants to merge 1 commit into
developfrom
test/3202-viewcode-bufferid-aliases

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

  • Put an x into every box [ ] that applies to your pull request (like this: [x])

  • Use the Preview tab to see how your pull request will look

  • Searched for similar pull requests

  • Followed the coding style (make pylint, make mypy, make isort)

  • make test passes, and a test case covers the change

  • Described the user-visible change below and left its changelog entry to the maintainer, keeping docs/source/changelog/ and CHANGELOG.md out of the diff, if the change is user-visible: N/A — centralised

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

  • Also tick if it regenerates constant or registry tables, members keeping their numeric values (the const label)


Description of your pull request and other information

Closes #3202, taking the derive-from-source option.

  • ALIASES in tests/project/test_docs_viewcode_builtins_1863_unit.py is now read from the source: every module-level binding of a subscripted Tuple under pcapkit, as (module, name) pairs, through tests/_sources.py. It picks up the SCTP, DTLS and TLS reassembly BufferIDs, plus SCTP's MessageID, which also reports builtins.
  • AliasScanTests pins the scan: annotated and chained bindings found; TYPE_CHECKING, function and class bodies, typing.Tuple, Union, bare annotations and tuple unpacking left out; the four missed aliases found.
  • Proof, in the pinned docs venv: on an origin/develop export with follow_builtins_alias narrowed to develop's five modules, develop's module still passes (4 passed) and this one fails (5 failed, the four missed aliases named).
  • Local, -n 2: this module 7 passed in the docs venv; root tests/*.py 267 passed, 1 skipped; tests/protocols/*.py 741 passed, 6 skipped; tests/project 2435 passed, 94 skipped, 5 failed, the five test_conda_dev_release_gate_2458 subtests, which fail the same on the untouched export.

@JarryShaw JarryShaw added 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 Nov 29, 2026
@github-actions github-actions Bot added this to the PyPCAPKit v1.10 milestone Nov 29, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 29, 2026
…d TLS reassembly data modules (#3202)

ALIASES in tests/project/test_docs_viewcode_builtins_1863_unit.py was a hand-kept
list of the modules binding a BufferID alias, and it missed the SCTP, DTLS and
TLS reassembly data modules, so the check that each alias reports builtins to
viewcode and stays in its own module never ran for them.

It is now read from the source: every module-level binding of a subscripted
Tuple under pcapkit, as (module, name) pairs. That also brings in SCTP
reassembly's MessageID, the one such alias not named BufferID. AliasScanTests
pins what the scan finds and leaves.
@JarryShaw
JarryShaw force-pushed the test/3202-viewcode-bufferid-aliases branch from 0cbd65c to 67b6f14 Compare November 29, 2026 03:58
@JarryShaw

Copy link
Copy Markdown
Owner Author

Good to go at 67b6f1418, verified by a Sonnet cross-review plus my check of the fold.

  • All nine derived aliases resolve to builtins at runtime, including MessageID in reassembly/sctp/data.py, which the issue didn't list. The hook is generic, so the test is green for the right reason.
  • With the hook narrowed to develop's original five modules, the new test fails (dtls, sctp ×2, tls), while develop's old test still passes. That is the blind spot test(docs): the viewcode BufferID alias list misses the SCTP, DTLS and TLS reassembly data modules #3202 reports.
  • Fold: the docstring of test_finds_the_tree_aliases now states what it checks, instead of narrating history. range-diff shows that line is the only change.

@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 Nov 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 94.93% (unit tier, Python 3.15, 67b6f1418, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 116 4 20 2 95.59%
pcapkit/const 22308 224 3168 191 98.27%
pcapkit/corekit 3160 83 1058 40 96.85%
pcapkit/dumpkit 423 3 148 5 98.60%
pcapkit/foundation 4341 24 1362 26 99.12%
pcapkit/interface 112 4 40 3 95.39%
pcapkit/protocols 28624 154 7558 128 99.21%
pcapkit/toolkit 1136 35 406 9 96.24%
pcapkit/utilities 638 7 176 5 98.53%
pcapkit/vendor 6514 2394 1464 256 59.91%

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: good-to-go Cross-review at the current head says ready; CI state is separate test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant