Complete M7.6 bounded authoritative region host
ADR-0064: RegionHost<State> (environmental and lineage profiles) is a single-owner, single-threaded state machine advanced by step(now): acquire the fenced lease and recover the verified head, run, resolve ambiguous commits, drain and stop, or quarantine. Admission is provisional and bounded (64 inputs, 64 KiB) with backpressure; FinalAck and FinalOutcome are emitted only after a confirmed commit, and inputs that will never be acknowledged are reported with a reason. Ticks follow the caller's scheduling clock with bounded catch-up and measured tick debt, never invented inputs. A death seals the batch and commits in the same step, so no dependent tick uses an uncommitted outcome. Storage outages pause and retry, unknown outcomes resolve by exact bytes, fencing discards unconfirmed work and re-acquires; readiness fails closed. Drain commits pending ticks and releases the lease. evo-server hosts one region with a bounded stdin input feed, stdout event lines, a readiness file and SIGTERM drain (exit 0/3/4). Validated: Windows CTest 58/58; PostgreSQL suites under GCC Release, clang-tidy and ASan/UBSan including real-process SIGTERM drain and SIGKILL with successor recovery; four host mutations each caught. No gateway, metrics, Docker/Gitea CI or deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+12
-2
@@ -103,11 +103,21 @@ if(EVO_BUILD_POSTGRES)
|
||||
target_link_libraries(evo_region_store PUBLIC evo::postgres evo::region_checkpoint
|
||||
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 ALIAS evo_region_host)
|
||||
target_link_libraries(evo_region_host PUBLIC evo::region_store)
|
||||
evo_owned_target(evo_region_host)
|
||||
add_executable(evo-server apps/evo-server/main.cpp)
|
||||
target_link_libraries(evo-server PRIVATE evo::region_host)
|
||||
evo_owned_target(evo-server)
|
||||
if(BUILD_TESTING)
|
||||
# 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)
|
||||
target_link_libraries(evo-postgres-tests PRIVATE evo::region_store Threads::Threads)
|
||||
tests/region_checkpoint_store_tests.cpp tests/region_host_tests.cpp
|
||||
tests/region_server_process_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)
|
||||
# Intentionally not an ordinary CTest: tools/ci/postgres-check.sh owns its private DB.
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user