Skip to content

ci: warn near package size caps and print the release restart command - #609

Merged
JuroOravec merged 2 commits into
mainfrom
ci/release-process-notes
Nov 2, 2026
Merged

JuroOravec merged 2 commits into
mainfrom
ci/release-process-notes

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Refs #608. This pull request covers items (a), (b), (c), and (f), and the documentation half of (e). Item (d) and the scripts/release.py candidate idea in (e) stay open in the issue.

What changed

  • (a) and (c), docs. docs/codebase.md gets a section, "Releasing advisory fixes". It says why the fixes have never run in CI, the order to land them in (one chain of commits, a fast-forward of main, close each advisory's fork pull request), and to wait for the test runs on main to pass before raising versions. No code enforces the wait, as decided in the issue. "How changes reach main" now points to the section as the one change a person makes that does not go through a pull request.
  • (b), size report. scripts/check_package_sizes.py prints the size of each built package file next to its release cap and writes a ::warning:: for a file at 90 percent of its cap or more. It reads each cap from the verifier that enforces it (MAX_WHEEL_BYTES or MAX_SDIST_BYTES), so no number is copied. Tests use synthetic files. They change each cap in its verifier and check that the report follows, and they fail when a verifier gains a cap or an expected release file that the script does not list.
  • (f), restart command. ci: let a release recover from a registry or signing outage #592 already retries a failed publish step and documents the restart command. The gap was that the controller's failure message did not print it. main in scripts/release.py now prints the command, with the candidate run ID filled in, after any error that stops publish, plus a note that a failure that is not a short outage fails again until its cause is fixed. Starting again re-checks everything and is safe after any failure, once every publish run has finished, so the command is not limited to outages. A failure before the controller starts on the candidate (a missing token, an unreadable candidate file) and a failed qualification, which has no candidate yet, print no command.
  • (e), docs only. Release steps 4 and 6 show the gh workflow run repo--release-candidate.yml command and how to find a candidate's run ID.

Item (b): where it runs and what it costs

It runs in the citry-ui-wheel-build job of py--tests.yml, which already builds the package files that have a size cap, except the VS Code extension's. That job is a required check on main, and it runs on pull requests that change Python inputs and on pushes to main. The new step reuses the files that job already built and adds no build. On a laptop it took about 0.1 seconds, and the runner adds a second or two to start a step.

The step runs before the release checks, so one run lists every package even when the first check then fails on a file over its cap. To get that order, the LSP and Pygments uv build commands moved from the check step into their own step ahead of the report. The builds are the same and take about a second each. Both path lists in the workflow name the new script, and the existing test that compares them still passes. A new test checks the step order and that the step's file patterns match what the builds write.

The script only warns. The release checks still fail a file over its cap, except for the citry-ui source distribution, which only release qualification checks. For that file, the warning is the one notice a pull request gives. The VS Code extension is not built in this job, so it has no warning.

Checks run

  • ruff check and ruff format --check on scripts/ and the touched tests.
  • mypy on the touched files, on macOS and with --platform linux.
  • pytest on test_package_size_check.py, test_release_controller.py, test_ci_workflows.py, test_pypi_release.py, test_toolchain_validator.py, test_repo_check_script.py, and test_release_caches_validator.py.
  • scripts/validate.py (all validators).
  • The script run against a citry, citry-ui, citry-lsp, and pygments-citry build made from this branch. The citry-core wheel needs a Rust build, so its cap is covered by the synthetic tests only.
  • Two reviews by separate agents: one for correctness, one for prose. Their findings are folded in. The survey of other frameworks' advisories (Mechanism 8) is in a private repository the reviewers could not open, so that check is not done. The change touches no code that ships in a published package, and no value that reaches a browser.

For the maintainer

  • Step 2 of the new docs section says the fast-forward is a direct push that the rulesets block, so the maintainer lifts the block for that push and restores it afterwards. I could not tell from the repository which setting you changed for 0.7.0. Please correct that sentence if it is not what you did.
  • Merging this changes scripts/release.py, which is in the path list of Prepare release candidate. It starts a run on main, as ci: let a release recover from a registry or signing outage #592 did. Every package version already has a tag, so that run ends in its no-release job.

🤖 Generated with Claude Code

Refs #608.

- Add scripts/check_package_sizes.py. The wheel build job runs it before
  the release checks. It prints each built file's size next to its cap and
  writes a GitHub Actions warning at 90 percent of the cap. Each cap is read
  from the verifier that enforces it.
- Print the command that starts a release again, with the candidate run ID,
  after any error that stops publication.
- Document the route for fixes built in private security advisories, the
  wait for CI on main, and the gh commands that start a release candidate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit 56ec119 into main Nov 2, 2026
9 of 22 checks passed
@JuroOravec
JuroOravec deleted the ci/release-process-notes branch November 2, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant