Skip to content

ci: run the corekit plain-unittest ordering leg (#2115) - #2116

Merged
JarryShaw merged 1 commit into
mainfrom
ci/2115-corekit-ordering-leg
Oct 24, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/2115-corekit-ordering-leg

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • ci — changes to CI configuration files and scripts

Description of your pull request and other information

Closes #2115. CI's unittest-ordering matrix had no corekit leg, and util/run_unittest_leg.py corekit failed on main with 34 failures and 31 errors.

  • The failures (already fixed on main, test-only 66a70edf4): bisection pinned the polluters to test_bitfield_unnamed_bits_1487_unit and test_decorators_path_1735_unit, which call reimport_once_per_class. Leaving the fresh pcapkit import in place is intended in this leg (test: three modules pass alone but fail together, and pytest reports it green #981): it is how the leg catches modules that hold a stale import. The enum tests did hold one: they bound EnumLookup/EnumKeyError/EnumValueError at module load, so the fix imports those names per test. With it, the corekit leg runs 903 tests with 0 failures.
  • This PR: adds corekit to the matrix. integration stays out on purpose, as the workflow comment and run_unittest_leg.py record: is_unit_tier() rejects every file in it, so the leg would run nothing of its own, and the integration job already runs it under pytest. The stale comment and the "not legs" sentence in conventions/test-coverage.rst are updated.
  • Test: test_unittest_ordering_shards now derives the expected legs from every tests/ subdirectory with a test_*.py, minus NOT_LEGS = {'integration'}. Against the old workflow it fails 2 checks, both naming corekit; it passes with the change.

tests/corekit was left out of unittest-ordering as permanently red. The
identity subtests that reason cited were fixed under #1332, and the rest
of the leg's failures under the previous commit, so it now passes.

- unit-tests.yml: add `corekit` to the matrix; the comment keeps
  tests/integration as the one deliberate omission, with its reason
- test_unittest_ordering_shards: derive the expected legs from the tests/
  subdirectories minus a documented NOT_LEGS set, and pin that integration
  has no unit-tier module, so a new subdirectory left out fails
- test-coverage.rst: drop corekit from the "not legs" sentence

The pin test fails against the old matrix (2 failures naming corekit) and
passes with it. run_unittest_leg.py project: 2183 tests, 0 failures, 0
errors.
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet test Pull requests that add or correct tests (test: subject prefix) labels Oct 23, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 846986ebe (Sonnet review).

  • Scope: only the workflow matrix, conventions/test-coverage.rst and the pin test change. The corekit leg has the same shape as the other plain legs. At about 233 s locally it is comparable to const, well inside the 20-minute step and 45-minute job caps, and it runs under cap_file_size.py.
  • integration stays out: FIXTURE_TIER_DIRS makes is_unit_tier() reject every integration file, and test_integration_has_no_unit_tier_module pins it. No other tests/ subdirectory is uncovered, since protocols (rest) rglobs misc and schema.
  • Pin test: fails 2 checks with the workflow reverted (['corekit'] != []) and 2 with cli deleted. Six other workflow-pin files pass.
  • Not gating: required-checks does not need unittest-ordering (main-push only), so the new check name cannot block a merge.

@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 23, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 23, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 846986ebe.

  • Review: the Sonnet review is GOOD TO GO.
  • CI: every blocking check passed (Required checks passed SUCCESS). The 3.8–3.10 KTLO legs carry no warnings.
  • Ordering: the leg this PR adds runs only on main. On a scratch tree, util/run_unittest_leg.py corekit already passes on main since 66a70edf4: 903 tests, 0 failures. So the new Plain unittest ordering (corekit) check should be green on its first push.

This closes #2115.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, 846986ebe, 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 2565 71 812 37 96.56%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2939 23 1024 25 98.79%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17414 219 4574 185 98.14%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 473 7 136 5 98.03%
pcapkit/vendor 4432 1988 1018 167 51.87%

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

@JarryShaw
JarryShaw merged commit 59f5b33 into main Oct 24, 2026
66 checks passed
@JarryShaw
JarryShaw deleted the ci/2115-corekit-ordering-leg branch October 24, 2026 00:19
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 24, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 24, 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

ci Pull requests that change CI or workflow configuration (ci: 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.

test(corekit): the corekit plain-unittest ordering leg fails on main, and CI never runs it

1 participant