Skip to content

test: split the conflict-prone count pins and generator tables (#2615) - #2644

Merged
JarryShaw merged 1 commit into
mainfrom
test/2615-split-pins
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
test/2615-split-pins

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • test — tests only

Description of your pull request and other information

The test files that every new module or registry had to edit now derive their counts instead of pinning them. This is the restructuring #2615 allows.

  • const: the four sweeps compare against tests/const/census, one module per pcapkit.const package.
  • vendor: the constant-miss sweep compares against a sorted crawler list.
  • dispatch and options generators: each family has its own module under dispatch_families/ or option_families/. The census tests derive from them and from the tree's maps.
  • excusals: the CONVERTED and EXCLUDED lists in the enum-get and registry-protocol tests assert their own reasons, so the derived totals are as strict as the pins were.

Case sets are identical to main. Frames in the gitignored options-transport.pcap and options-internet.pcap now come out in file-name order. Nothing reads frame order there.

A Sonnet cross-review returned GOOD TO GO and its one gap (an unchecked CONVERTED entry) is closed. Every const and vendor mutation fails.

Closes #2615

@JarryShaw JarryShaw added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw JarryShaw added test Pull requests that add or correct tests (test: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Nov 2, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at e55035a04. A Sonnet cross-review returned GOOD TO GO on the first round. The one gap it found, a CONVERTED entry nothing checked, is closed: test_each_converted_entry_is_what_converted_means now fails on both the C8b and C8c mutations. Case sets match main.

@JarryShaw

Copy link
Copy Markdown
Owner Author

The red Python 3.15 leg comes from this PR's base, not its change. It fails only the DTLSCIDCiphertext schema round trip, which main fixed in 16ccc4373 (#2645), and the re-export test that #2641 fixes. I'll rebase once #2641 merges. The verdict stays good to go.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Coverage: 94.08% -- tests failure, so this is partial (unit tier, Python 3.15, e55035a04, Unit Tests run failure)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20561 177 2832 158 98.53%
pcapkit/corekit 2697 74 854 37 96.65%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3475 27 1206 32 98.74%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 21416 218 5650 196 98.46%
pcapkit/toolkit 961 28 342 10 96.32%
pcapkit/utilities 512 7 144 5 98.17%
pcapkit/vendor 5256 2260 1198 194 53.61%

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

@JarryShaw

Copy link
Copy Markdown
Owner Author

Resolve conflicts

@JarryShaw

Copy link
Copy Markdown
Owner Author

The owner asked for the conflicts to be resolved. A rebase onto main (3e93eea1a) is in progress with this PR's worker. The note follows when it is pushed.

- const: the four sweeps compare against tests/const/census, one module per
  pcapkit.const package, instead of pinned counts
- vendor: the constant-miss sweep compares against a sorted crawler list
- dispatch, options: each family moves to dispatch_families/ or
  option_families/; the census tests derive from them and the tree's maps
- rfc constants: NOT_A_COPY and UNRELATED are sorted by module, and pinned so
- excusals in enum_get and registry_protocol assert their reason, so the
  derived totals keep the pins' strength
- test-coverage.rst: the suites' sources and the adding table follow
- references to TCP_BASE, HIP_BASE and other moved names follow them
@JarryShaw
JarryShaw force-pushed the test/2615-split-pins branch from e55035a to 7fbdffd Compare November 2, 2026 14:48
@JarryShaw

Copy link
Copy Markdown
Owner Author

Conflicts resolved, rebased onto main (3e93eea1a): e55035a04 → 7fbdffdbb. It also merges cleanly with 7dc47f062.

  • The only conflict was test_rfc_constants_one_home_1739_unit, both of whose tables this PR sorts. It now holds main's exact items, re-sorted: the ssl.py key rename, the five new NOT_A_COPY entries, and the narrowed OSPF entry. The sort guard still fails when the order is broken.
  • Everywhere else the patch is unchanged (patch-id 67b13df4b0bf on both heads, outside that file).
  • Derived totals equal every pin on main, and the option and dispatch case sets are byte-identical to main's.

The verdict stays good to go.

@JarryShaw
JarryShaw merged commit c9c334f into main Nov 2, 2026
59 checks passed
@JarryShaw JarryShaw moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 2, 2026
JarryShaw added a commit that referenced this pull request Nov 2, 2026
…s into 1.6.0 (#2449)

- Folded into the TLS/DTLS entry: DTLSContext resolves a unified-header
  record's connection ID as a tls12_cid one's, an ID NewConnectionId
  issues coming only from the caller; every unified-header record's info
  carries cid, None when C is clear, the one-data-model ruling on #2625;
  make() takes cid (#2643). The entry drops the stale "stays Raw" for
  those records.
- 1.5.0's httpv1.HTTP and httpv2.HTTP roles point at HTTPv1 and HTTPv2,
  renamed by #2544, so the nitpicky build no longer warns on them; 1.5.0's
  text unchanged.
- No entry for the test-only #2644.
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: split conflict-prone count pins and shared tables so concurrent PRs touch disjoint lines

1 participant