Skip to content

ci(release): run version_check's tier and completeness reads from util/ scripts (#1967) - #2081

Merged
JarryShaw merged 1 commit into
mainfrom
ci/1967-release-scripts-3
Oct 23, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/1967-release-scripts-3

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

The third create-release batch for #1967, covering three of version_check's steps.

  • util/release_tiers.py: Read the released Python versions.
  • util/release_published.py pypi|anaconda: both publish-completeness checks. It keeps the same curl arguments (-s --retry 3 --retry-connrefused), URLs, || echo 000 handling and /tmp reply paths.
  • Get Version stays inline. Its 9 lines run under set -x, and a script that reproduced the trace would have cost far more than it saved.
  • Workflow diff: a PyYAML structural diff shows only those three run: values changed. The job already checks out the full tree and sets up Python first. actionlint 1.7.12 is clean.
  • Equivalence: test_release_version_check_scripts_1967 embeds main's three bodies verbatim and runs each under bash -e side by side with its script, using stand-in curl/git/python3. It requires the same status, stdout, stderr, outputs, calls and scratch files. Its cases reach every exit of each old step, and 12 planted divergences were caught. It also passes under bash 5.2.
  • Results: the release, conda, KTLO-guard, matrix-tier, python-versions and workflow tests all pass.

Overlap: #2079 also adds to the SCRIPTS tuple, so whichever merges second gets a small rebase.

@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix) 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

GOOD TO GO at e22a31aa6 (Sonnet cross-review).

  • Workflow diff: a YAML diff shows only the three run: values changed. Get Version, the envs, ids and outputs are identical.
  • Completeness checks: the reviewer ran 63 of its own cases of main's shell under bash -e against release_published.py, with a stand-in curl. They cover complete, partial and KTLO-only replies, 404, curl exits 7, 18 and 28, non-JSON and null bodies, empty lists, odd whitespace, a build-prefix filter, unset variables, an unwritable output and a missing curl. Status, stdout and outputs all match. The curl arguments, URLs, || echo 000 handling, the expected counts (wheels+1; three conda subdirs times builds) and the >= comparison are unchanged.
  • Tier read: 7 cases against real git repos with a bare origin (an older tag, a tag at HEAD, a tag predating the tier file, a tag only on origin, a missing tag, no tier file at all). All match, and the file is still read at the tagged commit.
  • Equivalence test: it embeds main's three bodies byte for byte.

@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
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, b4831a89f, 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 2930 23 1022 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

Copy link
Copy Markdown
Owner Author

Ready to merge at e22a31aa6: the review is GOOD TO GO and CI is complete (56 passed, 0 failed). The ordering leg ran 2054 tests with 0 failures, and the 3.8–3.10 KTLO legs show 0 failing tests. The branch is one test-only commit behind main (b561d0f), so no rebase is needed. It shares the SCRIPTS tuple with #2079, so whichever merges second needs a small rebase.

Step 2 of #1967, third batch for create-release.yml: three of
version_check's inline shell steps move into stdlib-only scripts, on the
python3 setup-python puts first on PATH, with each step's name, id and
env: unchanged; only the run: bodies differ. Get Version stays inline.

* util/release_tiers.py: "Read the released Python versions", with
  #2079's copy of the released commit's util/_actions.py, where it has one.
* util/release_published.py pypi|anaconda: "Check PyPI publish
  completeness" and "Check Anaconda publish completeness", which shared
  all but endpoint, expectation and count. Same curl, URLs and /tmp paths.
* workflows.rst lists both scripts.

tests/project/test_release_version_check_scripts_1967.py runs each former
shell, kept verbatim, and its script on the same cases against stand-in
python3, git, mktemp and curl, requiring the same status, output,
$GITHUB_OUTPUT, calls and scratch files; the tables reach every exit and
path of each shell, and planted divergences are caught. The tests that ran
or pinned the shell now run or read the scripts.
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main (26f1a72ef), e22a31aa6 → b4831a89f. #2079 changed Read the released Python versions so it copies the released commit's util/_actions.py, but only when that commit has the file. This PR replaces that step's body with release_tiers.py, so the script now does the same copy.

  • The copy: same git cat-file -e condition and same destination. A failed cat-file skips the copy, and a failed git show ends the step with git's status. That matches the shell.
  • Equivalence: FORMER_TIERS now holds main's new body byte for byte. Five new cases cover a released commit with and without the helper, including the older-tag path. Two new plants (an inverted condition and a wrong path) are caught. Against main's new shell, the unported script fails 13 cases.
  • refactor(util): move the remaining Actions output onto the helper (#2047) #2079's tests: both release-reader tests pass against the script.
  • Other checks: SCRIPTS is the sorted union (main's names plus release_published and release_tiers). The YAML diff vs main is still only the three run: values, and actionlint is clean.

The diff changed, so a delta review is running.

@JarryShaw
JarryShaw force-pushed the ci/1967-release-scripts-3 branch from e22a31a to b4831a8 Compare October 23, 2026 13:53
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 23, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at b4831a89f (Sonnet delta review).

  • The ported copy matches main's shell line for line: same cat-file -e against the tagged commit (or the commit that added the tier file), same <scratch>/_actions.py destination, the same copy order before the readers run, and the same failure handling.
  • Real git repos: the reviewer built six cases against a bare origin with tags (helper present, helper absent, older-tag path, tag on HEAD, tag only on the remote, missing tag). It ran main's shell under bash -e side by side with the script. Exit code, stdout, $GITHUB_OUTPUT and the scratch-dir files matched in every case.
  • Other checks: FORMER_TIERS is main's step byte for byte. The YAML diff is only the three run: values, and SCRIPTS is the sorted union. The release, python-versions, helper, KTLO-guard and actionlint tests pass.

@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 merged commit 79934dd into main Oct 23, 2026
63 checks passed
@JarryShaw
JarryShaw deleted the ci/1967-release-scripts-3 branch October 23, 2026 14:41
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 23, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at b4831a89f. The Sonnet delta review is GOOD TO GO and every blocking check passed (Required checks passed SUCCESS); only the GraalPy experimental leg is still running, and nothing waits on it. The 3.8–3.10 KTLO legs carry no warnings. The ordering leg ran 2083 tests with 0 failures. The head is on current main (26f1a72ef).

@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 23, 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) refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant