M12.3: publish and recover durable exact populations
Foundation / checks (ecs) (push) Successful in 2m41s
Foundation / checks (tsan) (push) Failing after 18m12s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 20m41s
Foundation / checks (postgres) (push) Canceled after 20m43s
Foundation / checks (checks) (push) Canceled after 20m49s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (client) (push) Failing after 17m4s
Foundation / postgres-tools (push) Canceled after 0s

This commit is contained in:
dingo
2026-10-17 17:10:17 -04:00
parent d5d10a0cc7
commit 627411983f
35 changed files with 2637 additions and 102 deletions
+21 -1
View File
@@ -44,7 +44,8 @@ inline Owner restore(const CellularLives& state) {
"reference restore");
}
inline Owner opening(std::uint64_t seed, bool rich, std::uint32_t count = 4) {
inline Owner opening(std::uint64_t seed, bool rich, std::uint32_t count = 4,
bool populated = true) {
require(count > 0 && count <= biology::max_cellular_tick_lives, "fixture population bound");
const std::uint32_t side = count == 4 ? 6'000 : 48'000;
const auto world = 200 + seed;
@@ -106,6 +107,8 @@ inline Owner opening(std::uint64_t seed, bool rich, std::uint32_t count = 4) {
checked(CellularLives::create(*primitive, std::move(habitat), {{side, side}, 0, 293'150},
CellularLivesProfile::foraging),
"reference cellular owner");
if (!populated)
return state;
require(state->advance_tick(std::span<const CellularLifeIntent>{}).has_value(),
"reference genesis tick");
for (std::uint64_t index = 0; index < count; ++index) {
@@ -177,4 +180,21 @@ inline CellularTickIntents inputs(const CellularLives& state, std::uint64_t seed
return tick;
}
inline Owner cellular_descendants() {
auto state = opening(1, true);
std::set<std::uint64_t> mutated;
for (unsigned step = 0; step < 8192; ++step) {
const auto input = inputs(*state, 1, mutated);
const auto executed =
checked(state->advance_tick_with_mutations(input.lives, input.mutations),
"descendant fixture tick");
for (const auto& mutation : executed.mutations)
if (mutation.result == CellularMutationResult::applied)
mutated.insert(mutation.life_id);
}
require(std::ranges::any_of(state->lives(),
[](const auto& life) { return life.account == LifeAccount{}; }),
"fixture has no funded descendant");
return state;
}
} // namespace evo::fixture