Files
dingo 5e168d67c3
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m12s
Foundation / checks (network) (push) Successful in 20m57s
Foundation / checks (client) (push) Successful in 22m9s
Foundation / checks (tsan) (push) Successful in 28m49s
Foundation / checks (postgres) (push) Successful in 1h5m2s
Foundation / checks (checks) (push) Successful in 1h17m42s
Foundation / postgres-tools (push) Successful in 1m10s
Foundation / server-image (push) Successful in 3m51s
Foundation / image (push) Successful in 4m54s
feat(lifecycle): qualify portable maturing wildlife transfers
2026-10-19 09:09:15 -04:00

45 lines
1.6 KiB
C++

#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,
format,
checksum
};
struct CellularMigrationExecution {
std::uint64_t genome{};
std::vector<std::uint64_t> members;
accounting::Inventory transferred;
std::unique_ptr<CellularLives> source, destination;
};
struct CellularPopulationMigrationExecution {
std::uint64_t genome{};
std::vector<std::uint64_t> members;
accounting::Inventory transferred;
std::unique_ptr<CellularPopulation> 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.
// ADR-0160: owner 7, equal rules 8 or equal rules 9; mixed rules fail.
class CellularMigration {
public:
[[nodiscard]] static std::expected<CellularMigrationExecution, CellularMigrationError>
prepare(const CellularLives& source, const CellularLives& destination, std::uint64_t genome);
[[nodiscard]] static std::expected<CellularPopulationMigrationExecution, CellularMigrationError>
prepare(const CellularPopulation& source, const CellularPopulation& destination,
std::uint64_t genome);
};
} // namespace evo::server