Tasks: derive the CLI version from package metadata
Phase 3 of 3 (bugfix → design → tasks).
- [x] T1 — Derive
__version__from metadata. Incli/the_loop/__init__.py, replace the hardcoded"0.1.0"withimportlib.metadata.version("the-loopy-one"), falling back to a0.0.0+unknownsentinel onPackageNotFoundError. (AC 1–3) - [x] T2 — De-duplicate the webhook version. In
cli/the_loop/webhook/server.py, import__version__and buildserver_versionfrom it instead of the hardcoded"the-loop-gh-webhook/0.1.0". (AC 4) - [x] T3 — Regression tests. In
cli/tests/test_cli.py, assert__version__matchesimportlib.metadata.version("the-loopy-one"), is not"0.1.0", and that--versionprintsthe-loop <version>. (AC 1–2) - [x] T4 — Capability doc. Record the derived-version behaviour and the fix in
docs/capabilities/cli.md(current behaviour + history row). - [x] T5 — Gates.
ruff check/ruff format --check,pyright, andpytestall green.