Repository navigation
Conversation
The release pipeline stamps pyproject.toml with the tag's version (0.12.2-rc.1). Packaging normalizes that to the PEP 440 form 0.12.2rc1 in the installed metadata, and the wrapper built its download URL from the metadata, asking for a v0.12.2rc1 release that never exists. The one release candidate published to PyPI so far (0.9.1rc1) could therefore never install: its wrapper requested v0.9.1rc1, while the release is v0.9.1-rc.1. Map the PEP 440 release-candidate form back to the tag it was built from. Stable versions are unchanged. Verified on real wheels built with the pinned hatchling: the wheel from main requests .../download/v0.12.2rc1, the fixed one .../download/v0.12.2-rc.1. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
…ishing release.yml now cuts release candidates (vX.Y.Z-rc.N) on a Monday and Thursday schedule, or on demand by dispatching with an empty version. They run every gate a stable release runs (tests, VirusTotal, smoke, soak, signing, verify); only the publishing tail differs. Stable releases stay maintainer-dispatched. - plan (scripts/ci/release-plan.py) decides version and channel from git tags, the npm and PyPI version lists and the GitHub releases. Only vX.Y.Z and vX.Y.Z-rc.N are accepted (PEP 440 reads some suffixes, such as v1.0-1, as final releases, and the Go wrapper understands only -rc.N). The deployment environment follows the version's shape, so an unclear input lands in the approval gate. An RC number is one above the highest that any source holds, so a red run can never cause a number to be reused. A scheduled run skips when no shipped file changed, while the RC_SCHEDULE variable is off, or while another Release run is active; a dispatch then fails instead. - npm and PyPI are reached by OIDC trusted publishing only, from the `release` environment (maintainer approval) or the `rc` environment (unattended, main only). NPM_TOKEN and PYPI_TOKEN are no longer referenced. npm is pinned to 11.21.3 (dist-tag under trusted publishing needs 11.21.0); PyPI uploads through pypa/gh-action-pypi-publish pinned by commit. - The pkg/go tag is pushed after the un-draft, never forced, so Go never resolves a version whose release is still a draft. `replace` deletes only drafts. RC notes compare against the previous stable. - reconcile (scripts/ci/rc-reconcile.py) settles what a red RC run left: a draft that npm or PyPI already serves is made public, a draft nothing serves is deleted with its tag, a published release is never touched. - rc-retry.yml reruns a failed scheduled RC at most twice, by a fail-closed policy (scripts/ci/rc-retry-decide.py): gates, publishing jobs and a test step that failed on two or more legs are never retried. A green on retry is published with a "passed on retry" note naming the job. Outcomes are logged on one tracking issue. It runs on a schedule rather than workflow_run, which matches workflows by name and most likely does not fire for reruns started by the workflow token. Contracts: test_release_plan, test_rc_reconcile, test_rc_retry_policy and test_release_rc_flow pin these rules; each rule was checked to fail its test when broken. test_release_gate_chain now also allows `plan` in the smoke and soak needs, which carry the planned version; `build` must still be a direct dependency. The schedule stays off until RC_SCHEDULE is set to "on". Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
An independent review of the release-candidate flow found ways a rerun or a cleanup could do the wrong thing. Each is fixed with a test that fails without the fix: - A rerun skips `plan`, so the retry controller reruns only the newest Release run and only while no other run is active. Release tags are pushed without --force, so a second run can never move another run's tag. - Packaging is split from publishing. package-registries builds the npm tarball and the PyPI files with no publish identity, from a toolchain installed by hash; the hatchling build backend is now hash-pinned too and used with --no-isolation. publish-registries checks out nothing, holds only id-token, and only uploads. - Moving npm `next` after a stable runs last and only warns on failure, so it can never leave `latest` pointing at a release still in draft. - Reconcile creates and deletes tags through the REST API, so it no longer needs the tagged commit in a shallow checkout. It repairs a published RC above the newest stable that lacks its pkg/go tag, re-reads live state before every action, and asks npm and PyPI for the exact version before deleting a draft, since listings can lag. - The retry controller is rewritten in Python with per-run error isolation. Only markers written by github-actions[bot] count. An attempt that fails the same way as the one before is not retried. A test leg's derived shard-completeness failure no longer blocks its infra retry, and the plan's network collection step is retryable. - Smaller fixes: version digits are ASCII only; a stale RC_BASE_VERSION falls back to the newest stable + 1 patch with a warning; renames count on both ends of the changed-files diff; RC checksums no longer list the legacy ui-* aliases. Retries now cover every Release run on main (scheduled and dispatched, stable included) and run hourly; the RELEASE_RETRY variable set to "off" stops them. Renamed accordingly: release-retry.yml, release-retry-decide.py, release-retry.py, and the tracking issue "Release run retries". Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This branch has not been deployed
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.
What this does
Automatic release candidates (
vX.Y.Z-rc.N) twice a week, token-free registry publishing, and automatic retries of flaky release runs, while stable releases stay maintainer-dispatched and maintainer-approved.release.ymlgains a Monday/Thursday schedule and aplanjob (scripts/ci/release-plan.py). A release candidate runs every gate a stable release runs (tests, VirusTotal candidate scan, smoke, soak, signing, provenance, SBOM, security, CodeQL, verify); only the publishing tail differs: GitHub pre-release, npmnext, PyPI pre-release; no MCP Registry, no legacyui-*aliases.vX.Y.ZandvX.Y.Z-rc.Nexist. Only an-rc.Nmay publish from the unattendedrcenvironment; everything else goes throughrelease, which needs the maintainer's approval. Checked inplan,preflightand at the start of the publish job. RC numbers are one above the highest any of git tags, npm and PyPI holds, so a number is never reused.release.ymlin thercorreleaseenvironment (both restricted tomain). Packaging (package-registries) runs with no publish identity from a hash-pinned toolchain (the hatchling build backend now included, built with--no-isolation);publish-registrieschecks out nothing, holds onlyid-token, and only uploads.scripts/ci/rc-reconcile.pymakes a draft public when npm or PyPI already serves it, deletes a draft nothing serves (after asking both registries for that exact version), never touches a published release, and never touches a stable. Thepkg/gotag is pushed only after the un-draft, never forced.release-retry.yml, hourly,RELEASE_RETRY=offstops it): the failed jobs of the newest Release run, scheduled or dispatched, are rerun at most twice by a fail-closed policy (scripts/ci/release-retry-decide.py). Gates (VirusTotal, security, license, CodeQL, lint), publishing jobs, and a test step that failed on two or more legs or on two attempts are never retried. A green on retry ships with a "passed on retry" paragraph naming the flaky job. Every outcome is logged on one "Release run retries" issue.v0.12.2rc1(PEP 440 spelling), a release that never exists; it now uses the tag formv0.12.2-rc.1. The one RC ever published to PyPI (0.9.1rc1) could not install.The schedule stays off until the repository variable
RC_SCHEDULEis set toon.CI scope
release.ymlandrelease-retry.ymlare not PR checks. Five new contract tests (seconds each) joinscripts/test.sh.RC_SCHEDULE=on), hourly retry pass (stop withRELEASE_RETRY=off); dispatch unchanged, except that an empty version now means "the next release candidate".How it was verified
0.9.1-rc.1/0.9.1rc1); the retry policy replayed over the five real release runs of October (it retries the two single-leg Windows ARM64 soak failures, stops at the Security-audits gate and at the 12-leg smoke failure, and stops attempt 2 of that run because it failed identically to attempt 1, as the manual rerun did); a read-only dry run of reconcile and of the retry controller against the live repository; real PyPI wheels built frommainand from the fix (v0.12.2rc1before,v0.12.2-rc.1after; GitHub hasv0.9.1-rc.1, notv0.9.1rc1); the hash-pinned toolchain building sdist and wheel with--no-isolationin a linux/amd64 Python 3.12 container;npm packproducing the exact tarball name the publish job expects.tests/test_release_gate_chain_contract.shnow also allowsplanin thesmoke/soakneeds (they carry the planned version);buildmust still be a direct dependency.Before merging
codebase-memory-mcp(an entry must be validated by a publish within 48 h of creation):release.yml+ environmentrc(allownpm publish), andrelease.yml+ environmentrelease(allownpm publishandnpm dist-tag). The PyPI publishers and both GitHub environments already exist.After merging
RC_SCHEDULE=on.NPM_TOKENandPYPI_TOKEN, and switch npm publishing access to "disallow tokens".