Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
name: release description: > Cut a release of pipelex, which ships the pipelex and pipelex-api packages and the pipelex/pipelex-api Docker image under one version: the gates, the migration-ledger cross-check, the CHANGELOG.md entry, the pyproject.toml bump with the lock and the badge, one commit, and a pull request to main that publishes to PyPI and Docker Hub on merge. Use when the user says "release", "cut a release", "bump version", "prepare a release", "make a release", "ship it", "create release branch", "promote dev to main", or any variation of shipping a new version of pipelex. Changelog content passed inline ("/release Added new extract backend") becomes the entry. The merge is landed by /ledger-land, never by this skill.
Releasing pipelex
The procedure is the workspace release play, docs/workspace/releasing.md at the workspace root — ../docs/workspace/releasing.md from this repo's own root, which resolves the same from the main checkout and from any worktree. Read it first, then run it with what follows. The repo key is pipelex, the base is dev, and the pull request targets main. The release worktree is _pipelex--release, made with wt add pipelex release --branch release/vX.Y.Z.
What ships
One version, three artifacts, all from one run of .github/workflows/publish-pypi.yml, in this order: the pipelex wheel, the GitHub Release that tags the release commit, the pipelex-api wheel, then the image. The server in api/ takes the library's version, so nothing of it is bumped separately.
- PyPI:
pipelex..github/workflows/publish-pypi.ymlbuilds and publishes through trusted publishing. It fires on the release pull request closing merged intomain(pull_request: types: [closed]), not on the push tomain— so the run is keyed to the release branch and itsheadShais that branch's last commit, never the merge commit. Where the play says "the run on the merge SHA", read it here as the run onrelease/vX.Y.Z. - PyPI:
pipelex-api. The same workflow'sbuild-apijob builds the server's wheel and sdist and refuses them unlessapi/scripts/check_lockstep_pin.pyfindspipelex[...]==X.Y.Zin both, the pinapi/hatch_build.pywrites, andpublish-to-pypiwaits for it, so a server that does not build stops the release before anything is uploaded;publish-api-to-pypiuploads them through trusted publishing in the samepypienvironment, only aftergithub-release, so thepipelexthey pin is on PyPI and the tag guard has accepted the commit they were built from before a server file reaches PyPI. - Docker Hub:
pipelex/pipelex-api:X.Y.Z, andlatest. Thepublish-docker-hubjob calls.github/workflows/publish-docker-hub.ymlwith the version once both distributions are on PyPI: it checks out the commit thevX.Y.Ztag names, runsmake -C api deploy-docker-hubthere (build forlinux/amd64from the repository root, smoke-test that the image boots and reports X.Y.Z for the server and its pipelex, push the version tag, andlatestwhen X.Y.Z is the newest stable release), and confirms the tags through Docker Hub's tags API. A pre-release pushes its own tag and leaveslatestalone, and so does a retry of an older release. The Docker Hub overview is not part of the release and is still updated by hand, by pastingapi/README.mdinto the repository's overview on Docker Hub when it has changed. - The GitHub Release and the
vX.Y.Ztag. The same workflow'sgithub-releasejob creates them, and the tag exists only as a side effect ofgh release create. The release is created and the dists attached before Sigstore signing, which is allowed to fail: an unsigned release is reported as a warning, not a failure, because the tag is the record of what shipped. - The documentation site.
.github/workflows/deploy-docs.ymlfires on the push tomainand runsmake docs-deploy-stable, which deploys the version read frompyproject.tomlwith thelatestalias and republishes the root sitemap. The API server's pages are part of it, underapi-server/, with the OpenAPI artifact beside them.
The landing verifies the publish from the run, the registries and the tag:
gh run list --workflow=publish-pypi.yml --branch release/vX.Y.Z --limit 3 --json name,conclusion,headSha,event,url # success
pip index versions pipelex # the registry answers X.Y.Z
pip index versions pipelex-api # the registry answers X.Y.Z
curl -fsS https://hub.docker.com/v2/namespaces/pipelex/repositories/pipelex-api/tags/X.Y.Z | jq -r .digest # Docker Hub serves the tag
curl -fsS https://hub.docker.com/v2/namespaces/pipelex/repositories/pipelex-api/tags/latest | jq -r .digest # the same digest, for a stable version
git -C <main> fetch --tags --prune origin && git -C <main> tag --list vX.Y.Z
The run concludes success only when every job did, the image's included, so a green run already says all three artifacts shipped; the registry answers are what confirms it from the outside. docker manifest inspect pipelex/pipelex-api:X.Y.Z is the other way to read the image tag.
gh release view vX.Y.Z confirms the Release and its notes. A publish that failed after the merge is recovered by re-running that run's failed jobs, which keeps the successful ones, and that is the path to reach for. It is safe once the dists have reached PyPI: skip-existing opens on a re-run and on a dispatch, so the publish job no longer dies on the files already there, and the build job recovers the bytes this version published rather than rebuilding them — the artifact an attempt of the same run stored, else one an earlier run stored for the same commit, else the files PyPI serves — then refuses to go on unless what it holds is byte-for-byte what PyPI publishes. The Release step itself is idempotent: it edits an existing release rather than failing on one.
The same goes for the server's two artifacts. A failed publish-api-to-pypi is re-run on its own, from the build its run stored. A failed publish-docker-hub is re-run on its own too: a version Docker Hub already serves is never built again, since a rebuild would be a different image under the same tag, so a retry that finds it there only moves latest, when the version is the newest stable release, and confirms the tags. When that failure needs a change to publish-docker-hub.yml, which a re-run would not pick up, dispatch it alone from the branch carrying the fix, gh workflow run publish-docker-hub.yml --ref <branch> -f version=X.Y.Z: whatever the ref, it builds the commit the vX.Y.Z tag names. The Dockerfile and the deploy-docker-hub recipe are that commit's too, so a fix there needs a new release. Docker Hub's tags API then confirms the push, as above. Such a fix must use only actions the organization's Actions allowlist accepts, or GitHub rejects the whole workflow at startup and nothing publishes; make check-actions-allowlist checks every workflow against .github/actions-allowlist.toml on every pull request, since pull-request CI never loads the publish workflows.
workflow_dispatch of publish-pypi.yml is the other path, needed when the failure calls for a change to the workflow file, since a re-run replays the file the run started with. Once the release exists, a dispatch succeeds only from a ref whose head is the commit the release is tagged at — the release pull request's base branch, main normally, while nothing further has landed on it. The tag names the merge commit, a dispatch ships the head of the ref it was dispatched from, and github-release's tag guard refuses any other commit: a dispatch from release/vX.Y.Z is therefore always refused, although it is the ref the failed run is listed under. That dispatch recovers from PyPI rather than from an artifact, the release branch's build being keyed to a different commit, and the bytes are the same either way. A dispatch accepts main, release/vX.Y.Z and pre-release/v* and nothing else, and its run lists under the ref it was dispatched from rather than under the release branch.
Version files and the lock
pyproject.toml— the[project]table'sversion, the one and only place the number is written. Nothing in the package restates it: the runtime reads it back throughget_package_version(). Keep it the file's firstversion =line:changelog-check.ymlandpublish-pypi.ymlboth read it withgrep -m 1 'version = ', andversion-check.ymlwithgrep '^version'.- The lock —
make li(lock + install) regeneratesuv.lock. Stop and report if it fails;uv-lock-checkin CI fails the pull request over a stale lock. - Also stamped:
.badges/tests.json— set"message"to whatmake test-countprints, leaving every other field alone, then runmake check-test-badgeto confirm the two agree. A mismatch is a CI failure on the pull request.docs/api-server/openapi/pipelex-api.openapi.yaml—make -C api openapi-export. The API server inapi/takes the library's version, and its committed OpenAPI artifact carries it asinfo.version, so the bump moves the artifact andmake agent-check, whoseapi-agent-checkrunsopenapi-check, fails until it is re-exported. The only change it should show is that one line; anything more is a wire change that belongs in the changelog.pipelex/errors/registry/pipelex-error-registry.jsonanddocs/errors/index.md—make generate-error-registry. The error registry's snapshot is published under the library's version, a pre-release's in its SemVer form (0.88.0rc1as0.88.0-rc.1), and the Error Codes index names that version, so the bump leaves both stale: the registry's freshness tests fail inmake agent-test, and the release workflow refuses to publish a snapshot whose version is not the release's. The only change they should show is the version; anything more means the registry's source changed without its outputs being regenerated.docs/contribute/error-registry.mddescribes the registry's version..test_durations—make store-test-durations, the per-test timing mappytest-splituses to balance the CI test shards. The refresh is incremental: it collects the suite and measures only the tests missing from the map, so it takes seconds on a quiet release and writes no diff at all when nothing was missing. Read the coverage line it prints before judging how long it should take — past roughly 40% of the suite missing it falls back to re-measuring everything, which takes minutes; treat a long run as a hang only when it reported few tests missing. Include the file in the commit only when it changed.make store-test-durations-forceis not part of the release flow; it is for when recorded values are no longer comparable to each other because the machine or the suite changed shape. The rationale isdocs/contribute/test-duration-map.md.pipelex/migration/ledgers/*.tomlandpipelex/migration/goldens/— only when the migration gate below finds an unaccounted schema change, and then written by theadd-migrationskill, never by hand.
Gates
make agent-check— format, lint, pyright, mypy, plus the migration-ledger legality check, the keyword-only convention, the hub-layering check and the drift contracts. It rewrites files (fix-unused-imports,fix-keyword-only,format), so whatever it touched joins the release commit — and itsdrift-checkreads the git index, so a rewrite made in the same run is invisible to it: stage what the fixers changed and run the target again, because CI reads the committed tree. Red blocks the release: fix the errors, never skip the target.make check-migration-schemas— the schema-coverage gate, whichmake agent-checkdoes not run (it is a golden check and lives inmake check), so without this step a moved configuration surface reaches a release with no migration to repair a user's file. Red blocks the release, and the cure is theadd-migrationskill: it derives the entry from the fingerprint diff the gate just printed, bumps the surface's schema version, regenerates the goldens and adds the changelog bullet. Then re-run the gate. Never runmake up-migration-schemasto make it quiet — a green gate over an unaccounted removal is precisely the failure the gate exists to prevent.The ledger-against-changelog cross-check, once the gate is green. Diff the ledgers against the tag of the version the pre-flight read — the previous release.
origin/mainis not a safe baseline, and frommainitself that diff is empty:git diff v<current version> -- pipelex/migration/ledgers/The migration ledger and the changelog are deliberately separate artifacts saying the same thing to different readers, and this is the only place they are checked against each other. For every entry new since that release carrying
breaking = true, confirm the changelog has a matching**Migration:**bullet naming the entry id and what a user has to do — house style is a bold label, then two to four complete sentences. Write it now if it is missing; the gates run before the entry is assembled, so at this point that content is what[Unreleased]holds.- A renumbered entry reads as two ids, and both need a mention. A pre-history entry inserted below existing ones takes a version already in use and pushes everything above it up, so the diff shows one id modified and one added — which looks like two independent breaking changes and is one insertion. The changelog must name the new entry and say that the existing one was renumbered, so a reader who quoted the old id somewhere can still find it.
- Confirm
introduced_inon every such entry. It is written when the entry is authored, before the release number is known, so it is routinely one bump off. Nothing branches on it, but it is what a reader correlates the changelog against: fix it here rather than leaving it wrong. - A breaking ledger entry makes this a minor release, per the pre-1.0 convention. If the bump was settled as a patch and this step finds one, go back and settle the bump again before writing the version into the entry.
Full context:
docs/migration-ledger.md.
The release commit
pyproject.toml, CHANGELOG.md, uv.lock, .badges/tests.json, docs/api-server/openapi/pipelex-api.openapi.yaml, pipelex/errors/registry/pipelex-error-registry.json, docs/errors/index.md, .test_durations when make store-test-durations changed it, whatever make agent-check rewrote, and the pipelex/migration/ledgers/*.toml and pipelex/migration/goldens/ files the add-migration skill wrote when it ran. By name.
CI on the release pull request
The checks that exist for the release:
guard-branches.yml(gate-main) — refuses any head branch intomainthat is notrelease/vX.Y.Zexactly, so the release branch name is the only way in.version-check.yml—pyproject.toml's version equals the version in the branch name. A head that does not match the release form does not slip past it: theexit 0in its first step ends that step alone, and the comparison that follows then fails on an empty branch version.changelog-check.yml—CHANGELOG.mdcarries## [vX.Y.Z] -for the version inpyproject.toml. It asserts nothing about[Unreleased]: a leftover heading passes CI and ships a wrong changelog, so removing it is this skill's job, not CI's.check-test-count-badge.yml—make check-test-badgeon every pull request tomain.package-check.yml(uv-lock-check, on every pull request) —uv lock --lockedleavesuv.lockunchanged, andrequires-pythonstill starts at>=3.11.
The pre-main gates a release pull request meets that a pull request to dev never does — they are slower, and a red here is the release stopping:
lint-fresh-check.yml— the read-only lint suite across every supported Python version with no mypy cache, so incremental-mypy drift and version-specific breakage cannot reachmain. Each version's leg checks the API server too.tests-full-check.yml— the full Python matrix, sharded and balanced by.test_durations, and the API server's tests on every supported version (Tests full (api, pyX)).doc-check.yml—mkdocs build --strict, which runs unconditionally when the base ismainrather than only whendocs/changed.
Everything that runs on every pull request gates it too, including the server's Lint (api), Tests (api), Tests (packages), which builds both packages and checks the pipelex-api pin, and Tests (api image), which builds and smoke-tests the image, and lint-check.yml's Lint (agent-rules) and Lint (config-sync) jobs (make check-rules and make check-config-sync, neither of which make agent-check runs), tests-check.yml, mthds-standard-check.yml, and dependency-review.yml, which fails on a newly introduced dependency vulnerable at moderate severity or above and runs on pull requests to dev just the same. A red in mthds-standard-check.yml with no pinned-set change in the branch means the MTHDS standard moved, and the remedy is a dedicated change bringing the pinned natives to the standard's page — never a tweak to the release branch.
Particulars
- The first release that ships the server explains the image's version jump. The
pipelex/pipelex-apiimage was released on its own until0.33.2, from thePipelex/pipelex-apirepository; its next tag is this release's version.[Unreleased]already says so in itsThe Pipelex API server ships with pipelexentry: keep that sentence when folding the entry, and say it in the pull request body. Releases after that one need no such note. - A server change is an entry in this changelog.
api/CHANGELOG.mdstops at0.33.2and is never extended. - The migration gate feeds back into the bump. A breaking entry found by the cross-check above turns a patch into a minor, so the bump is not final until that gate has run.
- The pre-release track is a different flow, not this play.
pre-release/vX.Y.Z(a|b|rc)Nis a base branch that work merges into:prerelease-version-check.ymlvalidates the PEP 440 form against the branch name,publish-pypi.ymlalso fires on a merge into it, marks the GitHub Release a pre-release and publishes the server's wheel and image as well, the image under its own tag withlatestleft on the last stable release, anddeploy-docs.ymlfires on the push to it as well, publishing the docs under thepre-releasealias withmake docs-deploy-specific-version-pre-release. Arelease/vX.Y.Zbranch therefore never carries a pre-release version:version-check.ymlfails on the mismatch with the branch name, andguard-branches.ymlrefuses arelease/vX.Y.Z(a|b|rc)Nhead intomainoutright. - The changelog heading carries the
v—## [vX.Y.Z] - YYYY-MM-DD, which is exactly whatchangelog-check.ymlgreps for and whatpublish-pypi.ymlslices the GitHub Release notes out of. No[Unreleased]heading is left behind; the next change re-creates one. .worktreeincludenames the gitignored files a fresh worktree needs —.env, the.pipelex/overrides and.pipelex-dev/test_profiles_override.toml— andwt addprovisions them. A gate that fails in_pipelex--releaseon a missing local config means that file is short: add it there rather than hand-copying the file every release.