Releasing CodeNib¶
pyproject.toml is the only authored package-version source. Runtime
codenib.__version__, wheel metadata, and codenib --version read the
installed distribution metadata generated from it.
Automated Gates¶
The reusable Release verification workflow runs from both publishing workflows. It:
- Tests and production-builds the packaged Wiki frontend.
- Builds one sdist and one universal wheel.
- Runs
twine checkand validates package contents and metadata. - Installs the wheel on every supported Python minor version.
- Builds a real BM25 index through the installed
codenibcommand. - Exercises the installed Wiki and MCP services end to end.
- Runs sparse Ask through a local OpenAI-compatible endpoint, including a real BM25 tool call, final answer, and source citation, without installing semantic or graph extras.
- Installs the graph extra and a pinned Python SCIP provider, then verifies repository-aware diagnostics, a real caller-to-callee graph edge, source anchors, and the installed Dependency Map API.
Manually dispatching the TestPyPI Release workflow from main runs these gates
and then publishes to TestPyPI. Production publishing remains in the separate
Release workflow and requires a v<version> tag that exactly matches
project.version. After PyPI publication, the workflow creates a prerelease
GitHub Release containing the distributions and SHA256SUMS.
Trusted Publisher Setup¶
For the first release, create a pending publisher on both the PyPI and TestPyPI account pages. Register these publisher identities:
| Registry | Project | Owner | Repository | Workflow | Environment |
|---|---|---|---|---|---|
| TestPyPI | codenib |
sysevol-ai |
CodeNib |
release-test.yml |
testpypi |
| PyPI | codenib |
sysevol-ai |
CodeNib |
release.yml |
pypi |
These values must match exactly; an unregistered or mismatched publisher fails
the OIDC exchange with invalid-publisher. Do not register the reusable
release-verify.yml workflow as a publisher: it never receives an OIDC token
or uploads a distribution.
PyPI and TestPyPI are separate registries: configuring one does not configure
the other. A GitHub pypi or testpypi deployment environment scopes the
workflow job but does not register a publisher with either registry. Confirm
that each pending publisher appears on the corresponding registry account page
before dispatching a publish workflow.
The corresponding GitHub environments should restrict deployments to trusted
maintainers. Each publishing workflow receives id-token: write only in its
publishing job; no long-lived PyPI token or runner-local .pypirc is used.
Public Surface Gate¶
Before the production tag, make the repository public and manually dispatch
the Docs workflow from main. Confirm that the documentation site and the two
README assets are anonymously reachable:
https://docs.codenib.ai/
https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_logo.svg
https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_wiki.png
The README uses absolute asset URLs because it is also the PyPI project description; repository-relative images have no repository base when rendered on PyPI.
Release Checklist¶
- Move relevant entries from
Unreleasedinto a dated version section inCHANGELOG.md. - Confirm
pyproject.tomluses the release version and the READMECitationsection still matches the current arXiv entry. - Run
pre-commit run --all-filesand the local package smoke. - Merge the release commit to
mainand confirm its package gates pass. - Confirm the TestPyPI pending publisher is visible, then dispatch the
TestPyPI Release workflow from
main. - Install and test the TestPyPI artifact in a clean environment.
- Complete the public-surface gate above.
- Confirm the PyPI pending publisher is visible.
- Create and push an annotated
v<version>tag. - Confirm the PyPI deployment and generated prerelease GitHub Release.
Do not reuse a published version. If publication partially succeeds, increment the version and produce new artifacts.