Skip to content

ci(release): move Reset Build Number into util/release_reset_build.py (#1967) - #2093

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

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

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

This is the last create-release batch for #1967. Each step of the github and tag jobs, and cron-conda's Check the GitHub release exists, was judged against the inline rule.

Step Lines Verdict
github / Select release body 15 keep inline: one place, never fixed
github / Explain a refused release tag 6 keep inline: trivial
tag / Create Tag 20 keep inline: one place. Its overlap with release_tags.py reads the tag differently.
tag / Reset Build Number 44 move: a 3-attempt push loop with 5 exits; it is the #1634 fix
cron-conda / Check the GitHub release exists 18 keep inline: shares no logic with create-release
  • util/release_reset_build.py: stdlib only and 3.7-parseable, since the tag job has no setup-python. The step keeps its name, env and position.
  • Equivalence: test_release_reset_build_1967 runs the old shell verbatim beside the script, on scratch repos. It covers 24 cases across every exit, comparing status, output, origin refs, HEAD and conda/build. Five planted divergences were caught.
  • Results: the release, tag, helper and actionlint tests pass.

@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
…#1967)

Per the 2026-10-23 ruling on #1967, judged step by step: of the github
and tag jobs' remaining shell, only Reset Build Number has real logic
(44 lines, a three-attempt push loop, five early exits, the #1634
history). Select release body, Explain a refused release tag and Create
Tag stay inline, as does cron-conda.yml's release check.

- util/release_reset_build.py: the former shell's decisions, git calls,
  lines and annotations, and its exit statuses under set -euo pipefail.
- create-release.yml: the step runs the script, keeping its name and env.
- tests: the former shell runs verbatim beside the script on scratch
  repositories, covering every way it ends; the step, its whole checkout,
  its git calls and 3.7 syntax are pinned. The helper test lists it.
- workflows.rst: its row in the Workflow Scripts table.
@JarryShaw
JarryShaw force-pushed the ci/1967-release-scripts-5 branch from 3840ba8 to eabadbd Compare October 23, 2026 18:36
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at eabadbdab (Sonnet review of 3840ba814, plus a test-only amend).

  • Behaviour: the review found no divergence from the old step. Retries, tag parse, conda/build strip, commit/switch/push arguments, exit codes and messages all match. There is no pull, merge, reset or force push. The PyYAML diff touches only the step's run:.
  • Equivalence: FORMER_RESET equals the old body exactly. Every case reaches its expected exit, and four of the reviewer's own planted mutations failed.
  • Amend: the review found that dropping --force from git switch passed every test. eabadbdab now pins it in the git-call test and adds a dirty-checkout case. Without --force, those 2 tests fail; with it, 7 pass with 97 subtests.
  • Create Tag: the reviewer argued it could move (20 lines, three-way branch, fix(ci): Create Release tags main's tip at approval time, not the commit it was created for #1634). It stays inline, like vendor_update's 19-line single-site step under the same rule. That call is open to the owner.

@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

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, eabadbdab, 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 eabadbdab.

  • Review: the Sonnet review is GOOD TO GO, with the --force test gap closed in the amend.
  • CI: every blocking check passed (Required checks passed SUCCESS). The 3.8–3.10 KTLO legs carry no warnings.
  • Ordering: the tests/project plain-unittest ordering leg passed on a scratch merge into main, 2121 tests with 0 failures.
  • Base: the head is on current main (cfabfb2d3).

With this merged, every create-release step has been judged under the #1967 inline rule.

@JarryShaw
JarryShaw merged commit d2b9b32 into main Oct 23, 2026
61 checks passed
@JarryShaw
JarryShaw deleted the ci/1967-release-scripts-5 branch October 23, 2026 19:16
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 23, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 23, 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) 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