feat(server): public GET /version with build version and commit #63

Merged
sharang merged 1 commits from feat/version-endpoint into main 2026-10-05 19:51:41 +00:00
Owner

Part of the build-version line in the portal's staff dashboard (portal#64, comment 11559).

  • GET /version (root mux, PUBLIC_EXPLICIT like /healthz): {"version": "v0.1.4", "commit": "<full sha>"}. No tenant data.
  • internal/buildinfo: Version / Commit, set with -ldflags -X in the Dockerfile from build args VERSION / COMMIT; defaults dev / "".
  • CI image job: the clone is shallow, so it fetches history + tags and passes git describe --tags --abbrev=0 (latest release tag) and GITHUB_SHA.
  • OpenAPI + contract test + handler test.

Verified locally: docker build --build-arg VERSION=v0.1.4 --build-arg COMMIT=abc123 → /version returns both.

Note: on staging the version is the latest tag reachable from main (main is usually ahead of it); the commit identifies the exact build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB

Part of the build-version line in the portal's staff dashboard (portal#64, comment 11559). - `GET /version` (root mux, `PUBLIC_EXPLICIT` like `/healthz`): `{"version": "v0.1.4", "commit": "<full sha>"}`. No tenant data. - `internal/buildinfo`: `Version` / `Commit`, set with `-ldflags -X` in the Dockerfile from build args `VERSION` / `COMMIT`; defaults `dev` / `""`. - CI image job: the clone is shallow, so it fetches history + tags and passes `git describe --tags --abbrev=0` (latest release tag) and `GITHUB_SHA`. - OpenAPI + contract test + handler test. Verified locally: `docker build --build-arg VERSION=v0.1.4 --build-arg COMMIT=abc123` → `/version` returns both. Note: on staging the version is the latest tag reachable from main (main is usually ahead of it); the commit identifies the exact build. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang force-pushed feat/version-endpoint from 7d63abbbb0 to 863f7b7d09 2026-10-05 18:07:09 +00:00 Compare
sharang added 1 commit 2026-10-05 19:01:24 +00:00
feat(server): public GET /version with build version and commit
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 24m43s
ci / image (pull_request) Skipped
917fdd9ba3
The staff dashboard of the portal shows which build of each service runs
(portal#64). GET /version is public like /healthz and returns
{version, commit}: the latest release tag and the full commit hash, set at
image build time with -ldflags (Dockerfile build args VERSION and COMMIT,
filled by CI). A local build reports "dev" and an empty commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang force-pushed feat/version-endpoint from 863f7b7d09 to 917fdd9ba3 2026-10-05 19:01:24 +00:00 Compare
sharang merged commit 557fbf85f5 into main 2026-10-05 19:51:41 +00:00
Sign in to join this conversation.