Skip to content

Pin the version against pyproject; point the bug template at --version - #45

Merged
webdevsamran merged 1 commit into
mainfrom
fix/version-drift-guard
Sep 9, 2026
Merged

Pin the version against pyproject; point the bug template at --version#45
webdevsamran merged 1 commit into
mainfrom
fix/version-drift-guard

Conversation

@webdevsamran

Copy link
Copy Markdown
Owner

Context

tooltrace --version already 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 --version on each. Two had no such flag; this repo was fine. But nothing here tested that, and nothing compared FRAMEWORK_VERSION to the version pyproject.toml declares.

That comparison is exactly what was missing in api-verity-lab, where __version__ sat at 0.1.0 against a declared 0.2.0 — invisible because no test looked.

What this adds

tests/test_version_is_reportable.py:

  • --version exits 0 and prints the version
  • FRAMEWORK_VERSION == pyproject's version

The 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:

0.1.0 (pip show tooltrace-bench)

Two problems: 0.1.0 is 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 —

output of: tooltrace --version

— so reporters run the tool and paste the answer, and there is nothing left to drift.

Checks

  • 346 tests pass (344 before, +2 here)
  • coverage 81.71%, floor 80
  • ruff check, ruff format --check, mypy all clean

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@webdevsamran
webdevsamran merged commit cb347cb into main Sep 9, 2026
12 checks passed
@webdevsamran
webdevsamran deleted the fix/version-drift-guard branch September 9, 2026 13:12
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.

1 participant