ci(deps): install the vendor extra on engine-tests, closing HAS_VENDOR_DEPS (#738) - #774
Conversation
9502488 to
6d407e8
Compare
|
Cross-review: NEEDS CHANGES (opus, a different model from the author), verified at
Verified: gaps 16 → 15, exactly the one tuple removed and every other byte-identical, no new gap. Skip delta 41 → 0 on My own brief was wrong on one figure, and both the author and I measure the same correction: the guard is 96 passed / 511 subtests at Six prose changes required, four of them false claims in the PR's own new text:
One sentence worth adding when #738 closes: |
6d407e8 to
c9be872
Compare
|
Final cross-review at Verified good. The The one change. The sweep made all five un-darked files name So four sites — And This matters more than ordinary imprecision, which is why it is a change request rather than a note: "skipped" versus "never collected" is the exact distinction the #738/#745 subsystem is built on — Nothing functional argues against merging, and landing this with a follow-up sweep would be defensible. But the fix-up exists to make these comments accurate, and the correction is one word in four places plus one reworded clause. |
c9be872 to
1b63e98
Compare
#770) - mypy has no aenum plugin, so TransportProtocol is a plain class to it. undefined = 0 is a bare int literal, inferring as int, while the auto()-valued siblings infer as Any -- the only member that then disagreed with the four sites defaulting to it: the class attribute __transport__, and the proto parameter on __new__, get and get_all. - Wrap the literal in typing.cast in the BASE template (pcapkit/vendor/reg/apptype/apptype.py) so mypy infers TransportProtocol instead. cast is the identity function at run time, so undefined stays exactly 0 and still composes, and regenerating from a byte-identical cached IANA fetch changes only this member's comment and assignment in pcapkit/const/reg/apptype/apptype.py -- tcp/udp/sctp/dccp.py are untouched, member counts (6147/6143/91/10) unchanged, and every member's name/port/svc/proto/value is unchanged. - Give the member a one-line #: contract instead of the mypy rationale: Sphinx autodocs it with :undoc-members:, and would otherwise publish the cast's reasoning as the member's own rendered description. - Add tests pinning the fix: source-text shape, a direct mypy.api.run check, and a runtime guard that undefined is still 0 and composes. The mypy check skips inline when mypy is unavailable -- it is a Pipfile dev-package, not a pyproject.toml extra -- rather than a tracked HAS_MYPY gate, which was measured to break tests/test_tier_guard.py's DependencyGateCoverageTests (mypy has no MODULE_PROVIDERS entry, and that file is #774's to change). mypy on the whole package: 116 errors/39 files -> 112/38, matching lint.yml's existing pin (measured at 932cb48, unaffected by this).
…R_DEPS (#738) - 41 tests/vendor/*.py methods gated on HAS_VENDOR_DEPS have never run in CI: the test extra carries requests+bs4 (#507) but not html5lib, which only beautifulsoup4[html5lib] (the vendor extra) provides. - #738's ruling was a non-blocking leg rather than adding it to `test`. engine-tests (#751) already is that leg -- it mirrors test's ignore-shape selection and is the only per-pull-request job both reaching these gates and outside ruleset 23497679's 15 required checks -- so adding `vendor` to its install line was the forced choice, not merely a convenient one. - Updated tests/_dependency_gates.py's HAS_VENDOR_DEPS exclusion to drop engine-tests, state gate's own substantive reason for staying dark (already-covered release path, not merely "also non-blocking"), and correct three inaccuracies a cross-review found in the network-call reasoning: test_ftp_return_code_unit.py is not a retired scrape and needs html5lib functionally (parses an inline fixture with it); the other three files use html5lib only as an import precondition; and a quote attributed to two files was a splice of two different sentences. - Swept the same stale "skips in CI" prose in the four un-darked test files, test_vendor_dest_path_unit.py's cross-reference to them, and two related claims in pyproject.toml, all now inaccurate now that engine-tests runs them. A second pass corrected those same five sites' job lists: `integration` and `pypcap-parity` never collect anything under tests/vendor/ at all, so they were never places these tests "skip" -- only `test` and `gate` are. - Added a guard test pinning the closure, and updated two falsifiability tests' hardcoded install-line strings to match. Verified dependency_gate_gaps() drops ('HAS_VENDOR_DEPS', 'engine-tests') and the four newly-reachable test files (41 methods) pass for real with html5lib installed, including under a socket-patched no-network check and on real CI across all five Engines Python 3.10-3.14 legs. tests/test_tier_guard.py: 97 passed / 512 subtests under both pytest and python -m unittest. Fixes #738.
1b63e98 to
3d45a3f
Compare
|
Final cross-review at Correcting my own figure first. The verification table I posted earlier said Also correcting my own brief. I warned that the four dark files "may name a different flag set" and to verify per file. They do not: all four declare a byte-identical And the suspicion I raised was well placed, with the opposite answer. I said a The new prose is true, clause by clause. Monkeypatching Counts reproduced under both runners. Per-file collection 5/9/16/11/4 sums to 41 + 4 = 45, matching the PR's breakdown; No conflict from the extra. Nothing went stale when #773 merged, and no comment names a PR or agent as owning a file — I asked specifically because that defect appeared twice on #777. CI 27 success / 3 expected skips, |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fixfeatperfrefactortestdocscichoreDescription
Closes #738's remaining scope:
HAS_VENDOR_DEPS' 41 methods (tests/vendor/test_request_prompt_unit.py,test_user_agent_unit.py,test_ipx_packet_unit.py,test_ftp_return_code_unit.py) were one requirement extra short of thetestextra's ownrequests+bs4(#507) --html5lib, which onlybeautifulsoup4[html5lib](thevendorextra) provides.#738's ruling was to land this on a non-blocking leg rather than add it to
test.engine-tests(#751) already is that leg, and is the only per-pull-request job that both reaches these gates and sits outside ruleset 23497679's 15 required checks --gatereaches them too but never runs on a pull request, andintegration's fixture-tier selection never reachestests/vendor/. So addingvendortoengine-tests' install line was the forced choice, not merely a convenient one.Updated
tests/_dependency_gates.py'sHAS_VENDOR_DEPSexclusion to dropengine-tests, perdependency_gate_gaps()'s own before/after, and to stategate's own substantive reason for staying dark instead of "also non-blocking" (which would otherwise permit addingvendorthere too).None of the 41 methods make a live network call, but not for one reason across all four files:
test_user_agent_unit.py(11) andtest_request_prompt_unit.py(16) gate on html5lib only as an import precondition and replacerequests.getwith a recorder;test_ipx_packet_unit.py(9) is a regression suite for a retired scrape (Packet.LINK is None);test_ftp_return_code_unit.py(5) is not retired -- its crawler'sLINKis a live Wikipedia URL -- and is the one file where html5lib is a functional dependency: it parses an inline HTML fixture with the real parser rather than fetching anything. An independent cross-review confirmed the no-network claim directly, withsocket.connect/connect_ex/getaddrinfo/create_connectionall patched to raise across all 41 methods -- zero failures. Swept the same stale "skips in CI" prose this correction touches, in the four files themselves, intest_vendor_dest_path_unit.py's cross-reference to them, and in two related claims inpyproject.toml.Added a guard test pinning the closure (shown to fail against the pre-fix workflow), and updated two falsifiability tests' hardcoded install-line strings to match the new line.
Fixes #738.