Compare commits

...
2 Commits
Author SHA1 Message Date
dingoandClaude Opus 5.5 6a9af9c514 ci: keep PostgreSQL-only tests out of the native suites; build with 4 jobs
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m54s
Foundation / checks (postgres) (push) Failing after 8m46s
Foundation / checks (network) (push) Successful in 15m41s
Foundation / checks (client) (push) Successful in 17m3s
Foundation / checks (tsan) (push) Successful in 45m3s
Foundation / checks (checks) (push) Successful in 1h27m38s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
A push's diff against its before SHA counts every commit it carries, and any
tests/ change selected checks, tsan and ecs. Run 475 spent 1h44m in checks
for two commits that only touched tests/region_store_tests.cpp, which the
native suites never build. Sources compiled only into evo-postgres-tests now
select the PostgreSQL suites alone; the PostgreSQL image runs the repository
format check so they stay formatted. Native CI stages compile with
CI_BUILD_JOBS (default 4, previously a fixed 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 18:22:44 -04:00
dingoandClaude Opus 5.5 60c034f066 fix(provision): rerun a finished cellular-v8 opening without the region lease
Every Argo sync reruns the provision hook while evo-region holds region 9's
lease. The cellular-v8 resume path acquired the lease before looking at the
head, so a finished bundle-13 region failed the hook ("photosynthesis
opening lease refused", exit 3) and the sync never reached the Deployment.
A head already at bundle 13 now needs no lease and reports
already-provisioned. The PostgreSQL suite reruns provisioning while a
running host holds the lease.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 18:22:44 -04:00
7 changed files with 52 additions and 12 deletions
+9
View File
@@ -556,6 +556,15 @@ int finish_photosynthesis_opening(const Options& o, persistence::Postgres& db,
std::uint64_t frame, const persistence::Sha256Digest& build,
std::uint64_t light_pj) {
const auto& key = o.source.key;
// A finished opening needs no lease: a rerun (every Argo sync's provision hook) runs
// while the region server holds it, and must report the region rather than fail.
if (const auto current = persistence::load_region_checkpoint(db, key, timeout); current) {
const auto manifest = persistence::decode_manifest(current->manifest);
if (manifest && manifest->profile == persistence::CheckpointProfile::cellular_lives_v1 &&
manifest->frame == frame &&
manifest->cellular_versions == persistence::cellular_v13_versions)
return 0;
}
auto lease =
persistence::acquire_region_lease(db, key, build, std::chrono::seconds{60}, timeout);
if (!lease) {
+16 -9
View File
@@ -16,6 +16,10 @@ RUN dpkg-query -W
# Keep expensive compiler/package layers independent from source changes.
FROM ci-toolchain AS ci-source
# Compile parallelism for the native CI stages; each clang analysis/ASan job can take
# 1-2 GiB, so raising it needs matching runner memory.
ARG CI_BUILD_JOBS=4
ENV CI_BUILD_JOBS=${CI_BUILD_JOBS}
COPY CMakeLists.txt CMakePresets.json .clang-format .clang-tidy ./
COPY cmake/ cmake/
COPY include/ include/
@@ -31,7 +35,7 @@ RUN bash tools/ci/linux-check.sh checks
FROM ci-source AS ci-tsan
RUN cmake --preset tsan -DCMAKE_CXX_COMPILER=clang++-19 \
&& cmake --build --preset tsan --parallel 2
&& cmake --build --preset tsan --parallel "${CI_BUILD_JOBS}"
CMD ["ctest", "--preset", "tsan", "--no-tests=error", "--timeout", "120"]
FROM ci-source AS ci-client
@@ -45,13 +49,13 @@ RUN cmake -P tools/prepare-sdl3.cmake \
&& cmake -P tools/prepare-imgui.cmake \
&& cmake --preset client-probe -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 \
-DEVO_BUILD_CLIENT=ON -DEVO_BUILD_UI_PROBE=ON -DEVO_ENABLE_TIDY=ON -DSDL_X11=ON -DSDL_WAYLAND=OFF \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel 2 \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset client-probe --no-tests=error \
&& xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-probe --renderer software \
&& for cycle in 1 2 3; do xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-ui-probe --renderer software --cycles 1; done \
&& xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests \
&& cmake --preset client-probe -DEVO_BUILD_CLIENT=ON -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel 2 \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset client-probe --no-tests=error \
&& for cycle in 1 2 3; do xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-ui-probe --renderer software --cycles 1; done \
&& xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests
@@ -62,25 +66,25 @@ FROM ci-source AS ci-network
RUN cmake -P tools/prepare-mbedtls.cmake \
&& cmake --preset network -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 \
-DEVO_ENABLE_TIDY=ON \
&& cmake --build --preset network --parallel 2 \
&& cmake --build --preset network --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset network --no-tests=error \
&& cmake --preset network -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF \
&& cmake --build --preset network --parallel 2 \
&& cmake --build --preset network --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset network --no-tests=error
FROM ci-source AS ci-ecs
# Explicit experiment preparation; normal configure/runtime remains dependency-free.
RUN cmake -P tools/prepare-entt.cmake \
&& cmake --preset release -B build/ecs -DCMAKE_CXX_COMPILER=g++-14 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs -R ecs-experiment --output-on-failure --no-tests=error \
&& ./build/ecs/evo-ecs-experiment --measure \
&& stat -c 'experiment_executable_bytes=%s' build/ecs/evo-ecs-experiment
RUN cmake --preset asan -B build/ecs-asan -DCMAKE_CXX_COMPILER=clang++-19 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs-asan --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs-asan --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs-asan -R ecs-experiment --output-on-failure --no-tests=error
RUN cmake --preset analysis -B build/ecs-analysis -DCMAKE_CXX_COMPILER=clang++-19 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs-analysis --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs-analysis --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs-analysis -R ecs-experiment --output-on-failure --no-tests=error
# M8.2 offline deployment-policy check (ADR-0069): Ubuntu's python3-yaml only, no
@@ -145,6 +149,9 @@ RUN cmake --preset release -B build/postgres -DCMAKE_CXX_COMPILER=g++-14 \
FROM postgres-build AS postgres-test-build
ARG PG_BUILD_JOBS=6
# PostgreSQL-only test changes skip the native checks job (tools/ci/ci-paths.sh), so the
# repository format check also runs here.
RUN cmake -DFORMATTER=clang-format-19 -DSOURCE_ROOT=/source -P tools/check-format.cmake
RUN cmake --build build/postgres --target evo-postgres-tests --parallel "${PG_BUILD_JOBS}"
RUN cmake --preset analysis -B build/postgres-analysis -DCMAKE_CXX_COMPILER=clang++-19 \
-DCMAKE_C_COMPILER=clang-19 -DEVO_BUILD_NETWORK=ON \
@@ -208,7 +215,7 @@ ENTRYPOINT ["/usr/local/bin/evo-server"]
FROM ci-source AS build
RUN cmake --preset release -B build/container \
-DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/opt/evo/bin \
&& cmake --build build/container --parallel 2 \
&& cmake --build build/container --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/container --output-on-failure --no-tests=error --timeout 120
RUN dpkg-query -W > /opt/evo/build-packages.txt
@@ -12,7 +12,7 @@ spec:
env:
- {name: REGION_SESSION, value: "dev"}
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261020T200712-bbf338a2:1792541232"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261020T221544-e8dbeb83:1792548944"}
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
ports:
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
+5
View File
@@ -745,6 +745,11 @@ void cellular_v8_provisioning_declares_light() {
auto next = CellularSessionBatchBuilder::create(*host->state(), host->committed()->head);
CHECK(next && next->append(host->state()->tick() + 1, baseline, {}));
CHECK(host->publish(next->batch(), next->actions(), next->mutation_actions()));
// Every Argo sync reruns the provision hook while the region server holds the lease.
const auto served =
provision_cellular(r, "9775", "cellular-v8", build, commit, "40,1,2000000,50000,20000,0,0",
code, "--motes", {"--light-pj", "40"});
CHECK(code == 0 && has(served, "already-provisioned world=9775 region=1"));
#endif
}
+12
View File
@@ -67,6 +67,18 @@ ops_contract_base="$(git rev-parse HEAD)"
echo contract > tests/region_ops_tests.cpp
git add .; git commit -qm region-ops-contract
expect "push: region ops contract runs server image" 0 CI_EVENT=push "CI_BEFORE=$ops_contract_base" -- server-image
# A PostgreSQL-only test runs the PostgreSQL suite, not the native suites that never build it.
postgres_test_base="$(git rev-parse HEAD)"
echo contract > tests/region_store_tests.cpp
git add .; git commit -qm region-store-test
expect "push: postgres-only test runs postgres" 0 CI_EVENT=push "CI_BEFORE=$postgres_test_base" -- postgres
expect "push: postgres-only test skips checks" 1 CI_EVENT=push "CI_BEFORE=$postgres_test_base" -- checks
expect "push: postgres-only test skips tsan" 1 CI_EVENT=push "CI_BEFORE=$postgres_test_base" -- tsan
native_test_base="$(git rev-parse HEAD)"
echo contract > tests/region_store_tests.cpp
echo contract > tests/photosynthesis_tests.cpp
git add .; git commit -qm mixed-tests
expect "push: a native test with it still runs checks" 0 CI_EVENT=push "CI_BEFORE=$native_test_base" -- checks
# Client dependency updates must select the isolated client gate.
mkdir -p tools
client_base="$(git rev-parse HEAD)"
+5
View File
@@ -31,6 +31,10 @@ fi
# Every suite runs when the workflow or this selector changes.
common='\.gitea/workflows/|tools/ci/ci-paths\.sh'
native='CMakeLists\.txt|CMakePresets\.json|cmake/|include/|src/|apps/'
# Sources compiled only into evo-postgres-tests (CMakeLists.txt). The native suites never
# build them, so a change to one alone selects the PostgreSQL suites, not checks/tsan/ecs;
# the PostgreSQL image runs the repository format check for them instead.
postgres_only_tests='tests/(postgres_tests|region_lease_store_tests|cellular_publication_tests|population_publication_tests|environment_publication_tests|account_control_store_tests|probe_handoff_store_tests|life_reservation_store_tests|primitive_publication_tests|region_action_tests|region_checkpoint_store_tests|region_host_tests|region_server_process_tests|region_recovery_tests|region_ops_tests|region_clone_tests|region_migration_tests|region_store_tests|region_load_tests|region_upgrade_tests|region_session_tests|grant_broker_tests|region_m10_session_tests|region_handoff_process_tests|fixtures/postgres_relay)\.cpp'
postgres_tools='migrations/|tools/prepare-postgres\.sh|tools/migrate-postgres\.sh|tools/backup/|tools/ci/postgres-check\.sh|tools/ci/life-reservations-|tools/ci/backup-check\.sh|tools/ci/dr-check\.sh|tools/ci/upgrade-check\.sh'
case "$suite" in
client)
@@ -41,6 +45,7 @@ case "$suite" in
;;
checks|tsan|ecs)
pattern="$common|$native|tests/|experiments/|tools/ci/linux-check\.sh|tools/ci/tsan-profile\.mjs|deploy/docker/Dockerfile"
files=$(grep -Ev "^($postgres_only_tests)$" <<< "$files" || true)
;;
postgres|postgres-tools)
pattern="$common|$native|tests/|$postgres_tools|third_party/mbedtls/|tools/prepare-mbedtls\.cmake|tools/mbedtls-pin\.cmake|deploy/docker/Dockerfile"
+4 -2
View File
@@ -3,6 +3,8 @@ set -euo pipefail
# Run inside the Dockerfile's ci-toolchain stage, not an arbitrary host shell.
suite="${1:?Expected checks or tsan}"
# Compile parallelism; each clang analysis/ASan job can take 1-2 GiB of runner memory.
jobs="${CI_BUILD_JOBS:-4}"
cmake --version
g++-14 --version
clang++-19 --version
@@ -14,7 +16,7 @@ check_preset() {
local preset="$1"
local compiler="$2"
cmake --preset "$preset" "-DCMAKE_CXX_COMPILER=$compiler"
cmake --build --preset "$preset" --parallel 2
cmake --build --preset "$preset" --parallel "$jobs"
ctest --preset "$preset" --no-tests=error --timeout 120
}
@@ -31,7 +33,7 @@ case "$suite" in
cmake --preset debug -B build/fuzz -DCMAKE_CXX_COMPILER=clang++-19 \
-DEVO_BUILD_FUZZER=ON
cmake --build build/fuzz --target evo-snapshot-fuzz evo-world-codec-fuzz --parallel 2
cmake --build build/fuzz --target evo-snapshot-fuzz evo-world-codec-fuzz --parallel "$jobs"
./build/fuzz/evo-world-codec-fuzz -seed=123456 -runs=10000 \
-max_len=96 -timeout=10 -rss_limit_mb=1024
mkdir -p build/fuzz/corpus