Adopt verifiers-style dynamic versioning#96
Merged
Conversation
Today every push to main is preceded by an auto-created tag
``renderers-v<next>.dev<N>`` (publish-dev.yml's ``tag:`` job), because the
old hatch-vcs setup would otherwise emit a ``+gHASH`` local segment that
PyPI rejects. This works for the publish path but breaks local
development: setuptools-scm refuses to bump a pre-existing ``.devN``
tag, so ``uv lock`` / ``uv build`` on any untagged main commit
fails with::
ValueError: Error getting the version from source ``vcs``: choosing
custom numbers for the ``.devX`` distance is not supported.
The 0.1.8.dev45 can't be bumped
Forcing every contributor through ``SETUPTOOLS_SCM_PRETEND_VERSION=...``
to lock dependencies isn't a great state. It also pollutes the tag
namespace (~45 dev tags per release cycle).
Verifiers (sibling repo, same maintainers) solves the same PyPI
constraint differently — and we should match:
* ``[tool.hatch.version.raw-options]`` sets ``local_scheme =
"no-local-version"`` so the ``+gHASH`` segment is stripped at build
time. PyPI accepts the wheel without needing a real tag at HEAD.
* ``git_describe_command`` restricts version resolution to stable
``renderers-v<MAJOR>.<MINOR>.<PATCH>`` tags via ``--match`` +
``--exclude "*dev*"``. setuptools-scm derives the dev version itself
from commit distance to the latest stable tag (``0.1.8.dev<N>``); no
pre-created tag needed, no bumping confusion.
* publish-dev.yml drops the ``tag:`` job entirely. The ``build:`` job
checks out main with ``fetch-depth: 0`` and runs ``uv build`` —
hatch-vcs computes the version on the fly. Same publish cadence
(every push → dev wheel on PyPI), no tag churn.
The existing ``renderers-v0.1.8.devN`` tags on the remote stay where
they are; ``--exclude "*dev*"`` filters them out of ``git describe`` so
they don't interfere. Cleaning them up is optional housekeeping for a
separate PR.
Verification:
* ``uv build`` (no env vars) → ``renderers-0.1.8.dev49`` clean wheel.
* ``uv lock`` (no env vars) → resolves in <1s.
* publish.yml (stable releases) unchanged — its tag-driven path still
matches ``tag-pattern = '^renderers-v(?P<version>.+)$'``.
uv.lock side effects:
* ``exclude-newer`` cutoff advances 2026-05-18 → 2026-06-19 (rolling
7-day cooldown catching up).
* ``openai-harmony`` constraint in the lock realigns with
pyproject.toml's stated ``>=0.0.4`` (the lock had drifted to
``>=0.0.8``). pyproject.toml itself is unchanged — this is the lock
catching up to a long-standing source constraint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ApprovabilityVerdict: Approved This PR simplifies CI/CD versioning by replacing per-commit tag creation with hatch-vcs dynamic version derivation from git describe. Changes are limited to build configuration (pyproject.toml, workflow, lock file) with no runtime code impact. You can customize Macroscope's approvability policy. Learn more. |
joanvelja
added a commit
to joanvelja/renderers
that referenced
this pull request
Jun 27, 2026
…ens removal PrimeIntellect-ai#95, dyn-versioning PrimeIntellect-ai#96) + migrate gemma4 (#10) * adopt verifiers-style dynamic versioning (PrimeIntellect-ai#96) * remove fastokens entirely for now (PrimeIntellect-ai#95) * feat(thinking): replace preserve_* bools with thinking_retention, respected by the bridge (PrimeIntellect-ai#88) * migrate gemma4 to thinking_retention (render+bridge, implied=all; debate hot path 1:1, full-render keeps thinking) + fastokens test fix --------- Co-authored-by: hallerite <git@hallerite.com>
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.
Why
Today,
.github/workflows/publish-dev.ymlcreates a freshrenderers-v<next>.dev<N>tag on every push to main and builds from that tag. This works for the publish path but breaks local development: setuptools-scm refuses to bump a pre-existing.devNtag, so on any untagged main commit,uv lock/uv buildfails with:Forcing every contributor through
SETUPTOOLS_SCM_PRETEND_VERSION=...to runuv lockisn't a great state. It also pollutes the tag namespace (~45 dev tags per release cycle).verifiers (sibling repo, same maintainers) solves the same PyPI
+gHASH-local-segment constraint differently — and we should match.What changes
pyproject.tomlAdd
[tool.hatch.version.raw-options]:local_scheme = "no-local-version"strips the+gHASHsegment at build time. PyPI accepts the wheel directly with no pre-created tag at HEAD.git_describe_commandrestricts version resolution to stablerenderers-v<MAJOR>.<MINOR>.<PATCH>tags via--match+--exclude "*dev*". setuptools-scm derives the dev version from commit distance to the last stable tag (e.g.0.1.8.dev49); no pre-created tag needed..github/workflows/publish-dev.ymlDrop the
tag:job entirely (73 lines → ~30 less). Thebuild:job now checks out main withfetch-depth: 0and runsuv build— hatch-vcs computes the version on the fly. Same publish cadence (every push → dev wheel on PyPI), no per-commit tags created.Existing dev tags
The ~45
renderers-v0.1.8.devNtags on the remote stay where they are;--exclude "*dev*"filters them out ofgit describeso they don't interfere with version resolution. Cleaning them up is optional housekeeping for a separate PR.Verification (locally)
Stats
Net −21 lines (excluding the
uv.lockcutoff-date refresh and an unrelatedopenai-harmonyconstraint drift fix — see below).uv.lockside effectsTwo benign changes from re-running
uv lock:exclude-newercutoff advances 2026-05-18 → 2026-06-19 (rolling 7-day cooldown catching up).openai-harmonyconstraint in the lock realigns withpyproject.toml's stated>=0.0.4(lock had drifted to>=0.0.8).pyproject.tomlitself is unchanged — this is the lock catching up to a long-standing source constraint.Outcome
uv lock/uv buildwork on any main checkout without env-var workarounds.🤖 Generated with Claude Code
Note
Medium Risk
Changes release versioning and PyPI publish behavior; mistakes could produce wrong wheel versions or duplicate-publish edge cases, though
skip-existingmitigates retries.Overview
Dev PyPI publishing no longer creates a
renderers-v*.devNtag on every main push. The workflow builds directly frommainwith full git history; hatch-vcs derives PEP 440 dev versions from distance to the latest stablerenderers-v*tag at build time.pyproject.tomladds[tool.hatch.version.raw-options]:local_scheme = "no-local-version"(PyPI-friendly wheels without+gHASH) and a customgit_describe_commandthat only considers stable release tags and excludes legacy*dev*tags—fixing localuv lock/uv buildfailures when.devNtags already exist.The publish step sets
skip-existing: trueon the PyPI action.uv.lockrefreshes the rollingexclude-newercutoff and realignsopenai-harmonywith>=0.0.4.Reviewed by Cursor Bugbot for commit 35d51a9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Adopt dynamic versioning from git tags in the dev publish workflow
hatch-vcs.hatch-vcsin pyproject.toml withlocal_scheme = "no-local-version"and agit describecommand scoped to stablerenderers-v*tags, producing clean PEP 440 dev versions (e.g.1.2.3.dev4) without a+gHASHlocal segment.skip-existing: trueto the PyPI publish step to avoid failures when the derived version already exists..devNtags are excluded from version resolution.Macroscope summarized 35d51a9.