Repository navigation
feat(vendor): add the ARPHRD crawler, DATA-attribute shape (#2495) - #2497
Conversation
|
GOOD TO GO (Sonnet, |
Every pcapkit.const module needs a matching pcapkit.vendor crawler, with no exception (owner ruling on #2495) -- a hand-maintained registry uses the existing DATA-attribute pattern (pcapkit.vendor.ipx.packet/socket) instead of a live-URL scrape. - New pcapkit.vendor.linux.arphrd.ARPHRD crawler, DATA transcribed from <linux/if_arp.h>, same member/value/FLAG/_missing_ shape as the committed const module -- regenerating is a no-op against the tree. - Regenerate pcapkit.const.linux.arphrd from it; only the docstrings change to the standard templated wording. - Rewrite const-vendor-pairing.rst: drop the exception section, document the DATA-attribute pattern against its real precedent. - Bump test_vendor_missing_body_unit.py's crawler-with-miss-line count. Tests: 124 passed, 1 pre-existing skip, 1373 subtests, across the convention, vendor-miss-body, public-api and registry-protocol suites.
|
Rebased onto main after the epilog-link fix ( |
9423c1a to
2198c11
Compare
|
GOOD TO GO (Sonnet, |
|
Coverage: 94.50% (unit tier, Python 3.15,
Per-file detail: the |
pcapkit.const.sslv2's two modules were hand-curated with no pcapkit.vendor.sslv2 crawler, violating the const-vendor-pairing rule (#2495: "ALL const MUST have its own vendor crawler... use the DATA attribute... no exception"). - Add pcapkit.vendor.sslv2 (handshake_type, version), mirroring the ARPHRD precedent (#2497): each Vendor subclass's request() returns a DATA dict transcribed from the expired SSLv2 draft (draft-hickman-netscape-ssl-00) instead of fetching a URL. - Wire SSLv2_HandshakeType and SSLv2_Version into pcapkit.vendor.__all__. - Regenerate both const modules from the crawlers. Only drift: the docstring (moved to the crawler) and Version.SSLv2's literal (0x0002 -> 2, the crawler's decimal rendering). A second run is a byte-for-byte no-op. - Bump EXPECTED_CRAWLERS_WITH_CONSTANT_MISS_LINES 35->37 for the two new crawlers. - Update docs/source/pcapkit/const/sslv2.rst and the now-stale "hand-curated, no crawler" comments in two tests. Verified: tests/vendor/, tests/const/, the sslv2-specific tests, and tests/project/test_public_api.py all green.
pcapkit.const.sslv2's two modules were hand-curated with no pcapkit.vendor.sslv2 crawler, violating the const-vendor-pairing rule (#2495: "ALL const MUST have its own vendor crawler... use the DATA attribute... no exception"). - Add pcapkit.vendor.sslv2 (handshake_type, version), mirroring the ARPHRD precedent (#2497): each Vendor subclass's request() returns a DATA dict transcribed from the expired SSLv2 draft (draft-hickman-netscape-ssl-00) instead of fetching a URL. - Wire SSLv2_HandshakeType and SSLv2_Version into pcapkit.vendor.__all__. - Regenerate both const modules from the crawlers. Only drift: the docstring (moved to the crawler) and Version.SSLv2's literal (0x0002 -> 2, the crawler's decimal rendering). A second run is a byte-for-byte no-op. - Bump EXPECTED_CRAWLERS_WITH_CONSTANT_MISS_LINES 35->37 for the two new crawlers. - Update docs/source/pcapkit/const/sslv2.rst and the now-stale "hand-curated, no crawler" comments in two tests. Verified: tests/vendor/, tests/const/, the sslv2-specific tests, and tests/project/test_public_api.py all green.
* feat(application): add an SSLv2 dissector - SSLv2 (draft-hickman-netscape-ssl-00) subclasses SSL and joins SSL.id(). Its module and class are named SSLv2. - TLS.read tries TLS first. SSLv2 is taken only when TLS rejects the record and the payload is a complete CLIENT-HELLO or SERVER-HELLO that passes the hello length probe; anything else stays Raw. - The TLS object that adopts an SSLv2 parse reports its 2- or 3-octet header as length, so packet splits as a direct SSLv2 parse does. - TLS.from_data rebuilds an adopted SSLv2 record as SSLv2, so a port-443 hello round-trips byte-exact through TCP.from_data. - Add pcapkit.const.sslv2 (HandshakeType, Version) and bump the const census pins by +2 over #2441's. Part of #2457. * fix(tests): bump the census pins by the full +2 sslv2 adds sslv2.HandshakeType and sslv2.Version are 2 new const modules, but the branch's pin bumps were all +1. Each pinned count needed the second +1: - test_const_enum_builtin_parity: ints 118->119, enums 134->135, distinct modules 128->129 - test_const_enum_get: enums 124->125, covered 121->122 - test_const_enum_lookup: enums 118->119 - test_const_registry_protocol: all_files 128->129, generated 111->112 Verified: all four files pass clean (128 tests, 1522 subtests). * fix(vendor): add the SSLv2 crawler, DATA-attribute shape pcapkit.const.sslv2's two modules were hand-curated with no pcapkit.vendor.sslv2 crawler, violating the const-vendor-pairing rule (#2495: "ALL const MUST have its own vendor crawler... use the DATA attribute... no exception"). - Add pcapkit.vendor.sslv2 (handshake_type, version), mirroring the ARPHRD precedent (#2497): each Vendor subclass's request() returns a DATA dict transcribed from the expired SSLv2 draft (draft-hickman-netscape-ssl-00) instead of fetching a URL. - Wire SSLv2_HandshakeType and SSLv2_Version into pcapkit.vendor.__all__. - Regenerate both const modules from the crawlers. Only drift: the docstring (moved to the crawler) and Version.SSLv2's literal (0x0002 -> 2, the crawler's decimal rendering). A second run is a byte-for-byte no-op. - Bump EXPECTED_CRAWLERS_WITH_CONSTANT_MISS_LINES 35->37 for the two new crawlers. - Update docs/source/pcapkit/const/sslv2.rst and the now-stale "hand-curated, no crawler" comments in two tests. Verified: tests/vendor/, tests/const/, the sslv2-specific tests, and tests/project/test_public_api.py all green. * Merge remote-tracking branch 'origin/main' into feat/2457-sslv2-dissector Co-authored-by: JarryShaw <15666417+JarryShaw@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JarryShaw <15666417+JarryShaw@users.noreply.github.com>
Closes #2495 in part (ARPHRD side; TLS crawler is separate).
Every pcapkit.const module needs a matching pcapkit.vendor crawler, with no exception (owner ruling). A hand-maintained registry uses the existing DATA-attribute pattern (pcapkit.vendor.ipx.packet/socket), not a live-URL scrape.
Tests: 124 passed, 1 pre-existing skip, 1373 subtests.