diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index 791557f..16fa5ac 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -6885,3 +6885,12 @@ The image selector also explicitly includes M10 session-control and cellular-session-batch contract tests, so those changes select the `server-image` smoke/publish job. The next main-branch run must confirm the full checks matrix and Harbor publish gate before a playtest image is available. + +CI run #286 built all regular targets and passed its 68 CTests, but the clang-tidy +stage rejected an unchecked mutation-offer candidate access in +`tests/cellular_lives_tests.cpp:316`. The guarded test reads now use safe defaults +after assertions, preserving the assertions' failure behavior. The server-image +selector includes this cellular lifecycle contract test, so the next push reruns +the complete validation and image publish path. The local Bash selector fixture +could not start: Windows returned `Bash/Service/CreateInstance/E_ACCESSDENIED`; +CI's deploy suite runs that fixture. diff --git a/tests/cellular_lives_tests.cpp b/tests/cellular_lives_tests.cpp index f634bb9..afa4274 100644 --- a/tests/cellular_lives_tests.cpp +++ b/tests/cellular_lives_tests.cpp @@ -276,7 +276,8 @@ void retained_feeding_earns_a_persistent_mutation_offer() { const std::array intent{CellularLifeIntent{life_id, {{0, 0}, {{0, 0}}}}}; const auto advanced = owner.advance_tick(intent); CHECK(advanced && advanced->lives.size() == 1 && advanced->lives[0].candidate.intake); - const auto& intake = advanced->lives[0].candidate.intake.value(); + const auto intake = advanced->lives[0].candidate.intake.value_or( + evo::biology::CellularPatchUptakeProposal{}); total_acquired += intake.transfer.acquired.energy.value; const auto offer = owner.mutation_offer(life_id); CHECK(offer); @@ -309,11 +310,13 @@ void retained_feeding_earns_a_persistent_mutation_offer() { auto revision_owner = owner.migrate_to_v3(); CHECK(revision_owner && (*revision_owner)->format_version() == cellular_lives_revision_format); const auto current_offer = (*revision_owner)->mutation_offer(life_id); - CHECK(current_offer && *current_offer); + const auto current_offer_data = + current_offer.value_or(std::nullopt).value_or(evo::biology::MutationOffer{}); + CHECK(current_offer && !current_offer_data.candidates.empty()); const CellularMutationSelection selection{life_id, (*revision_owner)->lives()[0].mutation.event_index, (*revision_owner)->lives()[0].mutation.offer_tick, - 999, (*current_offer)->candidates[0].operator_id}; + 999, current_offer_data.candidates[0].operator_id}; CellularBatch mutation_batch; mutation_batch.header = {(*revision_owner)->world(), (*revision_owner)->region(), diff --git a/tools/ci/ci-paths-check.sh b/tools/ci/ci-paths-check.sh index 716bddb..f8831f1 100644 --- a/tools/ci/ci-paths-check.sh +++ b/tools/ci/ci-paths-check.sh @@ -55,6 +55,10 @@ batch_contract_base="$(git rev-parse HEAD)" echo contract > tests/cellular_session_batch_tests.cpp git add .; git commit -qm cellular-batch-contract expect "push: cellular batch contract runs server image" 0 CI_EVENT=push "CI_BEFORE=$batch_contract_base" -- server-image +life_contract_base="$(git rev-parse HEAD)" +echo contract > tests/cellular_lives_tests.cpp +git add .; git commit -qm cellular-lives-contract +expect "push: cellular lives contract runs server image" 0 CI_EVENT=push "CI_BEFORE=$life_contract_base" -- server-image # Client dependency updates must select the isolated client gate. mkdir -p tools client_base="$(git rev-parse HEAD)" diff --git a/tools/ci/ci-paths.sh b/tools/ci/ci-paths.sh index cfed52e..b265eca 100755 --- a/tools/ci/ci-paths.sh +++ b/tools/ci/ci-paths.sh @@ -49,9 +49,9 @@ case "$suite" in pattern="$common|deploy/|tools/ops/|tools/backup/|tools/ci/deploy-policy-(check|selftest)\.py|tools/ci/prepare-kustomize\.sh|tools/ci/monitoring-check\.sh|tools/ci/ops-lib-check\.sh" ;; server-image) - # Session-control and cellular batch contract tests share the server image's + # These session-control and cellular contract tests exercise the server image's # runtime boundary; keep its smoke image in the same validation slice. - pattern="$common|$native|tests/network_control\.cpp|tests/cellular_session_batch_tests\.cpp|migrations/|tools/prepare-postgres\.sh|tools/ci/server-image-smoke\.sh|deploy/docker/Dockerfile" + pattern="$common|$native|tests/network_control\.cpp|tests/cellular_(session_batch|lives)_tests\.cpp|migrations/|tools/prepare-postgres\.sh|tools/ci/server-image-smoke\.sh|deploy/docker/Dockerfile" ;; image) pattern="$common|$native|tests/|deploy/docker/Dockerfile"