Release Process¶
Opencomplai follows Semantic Versioning (MAJOR.MINOR.PATCH). Four Python packages ship from this repo, all published to PyPI: opencomplai-core, opencomplai-cli, opencomplai-ai, and the opencomplai meta-package (the SDK). To find the version currently released, check the version field in packages/core/pyproject.toml (the other three packages track it — see below), the PyPI badge in the repo README, or run opencomplai --version. Don't trust a version number written into this page as a fact — packages move fast enough that it would go stale.
Version policy¶
| Package | Versioning |
|---|---|
opencomplai-core | Semver; breaking model or rule API changes bump MAJOR |
opencomplai-cli | Semver; new commands or changed exit codes bump MINOR |
opencomplai-ai | Semver; follows core |
opencomplai (SDK meta-package) | Semver; follows core and cli |
| Gateway API | Path-prefix versioning (/v1/, /v2/); parallel for ≥ 90 days |
All four Python packages move together — same version number across all four pyproject.toml files in a given release. The gateway API versions independently of the Python packages.
Build and publish order¶
The four packages have a dependency chain, so they are built and published in this order (both locally and in CI):
opencomplai-core— no local dependencies.opencomplai-cli— depends onopencomplai-core.opencomplai-ai— depends onopencomplai-coreonly, independent ofcli.opencomplai(SDK meta-package) — depends on bothopencomplai-coreandopencomplai-cli, so it is always built and published last.
Checker widget build prerequisite¶
Before opencomplai-cli is built, the docs checker widget must be built:
This generates packages/cli/src/opencomplai_cli/data/checker-local.html, a git-ignored asset that packages/cli/pyproject.toml force-includes into the wheel. Skip this step and the opencomplai-cli build fails with "Forced include not found." .github/workflows/publish-pypi.yml runs this build automatically before building any of the four distributions, so a tag-push release never needs it done by hand.
Release checklist¶
- Create a release branch from
main:git checkout -b release/vX.Y.Z. - Bump
versionto the same new value in all four package manifests: packages/core/pyproject.tomlpackages/cli/pyproject.tomlpackages/ai/pyproject.tomlpackages/sdk-python/pyproject.toml- Update
CHANGELOG.md— move items fromUnreleasedto the new version heading. - Run the full test suite:
uv run pytest packages/for the four Python packages, pluscd services/gateway-api && pnpm testfor the gateway API. - Open a release PR targeting
main, get it reviewed, and merge it. - Tag the merge commit
vX.Y.Zand push the tag. - Pushing the tag triggers
.github/workflows/publish-pypi.yml— itsbuildjob first checks the tag against the four manifest versions and fails on any mismatch, builds the checker widget and all four distributions, runs the wheel smoke test and generates a CycloneDX SBOM per package (kept as a workflow-run artifact). Only then does thepublishjob upload the tested distributions to PyPI in the dependency order above via Trusted Publishing (OIDC; no stored API token) with PEP 740 attestations. Each upload usesskip-existing: true, so re-pushing a tag for a version already on PyPI is a no-op, not an error. A manualworkflow_dispatchrun is a dry run: it builds, smoke tests and produces SBOMs, and publishes nothing. - Create a GitHub Release from the tag with the CHANGELOG section as the body.
- Bump the GitHub Action. Once the four packages are on PyPI, in a checkout of
Opencomplai/opencomplai-actionrunscripts/bump-cli-version.sh X.Y.Z, add a CHANGELOG entry, commit, publish a releasevMAJOR.MINOR.PATCHwith "Publish this Release to the GitHub Marketplace" ticked, and move thev1tag to it (that repository'srelease.ymldoes this once Actions run there). Check that the new pin is live:curl -s https://raw.githubusercontent.com/Opencomplai/opencomplai-action/v1/action.yml | grep -A2 "^ version:"showsX.Y.Z.
Homebrew tap and signing secret¶
Both operations below are founder-only. Run them by hand on the founder's machine after a release is on PyPI. Nothing in the release tag workflow creates a repository or a secret.
Homebrew tap (the tap Opencomplai/homebrew-tap has existed since 8 Nov 2026 and holds the published formula; run the steps in this order; replace <version> with the released version)
- Confirm the new version's sdist is on PyPI: open
https://pypi.org/project/opencomplai/<version>/#files. - Copy
packaging/homebrew/opencomplai.rbto a scratch file and runbash scripts/homebrew-release.sh <version> --formula <copy>. It reads the sdist sha256 and the hashed source url from the PyPI JSON, downloads the sdist and checks that its bytes match that digest, then patches the copy'surlandsha256. It refuses a placeholder or all-zero digest, a checksum mismatch, and a url that is not a PyPI files url for this sdist or that disagrees with the JSON's blake2b_256 digest, and it patches the formula once the index, digest and download checks pass; the lint step runs after the patch and a failure leaves the patched file for you to review. Exit code 0 means pass, 1 means a named step failed, 2 means bad usage. The committed template keeps its placeholder hash, so this step changes no file in the repository. - Add the dependency resource blocks to the copy.
brew update-python-resourcesignores releases under 24 hours old, so on release day it fails; run it the next day, or use the formula's Python (3.12) to runpython -m pip install --dry-run --ignore-installed --report report.json opencomplai==<version>and thenpython packaging/homebrew/resources.py report.json <copy>, which refuses any third-party package under 24 hours old. - Build and test the copy in a throwaway
homebrew/brewcontainer, as described inpackaging/homebrew/README.md:brew style,brew audit --strict --new,brew install --build-from-source,brew testand a realopencomplai check. - Copy the copy to
Formula/opencomplai.rbin the tap repository and push it withgit push. On a Windows machine the push can open a Git Credential Manager "Select an account" window: choose the account that has write access to the organisation. - In a clean container, run
brew tap Opencomplai/tapand thenbrew install Opencomplai/tap/opencomplaionce, and runbrew teston it.
What flips planned to live: only after the tap is pushed (step 5) and step 6 works on the platforms the page names (on 8 Nov 2026 it was proven on Linux only; macOS is untested), edit the "Homebrew (planned)" block in docs/src/getting-started/installation.md and the matching assertion in packages/cli/tests/test_homebrew_formula.py in one commit. Until then the installation page stays "planned".
Signing secret (independent of the tap, and may be done at any time)
Run gh auth login yourself first. Then run bash scripts/signing-secret.sh OPENCOMPLAI_SIGNING_KEY <owner>/<repo>, where <owner>/<repo> is the repository that holds the release workflow. The script generates an Ed25519 key in memory and pipes it straight to gh secret set. The private key is never printed and never written to a file. The script prints only the public key, so publish that public key for verifiers. It refuses to replace an existing secret unless you pass --replace, because a replacement changes the key that every earlier signature was made with.
For how the secret is used in CI, see Attach the artifact to a release. For key handling, see Key management.
Order of steps
- Release on PyPI through the tag workflow.
- The tap repository exists (created 8 Nov 2026).
- Run the Homebrew steps above (
scripts/homebrew-release.sh, the resource blocks, the container test), then push the tap. - Flip the installation page to live after
brew installworks from a clean machine. - Create the signing secret with
scripts/signing-secret.sh(independent of the tap).
Hotfixes¶
For critical security or correctness fixes on a released version:
- Branch from the release tag:
git checkout -b hotfix/vX.Y.Z+1 vX.Y.Z. - Apply the minimal fix.
- Follow the release checklist from step 2.