feat(lifecycle): rules 12 liquid owner on format 10 with brake traces
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m23s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 4m10s
Foundation / image (push) Successful in 4m31s

The cellular owner gains rules 12 on owner format 10: an explicit no-tick
format-9/rules-11 upgrade declares the region's liquid rules (current
configuration, founder handling and deposit motion, from the tuning file and a
seed when the region opens), converts the habitat to format 3 and starts lives at
rest. Founders born afterwards are founder 5 (genome schema 6).

Each tick derives every life's handling from its genome and the declared founder
handling, samples the current at its footprint and steps the shared liquid
motion; afterwards bubbles move with the current and the drift moving cells
induce, and touching bubbles merge. Format 10 persists the rules and each life's
motion state; restore regenerates the identical current field.

Brake is a new step intent, valid only under rules 12, carried in trace 4 as flag
bit 1 (SQL never parses that byte; player action records keep it zero). Tests
cover the upgrade, exact restore, swimming and braking, moving food with fixed
pools, restore continuing a live run, and brake traces replaying exactly. Genomes
from before schema 6 handle as founders. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-21 17:28:58 -04:00
co-authored by Claude Opus 5.5
parent 190a66ad5e
commit 3f82795c18
13 changed files with 564 additions and 51 deletions
+7 -1
View File
@@ -99,7 +99,7 @@ add_library(evo_lifecycle STATIC src/server/lifecycle/primitive_lives.cpp
src/server/lifecycle/cellular_population_codec.cpp src/server/lifecycle/cellular_population_policy.cpp
src/server/lifecycle/cellular_schedule.cpp src/server/lifecycle/cellular_population_batch.cpp
src/server/lifecycle/cellular_environment.cpp src/server/lifecycle/cellular_environment_batch.cpp
src/server/lifecycle/cellular_light.cpp)
src/server/lifecycle/cellular_light.cpp src/server/lifecycle/cellular_liquid.cpp)
add_library(evo::lifecycle ALIAS evo_lifecycle)
target_link_libraries(evo_lifecycle PUBLIC evo::biology evo::world)
evo_owned_target(evo_lifecycle)
@@ -743,6 +743,12 @@ if(BUILD_TESTING)
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-retained-plan-population cellular-retained-plan-population-restart
PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-liquid-owner-tests tests/cellular_liquid_owner_tests.cpp)
target_include_directories(evo-cellular-liquid-owner-tests PRIVATE tests)
target_link_libraries(evo-cellular-liquid-owner-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-liquid-owner-tests)
add_test(NAME cellular-liquid-owner-contracts COMMAND evo-cellular-liquid-owner-tests)
set_tests_properties(cellular-liquid-owner-contracts PROPERTIES TIMEOUT 300)
add_executable(evo-photosynthesis-tests tests/photosynthesis_tests.cpp)
target_link_libraries(evo-photosynthesis-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-photosynthesis-tests)