Complete M7.8 operations endpoints and region server image

ADR-0066: evo-server --ops-listen serves /livez (loop responding, never
authority), /readyz (200 only while the host holds the lease with a
verified recovered head) and /metrics (Prometheus text: 30 fixed
series for readiness, phase, lease epoch/remaining, simulated/committed
ticks, commit lag, checkpoint age, tick debt, queue use and bounds, and
counters; the only labels are a 6-value phase and 4-value drop reason).

The dependency-free OpsServer runs on the host loop with no thread:
GET on exact paths, 405/404/400/431 responses, 8 connections with excess
refused on accept, 4 KiB requests, 1 s deadlines, 16 KiB responses.
HostStatus/phase types moved to the portable evo::ops library with a
Windows-tested renderer. evo-server now refuses to start without its
required identity and connection settings.

Adds the server-runtime Docker target (evo-server + pinned libpq,
UID 10001, no credentials), a CI server-image job with smoke script and
optional publishing, and a Kubernetes example outside Argo.

Validated: Windows CTest 59/59; Linux Debug/Release/clang-tidy/ASan
CTest 59/59; PostgreSQL suites under Release, clang-tidy and ASan with
real process probes; two ops mutations caught. Docker build/smoke and
Gitea CI not executed locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-28 23:09:28 -04:00
co-authored by Claude Opus 5.5
parent 30411a83f9
commit 7aec68db8e
23 changed files with 1222 additions and 65 deletions
+41
View File
@@ -2381,3 +2381,44 @@ Only clean-to-v1 and exact-v1 restart are supported migration paths at this gate
- Not executed: Docker/Gitea CI, the production 20 s lease, host loss or VM
freeze, multi-host network partitions, or verification of links older than
the head.
## M7.8 operations endpoints - 2026-09-28
- Windows MSVC Release CTest passed 59/59, including the new portable
`ops-contracts`: exposition format, HELP/TYPE per family, the fixed 30-series
set, bounded labels, one-hot phase and non-wrapping lag. The exposition is
3485 bytes typically and 3836 at worst-case values (limit 8192).
- WSL Linux: the `checks` build set (GCC14 Debug and Release, clang19 analysis,
clang19 ASan/UBSan) passed CTest 59/59 each.
- The PostgreSQL suites (GCC Release, clang-tidy analysis, ASan/UBSan) passed
after fixing the ops test's optional-access and reserve findings. The earlier
PostgreSQL analysis runs used a stale binary and are not counted. The
repository format check passed after formatting the server.
- Process probe tests (real `evo-server`, loopback, ephemeral port):
- Serving: `/livez` 200 `live`, `/readyz` 200 `ready`. Metrics showed ready 1,
epoch 1, lease remaining above 0, capacities 64/65536 and the running phase.
After 30 inputs: committed tick 30, lag 0, 30 acknowledgements, checkpoint
age under 60 s.
- HTTP bounds: POST 405, unknown path and query string 404, malformed 400,
over 4 KiB 431. Eight idle connections do not block probes; a ninth is
closed within 500 ms; idle ones close at their deadline.
- Database unreachable: `/livez` 200, `/readyz` 503 `not ready: acquiring`,
ready 0, store failures above 0, never `ready 1`, exit 0 on SIGTERM.
- Stale process (SIGSTOP 4.5 s, then SIGCONT): `/livez` 200, `/readyz` 503,
ready 0, fences_total 1, lease remaining 0. The successor answers 200 at
epoch 2.
- Mutations (restored and rerun green): readiness that returns 200 whenever live
was caught. Raising the connection bound to 1000 was not caught at first,
because the check did not distinguish refusal from deadline expiry. The test
now requires the refusal within 500 ms and catches it.
- Image: the Docker engine was not running locally (Docker Desktop stopped), so
the `server-runtime` build and `tools/ci/server-image-smoke.sh` have not
executed. A filesystem emulation (binary plus the pinned libpq, `env -i`)
showed usage exit 2 with no settings and all libraries resolved. It also found
and fixed a bug: without arguments the server had reached object-store opening
instead of refusing with usage. The binary keeps a build-tree RUNPATH, which is
harmless in the image.
- The manifest example parses (Deployment and NetworkPolicy, three probes) and
the workflow YAML parses; `bash -n` passed for the smoke script.
- Not executed: the container build and smoke, the Gitea job, cluster apply,
Prometheus scraping, and TSan.