feat: expose runtime build version

This commit is contained in:
姚章浩
2026-07-27 12:10:17 +08:00
parent aa0513eb59
commit 2c0ed7cc67
7 changed files with 159 additions and 5 deletions
+12
View File
@@ -15,6 +15,7 @@ Implemented:
- external-message idempotency;
- independent PostgreSQL session/turn storage;
- authenticated internal `POST /v1/qa` ingress endpoint.
- unauthenticated read-only `GET /version` runtime build identity endpoint.
- DingTalk Stream text ingress (official SDK) wired into `cmd/dobotai`.
- v1 knowledge coverage decisions, durable support cases, and optional DingTalk support-group notifications.
@@ -74,6 +75,17 @@ Health check:
curl http://127.0.0.1:8090/healthz
```
Runtime version check:
```bash
curl http://127.0.0.1:8090/version
```
`scripts/deploy-local.sh` builds from its own worktree (or the explicit
`DOBOTAI_SOURCE_ROOT`), injects `version`, `commit_sha`, and `build_time`, and
accepts the deployment only when `/version` reports the exact source commit.
It refuses dirty worktrees so the reported SHA cannot hide uncommitted source.
Internal QA request:
```bash