feat(platform): build commit in the version handshake #470

Merged
sharang merged 1 commits from feat/version-commit into main 2026-10-05 22:20:18 +00:00
Owner

GET /api/v1/platform/version (the public handshake from #249) reported the crate version and no commit, so the portal's staff dashboard (portal#80) showed Prüfwerk as v0.4.4 · –, although the last tag is v0.4.5.

  • Agent: BUILD_VERSION / BUILD_COMMIT from option_env!("PRUEFWERK_VERSION") / option_env!("PRUEFWERK_COMMIT") at compile time; unset or empty falls back to CARGO_PKG_VERSION and "unknown". The handshake gains "commit"; nothing else changes (the dashboard ignores unknown keys and does not show the version).
  • Dockerfile.agent: ARG PRUEFWERK_VERSION= / ARG PRUEFWERK_COMMIT= in the builder stage.
  • CI deploy-agent: unshallows and fetches tags, passes the latest v* tag without its v (0.4.5, same shape as the Cargo version) and GITHUB_SHA. Same approach as the tenant-registry's GET /version.
  • Cargo.toml versions are left at 0.4.4 (tag v0.4.5); worth aligning at the next release.

Portal reads commit already (parseVersionPayload) and shows 8 characters: Prüfwerk v0.4.5 · <8-char commit>.

Checks: cargo fmt --check clean, cargo clippy -p compliance-agent --all-targets -- -D warnings clean, cargo test -p compliance-agent --lib 619 passed, 3 ignored.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB

`GET /api/v1/platform/version` (the public handshake from #249) reported the crate version and no commit, so the portal's staff dashboard (portal#80) showed Prüfwerk as `v0.4.4 · –`, although the last tag is v0.4.5. - Agent: `BUILD_VERSION` / `BUILD_COMMIT` from `option_env!("PRUEFWERK_VERSION")` / `option_env!("PRUEFWERK_COMMIT")` at compile time; unset or empty falls back to `CARGO_PKG_VERSION` and `"unknown"`. The handshake gains `"commit"`; nothing else changes (the dashboard ignores unknown keys and does not show the version). - Dockerfile.agent: `ARG PRUEFWERK_VERSION=` / `ARG PRUEFWERK_COMMIT=` in the builder stage. - CI `deploy-agent`: unshallows and fetches tags, passes the latest `v*` tag without its `v` (`0.4.5`, same shape as the Cargo version) and `GITHUB_SHA`. Same approach as the tenant-registry's `GET /version`. - Cargo.toml versions are left at 0.4.4 (tag v0.4.5); worth aligning at the next release. Portal reads `commit` already (`parseVersionPayload`) and shows 8 characters: `Prüfwerk v0.4.5 · <8-char commit>`. Checks: `cargo fmt --check` clean, `cargo clippy -p compliance-agent --all-targets -- -D warnings` clean, `cargo test -p compliance-agent --lib` 619 passed, 3 ignored. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang added 1 commit 2026-10-05 22:10:43 +00:00
feat(platform): build commit in the version handshake
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 8m32s
6107d40882
GET /api/v1/platform/version reported the crate version (0.4.4) and no
commit, so the portal's staff dashboard showed Prüfwerk without one. The
agent now reads PRUEFWERK_VERSION and PRUEFWERK_COMMIT at compile time;
the deploy-agent job passes the latest v* tag (without its v) and the
commit as Docker build args, like the tenant-registry's GET /version.
Locally, or with empty args, it falls back to the crate version and
"unknown".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang merged commit 788c57094e into main 2026-10-05 22:20:18 +00:00
Sign in to join this conversation.