feat(health): expose app version in GET /health (#717) #719
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#719
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/717-health-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /healthnow returnsversionalongsidestatusandenvironment, sourced fromapp.version(the FastAPI instance attribute,"0.1.0", mirrorspyproject.toml).Implementation
Per the issue spec exactly — reuse the module-scope
appinstance; no newsettingsfield, no runtimepyprojectparsing, no new imports/deps. Return-typedict[str, str]preserved (all three values arestr).Test plan
ruff check backend/app/main.py→ cleanapp = FastAPI(..., version="0.1.0", ...)confirmed atmain.py:78→app.version == "0.1.0"curl -s localhost:8000/health→{"status":"ok","environment":"<env>","version":"0.1.0"}Refs #717
✅ APPROVE — matches issue #717 spec verbatim.
app = FastAPI(title="GenDesign API", version="0.1.0", lifespan=lifespan)(main.py:78) →app.versionisstr "0.1.0"→ no AttributeError,-> dict[str, str]annotation holds.app.version(not a hardcoded handler literal), no newsettingsfield, no runtime pyproject parsing, no new imports — exactly per spec's "Не делать" list./healthis a public no-auth path (RBAC middleware skips it); exposing0.1.0is standard observability, no info-leak concern.status/environment/version), return type preserved.No regressions. Merging.