#pragma once #include "evo/server/lifecycle/cellular_population.hpp" namespace evo::server { enum class CellularMigrationError : std::uint8_t { version, identity, tick, ineligible, capacity, placement, archive, overflow, conservation }; struct CellularMigrationExecution { std::uint64_t genome{}; std::vector members; accounting::Inventory transferred; std::unique_ptr source, destination; }; struct CellularPopulationMigrationExecution { std::uint64_t genome{}; std::vector members; accounting::Inventory transferred; std::unique_ptr source, destination; }; // ADR-0144: exact no-tick ownership candidates at an explicitly compatible cut. // This chooses neither a route nor a movement. It preserves every coordinate and // biological field, imports the complete genome ancestry and moves actual stock. // Publication must commit the pair under both current fences before activation. class CellularMigration { public: [[nodiscard]] static std::expected prepare(const CellularLives& source, const CellularLives& destination, std::uint64_t genome); [[nodiscard]] static std::expected prepare(const CellularPopulation& source, const CellularPopulation& destination, std::uint64_t genome); }; } // namespace evo::server