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:
+15
-3
@@ -77,6 +77,12 @@ add_library(evo::region_lease ALIAS evo_region_lease)
|
||||
target_include_directories(evo_region_lease PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_compile_features(evo_region_lease PUBLIC cxx_std_23)
|
||||
evo_owned_target(evo_region_lease)
|
||||
# Portable host status and bounded operational exposition (M7.8).
|
||||
add_library(evo_ops STATIC src/server/ops.cpp)
|
||||
add_library(evo::ops ALIAS evo_ops)
|
||||
target_include_directories(evo_ops PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_compile_features(evo_ops PUBLIC cxx_std_23)
|
||||
evo_owned_target(evo_ops)
|
||||
# Portable checkpoint manifest codec and environmental-v1 payload validation.
|
||||
add_library(evo_region_checkpoint STATIC src/persistence/region_checkpoint.cpp src/persistence/region_batch.cpp)
|
||||
add_library(evo::region_checkpoint ALIAS evo_region_checkpoint)
|
||||
@@ -104,9 +110,9 @@ if(EVO_BUILD_POSTGRES)
|
||||
PRIVATE OpenSSL::Crypto)
|
||||
evo_owned_target(evo_region_store)
|
||||
# M7.6 authoritative region host and its process (ADR-0064).
|
||||
add_library(evo_region_host STATIC src/server/region_host.cpp)
|
||||
add_library(evo_region_host STATIC src/server/region_host.cpp src/server/ops_http.cpp)
|
||||
add_library(evo::region_host ALIAS evo_region_host)
|
||||
target_link_libraries(evo_region_host PUBLIC evo::region_store)
|
||||
target_link_libraries(evo_region_host PUBLIC evo::region_store evo::ops)
|
||||
evo_owned_target(evo_region_host)
|
||||
add_executable(evo-server apps/evo-server/main.cpp)
|
||||
target_link_libraries(evo-server PRIVATE evo::region_host)
|
||||
@@ -115,7 +121,8 @@ if(EVO_BUILD_POSTGRES)
|
||||
# Contention tests use one thread and one connection per contender.
|
||||
add_executable(evo-postgres-tests tests/postgres_tests.cpp tests/region_lease_store_tests.cpp
|
||||
tests/region_checkpoint_store_tests.cpp tests/region_host_tests.cpp
|
||||
tests/region_server_process_tests.cpp tests/region_recovery_tests.cpp)
|
||||
tests/region_server_process_tests.cpp tests/region_recovery_tests.cpp
|
||||
tests/region_ops_tests.cpp)
|
||||
target_link_libraries(evo-postgres-tests PRIVATE evo::region_host Threads::Threads)
|
||||
add_dependencies(evo-postgres-tests evo-server) # Spawned by the process tests.
|
||||
evo_owned_target(evo-postgres-tests)
|
||||
@@ -133,6 +140,11 @@ if(BUILD_TESTING)
|
||||
evo_owned_target(evo-lineage-region-tests)
|
||||
add_test(NAME lineage-region-contracts COMMAND evo-lineage-region-tests)
|
||||
set_tests_properties(lineage-region-contracts PROPERTIES TIMEOUT 60)
|
||||
add_executable(evo-ops-tests tests/ops_tests.cpp)
|
||||
target_link_libraries(evo-ops-tests PRIVATE evo::ops)
|
||||
evo_owned_target(evo-ops-tests)
|
||||
add_test(NAME ops-contracts COMMAND evo-ops-tests)
|
||||
set_tests_properties(ops-contracts PROPERTIES TIMEOUT 60)
|
||||
add_executable(evo-region-batch-tests tests/region_batch_tests.cpp)
|
||||
target_link_libraries(evo-region-batch-tests PRIVATE evo::region_checkpoint)
|
||||
evo_owned_target(evo-region-batch-tests)
|
||||
|
||||
Reference in New Issue
Block a user