Skip to content

docs(tests): state foundation, toolkit and root tests' behaviour without change-relative narrative (#1103) - #2195

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

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

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, ruling 1: test narratives stop describing a change and state the behaviour instead. This PR covers tests/foundation/ (except _roundtrip.py), tests/toolkit/, tests/integration/ and the root tests/*.py files.

  • Rewrites:
    • "X now does Y" becomes "X does Y".
    • "used to / before this change, X did Z" becomes the defect the test guards against, e.g. "Guards against …" or "Without the fix, …", keeping the issue references.
    • History that adds nothing for a future reader is cut.
  • Kept:
    • "no longer" and "now" where they describe the protocol, a runtime or a third-party tool, or the present moment.
    • Change-relative string literals and test names, since they are code, not prose.
  • Scope: comments and docstrings only. Every changed file has the same AST as main once docstrings are stripped.
  • Tests run: the changed files pass, slice by slice, along with the tier guard and the docstring contract.
  • Overlap: docs(tests): fifth whole-repo pass over tests (#1103) #2159 conflicts in three files and docs(vendor): fix AppType template prose and six crawler Args mismatches (#2175) #2180 in one (tests/test_docstring_contract.py). Whichever lands second gets a rebase.

@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) 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 Oct 25, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main and the review fixes folded in: 948fadf03 → a83e5dcf3.

A delta review of this head is running.

@JarryShaw
JarryShaw force-pushed the docs/1103-cleanup-foundation branch from 948fadf to a83e5dc Compare October 25, 2026 14:32
…out change-relative narrative (#1103)

Rewrite comments and docstrings that described behaviour relative to a fix ("now", "used to", "before this change") as timeless statements of behaviour or of the defect guarded against. Prose only; AST unchanged once docstrings are stripped.
@JarryShaw
JarryShaw force-pushed the docs/1103-cleanup-foundation branch from a83e5dc to 0ccaa39 Compare October 25, 2026 14:37
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 0ccaa39c6 (Sonnet delta, two findings dismissed). All five first-round findings are fixed, the conflict resolutions keep #2159's and #2180's facts, and the new subtest sentence matches pytest 9.1.1. The two remaining hits in test_extraction_no_eof.py stay as they are. "pre-existing matter" sits inside the child script's f-string, so it is code, and editing it changes the AST. "Measured on 6c3d1b0d9" is a commit-pinned measurement, which the cleanup keeps everywhere.

@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

Copy link
Copy Markdown
Owner Author

Ready to merge at 0ccaa39c6. Part of #1103 (ruling 1).

  • Review: Sonnet GOOD TO GO.
  • CI: Required checks passed SUCCESS, 0 failed. Still open: the non-gating Python graalpy-25.4 (experimental) leg.
  • KTLO: 12 legs, no warnings.
  • Ordering: foundation leg merged into main, 738 tests, 0 failures.
  • Conflicts: none with the current main.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, 0ccaa39c6, 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
JarryShaw merged commit d8d28d1 into main Oct 25, 2026
62 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-cleanup-foundation branch October 25, 2026 21:29
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 25, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 25, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone 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) test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant