From 6650be5f1a7643a1010f9b686f45db7bee84c049 Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 11 Oct 2026 09:45:44 -0400 Subject: [PATCH] Unblock server image validation path --- docs/engineering/VALIDATION.md | 10 ++++++++-- tests/cellular_step_tests.cpp | 2 +- tools/ci/ci-paths-check.sh | 10 ++++++++++ tools/ci/ci-paths.sh | 4 +++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index 939239d..791557f 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -6877,5 +6877,11 @@ an image build nor Harbor publication. The future-version test now uses v11; the M11.4c reservation-to-tick adapter is included in the next CI run so the network, native, server-image and Harbor gates can all be evaluated together. The local focused Windows build stalled without output and was stopped; -`git diff --check` passed, but CI must validate the adapter. Harbor's repository -setting remains unverified until that run reaches and reports the publish gate. +`git diff --check` passed. CI run #285's network suite passed, but the main +checks build failed clang-tidy on `tests/cellular_step_tests.cpp:53`: +`bugprone-unchecked-optional-access` rejected `intake.value()` despite the +preceding presence guard. The test now uses a guarded optional dereference. +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. diff --git a/tests/cellular_step_tests.cpp b/tests/cellular_step_tests.cpp index a485c8e..84cf6d8 100644 --- a/tests/cellular_step_tests.cpp +++ b/tests/cellular_step_tests.cpp @@ -50,7 +50,7 @@ void maintenance_motion_and_intake_conserve_one_tick() { CHECK(step->reserve_after == Inventory{{195}, {{{5}, {2}, {1}, {0}}}}); if (step->intake_status != CellularIntakeStatus::acquired || !step->intake) throw std::runtime_error("cellular step intake missing"); - const auto& intake = step->intake.value(); + const auto intake = step->intake.value_or(CellularPatchUptakeProposal{}); CHECK(intake.transfer.patch_after == Inventory{{950}, {{{15}, {8}, {4}, {2}}}}); CHECK(reserve.energy.value == 200 && heat.energy.value == 0); CHECK(map->patches()[0].stock == Inventory{{1'000}, {{{20}, {10}, {5}, {2}}}}); diff --git a/tools/ci/ci-paths-check.sh b/tools/ci/ci-paths-check.sh index ead16ed..716bddb 100644 --- a/tools/ci/ci-paths-check.sh +++ b/tools/ci/ci-paths-check.sh @@ -45,6 +45,16 @@ expect "push: only dr-check.sh changed skips image" 1 CI_EVENT=push "CI_BEFORE=$ life_base="$(git rev-parse HEAD)" echo check > tools/ci/life-reservations-check.sql; git add .; git commit -qm life-check expect "push: life reservation check runs postgres" 0 CI_EVENT=push "CI_BEFORE=$life_base" -- postgres +# Session control and cellular batch contract changes must smoke the server image. +server_contract_base="$(git rev-parse HEAD)" +mkdir -p tests +echo contract > tests/network_control.cpp +git add .; git commit -qm network-control-contract +expect "push: network control contract runs server image" 0 CI_EVENT=push "CI_BEFORE=$server_contract_base" -- server-image +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 # 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 052d0ef..cfed52e 100755 --- a/tools/ci/ci-paths.sh +++ b/tools/ci/ci-paths.sh @@ -49,7 +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) - pattern="$common|$native|migrations/|tools/prepare-postgres\.sh|tools/ci/server-image-smoke\.sh|deploy/docker/Dockerfile" + # Session-control and cellular batch contract tests share 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" ;; image) pattern="$common|$native|tests/|deploy/docker/Dockerfile"