Skip to content

fix(ci): Vendor Update commits the new modules a crawl adds (#1685) - #1688

Merged
JarryShaw merged 1 commit into
mainfrom
fix/1685-vendor-commits-new-modules
Oct 14, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/1685-vendor-commits-new-modules

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])

  • Use Preview tab to see how your pull request will actually look like

  • Searched for similar pull requests

  • Followed the coding style (make pylint, make mypy, make isort)

  • make test passes, and a test case covers the change — two new tests cover it; not the full make test, but the 12 related tests/project/tests/vendor modules (358 tests) pass

  • Added a changelog entry under docs/source/changelog/ and regenerated CHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description of your pull request and other information

Commit changes in cron-vendor.yml ran git commit -am, which never stages an untracked file. verify-changed-files@v17 does report one (the ?? lines of git status -u --porcelain, per its entrypoint.sh). So a module generated for a new registry got a bump but was left out of the commit, and every later crawl bumped for it again.

  • Fix: the step runs git add -A -- 'pcapkit/const/*.py' before git commit -am. That stages new, modified and deleted modules, and -a still picks up the files the bump rewrites. The pattern is quoted so git matches it at any depth; unquoted, the shell would expand it to pcapkit/const/__init__.py alone. It is limited to .py so a .<module>.py.XXXX.bak that _snapshot_and_restore could not remove is not committed: .gitignore does not cover those.
  • Commit documentation changes (ci(vendor): commit a comment-only regeneration without bumping the version (#1674) #1684): no gap there. The classifier calls a new or deleted file code, so that run takes the bump path. A test walks the steps to show this, and the step keeps -a.
  • Tests: tests/project/test_vendor_commits_new_modules_1685.py builds on ci: Vendor Update bumps a beta on a regeneration that changes only comments #1674's harness. It runs the step's script in a scratch repo holding a new, a modified and a deleted module plus two stray files, and checks that exactly the modules and the bumped __init__.py land in the commit. A second test checks that once a new module is committed, the next crawl reports nothing. Both fail on origin/main and pass here. A mutation check confirms each test catches an unquoted pattern, a whole-directory add, a repo-wide add, and a missing add.
  • Docs: releasing.rst and workflows.rst each gain a sentence. actionlint reports no new findings (its 4 shellcheck notes are already on main).

Closes #1685

Commit changes ran `git commit -am`, which never stages an untracked file, so a
module generated for a new registry was bumped for but left out of the commit, and
every later crawl bumped for it again. The step now runs
`git add -A -- 'pcapkit/const/*.py'` first: new, modified and deleted modules,
nothing outside pcapkit-vendor's output. Commit documentation changes keeps `-a`
alone, since a new or deleted module always classifies as code.

tests/project/test_vendor_commits_new_modules_1685.py runs the step's script in a
scratch repository; both tests fail on origin/main.
@JarryShaw JarryShaw added fix Pull requests that fix a defect (fix: subject prefix) ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 13, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at afbb2a88a. A Sonnet cross-review checked the Opus worker's change. I re-ran the 1685 and 1674 tests: 25 passed.

The fix is one line before Vendor Update's commit: git add -A -- 'pcapkit/const/*.py'.

  • What it stages: a new or deleted const module now lands with its bump, and -a still takes the bump's own files.
  • The quoting: git's pathspec then reaches modules at any depth, rather than the shell expanding the pattern.
  • Why .py only: a .bak that pcapkit-vendor failed to remove stays out of the commit.
  • ci(vendor): commit a comment-only regeneration without bumping the version (#1674) #1684's documentation commit needs no change, because a new or deleted file always classifies as code.

The reviewer built its own harness, with new modules at depths 2, 4 and 6, a modified one, a deleted one, and five stray files. Only the crawl's output was committed. The test's four mutations (unquoted pattern, a bare git add -A, the directory without *.py, and no add at all) each fail.

This merges cleanly with #1677.

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 89.46% (unit tier, Python 3.14, afbb2a88a, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 3 20 3 95.16%
pcapkit/const 18858 954 2366 868 91.06%
pcapkit/corekit 2366 67 760 35 96.48%
pcapkit/dumpkit 275 3 100 3 98.40%
pcapkit/foundation 3033 152 1076 35 94.23%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17166 226 4580 190 98.07%
pcapkit/toolkit 1416 279 584 5 77.80%
pcapkit/utilities 494 4 146 4 98.75%
pcapkit/vendor 4417 2342 1010 157 43.38%

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

@JarryShaw
JarryShaw merged commit 7c4a362 into main Oct 14, 2026
53 checks passed
@JarryShaw
JarryShaw deleted the fix/1685-vendor-commits-new-modules branch October 14, 2026 01:19
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 14, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 14, 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) fix Pull requests that fix a defect (fix: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(ci): Vendor Update bumps for a new const module but never commits it

1 participant