Repository navigation
ci(vendor): commit a comment-only regeneration without bumping the version (#1674) - #1684
Merged
Merged
Conversation
…rsion (#1674) - util/vendor_code_changed.py compares each changed file with HEAD by AST, with docstrings dropped, and writes code_changed for the workflow. New, deleted, non-Python, out-of-tree, mode-changed or unparsable files are code. - cron-vendor.yml bumps only on a code change; a comment-only regeneration is committed as "Updated vendor documentation without a version bump". If the classifier fails, the bump stands. - The crawl raised by such a commit's own Unit Tests run holds further comment changes, so documentation commits cannot chain. - Docs: releasing.rst and workflows.rst describe both commits. Tests: tests/project/test_vendor_comment_only_no_bump_1674.py, 23 tests, all failing on origin/main.
Owner
Author
|
Verdict: GOOD TO GO at What it does.
Measured on history. b6, b7 and b9-b12 classify as comment-only; b4, b5 and b8 as code. The reviewer replayed each bump and tried 13 mutations of its own, every one of them caught. Unverified until a live run: that This merges cleanly with #1677. |
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto 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) — the three lintpcapkit, and nopcapkit/file changed; the two new files areisort -l100and mypy clean, and actionlint/shellcheck report nothing newmake testpasses, and a test case covers the change — ran the affected test files, not the whole suiteAdded a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.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) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Change. Option (1) from #1674. The new
util/vendor_code_changed.py(stdlib only) compares each fileverify-changed-fileslists withHEAD. It compares ASTs, with every bare string statement dropped; comments never reach the AST. A file counts as code if it is new, deleted, non-Python, outsidepcapkit/const/, has a changed mode, does not parse, or is identical toHEAD.cron-vendor.ymlbumps, commits and pushes as before only when some file is code. Otherwise it commits "Updated vendor documentation without a version bump" and pushes, without runningbump_version.py. If the classifier step itself fails (continue-on-error), the bump stands.Measured. On b5–b12's real diffs, b6, b7, b9, b10, b11 and b12 come out comment-only. b5 (
_missing_) and b8 (pjj_player_disc→newmood_player) come out as code.What the push triggers. Create Release still runs when Vendor Update completes, as it already does after a crawl that changes nothing.
version_checkreads an unchanged__version__, so its evidence says the version is already published. That skips the gate and every publisher (test_the_gate_skips_when_everything_is_already_published,test_release_gates.py:2051). Unit Tests runs on the pushed commit, and its completion starts Vendor Update again.No loop. That second crawl should find nothing. If it finds more comment changes, they are held, not committed: the step reads
github.event.workflow_run.head_commit(in the payload schema, octokit/webhooksworkflow-run.schema.json; Unit Tests run 38458870161'shead_commitholds the bot's email and the full message). So one documentation commit never follows another. Bumps still need code changes, as today.Tests.
tests/project/test_vendor_comment_only_no_bump_1674.pyhas 23 tests: the script on fixtures, a step-by-step walk of the job, and the commit step run in a scratch repo. All pass here (pytest: 23 passed, 30 subtests). Onorigin/mainthey all fail (unittest:FAILED (failures=41)). Each of 12 mutations to the workflow or the script makes at least one test fail. The related release-gate, verdict, isort, bump-version and doc-claim tests pass.#1677. Its only
cron-vendor.ymlhunk applies cleanly on top of this change (patch --dry-run).Closes #1674