Run the cellular owner on rules 3 with corpse causes
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m21s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 10m41s
Foundation / checks (postgres) (push) Canceled after 10m38s
Foundation / checks (tsan) (push) Canceled after 8m19s
Foundation / checks (client) (push) Canceled after 10m48s
Foundation / checks (checks) (push) Canceled after 10m53s

ADR-0124's engulf profile starts a region on owner format 4 and rules 3,
with the revision-format archive. Ticks pass genome membrane thickness and
source to the region step, record each corpse's cause and predator, insert
detritus patches and validate rules-3 corpses as empty. Format-4 snapshots
carry the cause and predator and refuse an unknown cause, a predator on a
starvation corpse or a non-empty corpse. Mutation selection accepts both
genome-revision formats (3 and 4).

Persistence (version bundle, schema 34), protocol v11 and provisioning
follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 18:54:03 -04:00
co-authored by Claude Opus 5.5
parent 0fb67c3257
commit 02adc35fa2
9 changed files with 217 additions and 37 deletions
@@ -18,6 +18,10 @@ inline constexpr std::uint32_t cellular_lives_legacy_format = 1;
inline constexpr std::uint32_t cellular_lives_format = 2;
inline constexpr std::uint32_t cellular_lives_revision_format = 3;
inline constexpr std::uint32_t cellular_lives_rules = 2;
// ADR-0124: format 4 adds each corpse's cause and predator; rules 3 add engulfment and
// corpse detritus. They are used together, with the revision-format archive.
inline constexpr std::uint32_t cellular_lives_engulf_format = 4;
inline constexpr std::uint32_t cellular_lives_engulf_rules = 3;
inline constexpr std::size_t max_cellular_lives_bytes = std::size_t{16} * 1024 * 1024;
inline constexpr std::uint64_t cellular_mutation_surplus_seconds = 60;
inline constexpr std::uint16_t cellular_mutation_candidate_count = 3;
@@ -50,7 +54,9 @@ struct CellularOwnedCorpse {
biology::CellularPosition position{};
biology::GrowthState growth{};
std::uint32_t extent_um{};
accounting::Inventory inventory{};
accounting::Inventory inventory{}; // Empty under rules 3: it became detritus.
biology::CellularDeathCause cause{biology::CellularDeathCause::unrecorded};
std::uint64_t predator_life{}; // Engulfed only.
auto operator<=>(const CellularOwnedCorpse&) const = default;
};
struct CellularLifeIntent {
@@ -79,8 +85,13 @@ struct CellularLifeTickFeedback {
accounting::Picojoules maintenance_cost{}, movement_cost{};
biology::CellularMovementStatus movement{biology::CellularMovementStatus::not_requested};
biology::CellularIntakeStatus intake{biology::CellularIntakeStatus::not_requested};
biology::CellularEngulfStatus engulf{biology::CellularEngulfStatus::not_requested};
std::uint64_t prey_life{};
auto operator<=>(const CellularLifeTickFeedback&) const = default;
};
// Which owner version a new region starts on. Offers: format 2, rules 2 (the M11.3/11.4
// trial, upgraded by the no-tick migrations). Engulf: format 4, rules 3 (ADR-0124).
enum class CellularLivesProfile : std::uint8_t { offers, engulf };
struct CellularLivesConfig {
biology::CellularArea area{};
std::uint64_t tick{};
@@ -117,7 +128,7 @@ class CellularLives {
public:
[[nodiscard]] static std::expected<std::unique_ptr<CellularLives>, CellularLivesError>
create(const PrimitiveLives& opening, std::unique_ptr<biology::CellularHabitat> habitat,
CellularLivesConfig config);
CellularLivesConfig config, CellularLivesProfile profile = CellularLivesProfile::offers);
CellularLives(const CellularLives&) = delete;
CellularLives& operator=(const CellularLives&) = delete;
~CellularLives();