Pin the version against pyproject; point the bug template at --version - #45
Merged
Conversation
…rsion `tooltrace --version` already works. Nothing tested that it kept working, and nothing compared `FRAMEWORK_VERSION` to the version `pyproject.toml` declares — the sibling project api-verity-lab carried `__version__ = "0.1.0"` against a declared 0.2.0 for exactly that reason. `tests/test_version_is_reportable.py` closes both: the flag exits 0 and prints the version, and the two places the number is written down must agree. The bug-report template's version field carried the placeholder `0.1.0 (pip show tooltrace-bench)`. The version in it was two releases stale (0.3.0 today) and would go stale again on the next release, so the placeholder now names the command rather than a number: reporters run `tooltrace --version` and paste the answer.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Context
tooltrace --versionalready works — this is not a bug fix, it is a guard.During a final verification pass I installed all four sibling projects' wheels into clean venvs and ran
--versionon each. Two had no such flag; this repo was fine. But nothing here tested that, and nothing comparedFRAMEWORK_VERSIONto the versionpyproject.tomldeclares.That comparison is exactly what was missing in
api-verity-lab, where__version__sat at0.1.0against a declared0.2.0— invisible because no test looked.What this adds
tests/test_version_is_reportable.py:--versionexits 0 and prints the versionFRAMEWORK_VERSION == pyproject's versionThe number is written down in more than one place. This makes disagreement fail the build rather than ship.
Bug template
The version field's placeholder was:
Two problems:
0.1.0is two releases stale (0.3.0 today), and it would go stale again on the next release. It now names the command instead of a number —— so reporters run the tool and paste the answer, and there is nothing left to drift.
Checks
ruff check,ruff format --check,mypyall clean