chore(release): 0.6.0, and stop __version__ drifting - #131
Merged
Conversation
__version__ was a literal that drifted from pyproject.toml at #36 and was never corrected, so v0.3.0, v0.4.0, v0.5.0 and v0.5.1 each shipped a wheel reporting 0.2.0 at runtime. Anyone pinning or logging on it got the wrong answer and nothing failed. It now derives from installed package metadata, so a built artifact cannot disagree with itself. tests/test_version.py guards what is still possible to get wrong: reintroducing a literal, bumping the version without cutting a changelog section, or tagging something that is not semver. The tag is what publishes to PyPI, so those have to fail before the tag. Also corrects the package description, which still advertised TRACE v0.1, and modernises one isinstance call in sign.py that a newer ruff flags (UP038) though the pinned CI ruff does not yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
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.
What this changes
Cuts 0.6.0 and fixes a version bug that has been shipping for four releases.
The bug
__version__was a hardcoded literal. It drifted frompyproject.tomlat #36 and was never corrected, so v0.3.0, v0.4.0, v0.5.0 and v0.5.1 each published a wheel reporting0.2.0at runtime. Anyone pinning or logging onagentrust_trace.__version__got the wrong answer, and nothing anywhere failed.It now derives from installed package metadata, so a built artifact cannot disagree with itself.
tests/test_version.pyguards what is still possible to get wrong:test_version_is_not_hardcoded— the actual regression, and environment independent, so it is the test that holds the linetest_changelog_documents_the_declared_version— the tag is what publishes to PyPI, so a missing changelog section has to fail before the tagtest_declared_version_is_semvertest_module_version_matches_pyproject— skips unless the installed distribution resolves to this source tree, since a working copy with a stale PyPI wheel alongside it would otherwise report a mismatch that says nothing about the codeWhat is in 0.6.0
TraceSandboxAdapterfor sandboxed agent runtimesverify_record()enforces the v0.2 profile cutoverWhy MINOR and not MAJOR
#125 makes
verify_record()reject records it previously accepted, which looks breaking. Under this project's own policy MAJOR means "breaking changes to wire format or required Trust Record fields", and #125 changes neither: it enforces a cutoverspec/trace-v0.2.md§2 already declared normative and the changelog already announced. MINOR is the right call, and the behaviour change is prominent in the 0.6.0 notes.Also
isinstancecall insign.pymodernised (UP038). The pinned CI ruff does not flag it yet, a current ruff does, and a routine dependency bump would otherwise turn CI red.Checklist
CHANGELOG.mdsection cut for 0.6.0v0.6.0after merge, which triggerspublish.ymland OIDC trusted publishing🤖 Generated with Claude Code