Skip to content

Fix 1891#1894

Merged
oberstet merged 6 commits into
crossbario:masterfrom
oberstet:fix_1891
Jul 1, 2026
Merged

Fix 1891#1894
oberstet merged 6 commits into
crossbario:masterfrom
oberstet:fix_1891

Conversation

@oberstet

@oberstet oberstet commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

fixes #1891

oberstet added 6 commits July 1, 2026 14:21
…stamped version()

check_zlmdb_flatbuffers_version_in_sync() compared flatbuffers.version(),
which parses __git_version__ and returns (0, 0, 0, None, None) on built
wheels (the deps/flatbuffers submodule tags are not available at build
time), so the guard passed vacuously and could never catch a real
mismatch. Compare the reliably-stamped __version__ strings instead; the
return type is now str.

Reproduced live: an installed zlmdb wheel returns
version() == (0, 0, 0, None, None) while __version__ == "25.12.19". Added a
regression test that forces the two vendored __version__ apart and asserts
the check raises. Verified green with zlmdb present (3 tests, including the
new mismatch case).

Note: This work was completed with AI assistance (Claude Code).
…olicy

Replicate crossbar's version-management recipes (file-version, prep-release,
bump-dev, bump-next) into the justfile so version bumps are a single command
instead of hand-editing two files, aligning the WAMP projects. The version
files are declared via PY_VERSION_FILE / TOML_VERSION_FILE.

Deviation from crossbar: this repo does not track uv.lock, so bump-next does
not refresh or commit a lockfile.

Document the scheme (CalVer YY.M.PATCH[.devN], PEP 440) and the recipes in a
new "Versioning" section in CONTRIBUTING.md; it also renders on Read the Docs
via the existing docs/contributing.rst include.

Note: This work was completed with AI assistance (Claude Code).
Open the 26.7.1 development cycle (CalVer YY.M.PATCH.devN, PEP 440) for the
first release month after the June 26.6.x train. Bumped via `just bump-next`.

Note: This work was completed with AI assistance (Claude Code).
…rossbario#1891)

version() parsed the build-time __git_version__, which degrades to a bare
commit hash or "unknown" on shallow clones / when deps/flatbuffers is absent
from the sdist, yielding (0, 0, 0, None, None) on installed wheels. It now
falls back to the reliably-stamped static __version__ and returns
(major, minor, patch, None, None); rich git-describe detail is still returned
on genuine dev/git builds. Return shape unchanged (5-tuple); version() is
informational only (no serializer/wire/crossbar path depends on it), so no
API/behaviour break.

Defense-in-depth: hatch_build.py now never stamps a non-parseable
__git_version__ (derives v<__version__> when git describe yields a bare
hash/unknown). Added 3 regression tests.

Note: the version() fallback and hatch guard exceed the 10-line new-logic
guideline in AI_POLICY.md and warrant explicit human review.

Note: This work was completed with AI assistance (Claude Code).
…rossbario#1894)

Add a 26.7.1 changelog section covering the flatbuffers version-sync fix
(crossbario#1891), the version() wheel-reliability fix, and the CalVer/PEP 440
version-management just recipes. Add a "changelog entry" step to the
CONTRIBUTING.md Contributing Code checklist so user-visible changes are
documented in the PR itself rather than deferred to release-cut.

Note: This work was completed with AI assistance (Claude Code).
@oberstet oberstet merged commit 20821ab into crossbario:master Jul 1, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] check_*_flatbuffers_version_in_sync() compares the unstamped version() (not __version__) → ineffective

1 participant