From d5ffade82aa6c07f31b6877309a28f513691796c Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 10 Oct 2026 21:58:06 -0400 Subject: [PATCH] Assert starvation preserves reserve energy --- docs/engineering/VALIDATION.md | 6 +++--- tests/cellular_region_step_tests.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index 3e769a4..0a49325 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -6013,9 +6013,9 @@ or durably publish the heat ledger, lineage outcome, habitat, or action result. Executed locally: warning-as-error MSVC 19.44 Debug and Release/NDEBUG direct compile/run of the focused region-step regression; the regression confirms -same-tick death, exact body/reserve transfer, separate heat output, no patch -mutation, and unchanged all-or-nothing handling of duplicate identities; -and `git diff --check`. `clang-format` and `clang-tidy` were not installed or +same-tick death, exact body and energy/matter reserve transfer, separate heat +output, no patch mutation, and unchanged all-or-nothing handling of duplicate +identities; and `git diff --check`. `clang-format` and `clang-tidy` were not installed or available on PATH in this Windows environment. CTest, Linux sanitizer/CI qualification, durable heat ownership, lineage and checkpoint publication remain pending. diff --git a/tests/cellular_region_step_tests.cpp b/tests/cellular_region_step_tests.cpp index b77b8c6..d0170ba 100644 --- a/tests/cellular_region_step_tests.cpp +++ b/tests/cellular_region_step_tests.cpp @@ -80,7 +80,7 @@ void refusal_never_returns_partial_tick_state() { CHECK(!repeated && repeated.error() == CellularRegionStepError::duplicate_life_id); auto starved_life = CellularLifeStepInput{ - 2, {0, 0}, 20, {}, {{0}, {{{1}, {2}, {3}, {4}}}}, {{0}, {{{1}, {1}, {1}, {1}}}}, + 2, {0, 0}, 20, {}, {{0}, {{{1}, {2}, {3}, {4}}}}, {{7}, {{{1}, {1}, {1}, {1}}}}, {{17}, {}}, budget()}; auto starved_budget = budget(); starved_budget.maintenance = {1'000}; @@ -90,7 +90,8 @@ void refusal_never_returns_partial_tick_state() { CHECK(result); CHECK(result->begin_tick == 4 && result->end_tick == 5); CHECK(result->lives.empty() && result->starved.size() == 1); - CHECK(result->starved[0] == CellularCorpseCandidate{2, {0, 0}, {{0}, {{{2}, {3}, {4}, {5}}}}}); + CHECK(result->starved[0] == + CellularCorpseCandidate{2, {0, 0}, {{7}, {{{2}, {3}, {4}, {5}}}}}); CHECK(result->heat_released.value == 17); CHECK(result->patches.empty()); CHECK(map->patches()[0].stock == Inventory{{5}, {{{2}, {2}, {2}, {2}}}});